diff --git a/LICENSE b/LICENSE
index 86d1b56..d19eeaa 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2018-2020 dotnet campus
+Copyright (c) 2018-2022 dotnet campus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/dotnetCampus.SourceYard/Assets/Current/Core.targets b/src/dotnetCampus.SourceYard/Assets/Current/Core.targets
index 45fecec..a54300d 100644
--- a/src/dotnetCampus.SourceYard/Assets/Current/Core.targets
+++ b/src/dotnetCampus.SourceYard/Assets/Current/Core.targets
@@ -7,7 +7,8 @@
- <_SourceYardMultiTargetingPackageInfoFolder>$(BaseIntermediateOutputPath)$(Configuration)\SourceYardMultiTargetingPackageInfoFolder\
+ <_SourceYardMultiTargetingPackageInfoFolder>$([System.IO.Path]::Combine($(BaseIntermediateOutputPath),$(Configuration),"SourceYardMultiTargetingPackageInfoFolder"))
+
- <_SourceYardMultiTargetingPackageInfoFile>$(_SourceYardMultiTargetingPackageInfoFolder)$(TargetFramework).txt
+ <_SourceYardMultiTargetingPackageInfoFile>$([System.IO.Path]::Combine($(_SourceYardMultiTargetingPackageInfoFolder),"$(TargetFramework).txt"))
- $(IntermediateOutputPath)SourcePacking\
+ $([System.IO.Path]::Combine($(BaseIntermediateOutputPath),$(IntermediateOutputPath),"SourcePacking"))
- $(SourcePackingDirectory)CompileFile.txt
- $(SourcePackingDirectory)ResourceFile.txt
- $(SourcePackingDirectory)ContentFile.txt
- $(SourcePackingDirectory)NoneFile.txt
- $(SourcePackingDirectory)EmbeddedResourceFile.txt
- $(SourcePackingDirectory)PageFile.txt
- $(SourcePackingDirectory)ApplicationDefinitionFile.txt
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"CompileFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"ResourceFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"ContentFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"NoneFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"EmbeddedResourceFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"PageFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"ApplicationDefinitionFile.txt"))
- $(SourcePackingDirectory)DescriptionFile.txt
- $(SourcePackingDirectory)CopyrightFile.txt
- $(SourcePackingDirectory)PackageReleaseNotesFile.txt
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"DescriptionFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"CopyrightFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"PackageReleaseNotesFile.txt"))
- $(SourcePackingDirectory)PackageReferenceVersionFile.txt
- $(SourcePackingDirectory)FrameworkReferenceVersionFile.txt
- $(SourcePackingDirectory)SourceProjectPackageFile.txt
- $(SourcePackingDirectory)SourceYardPackageReferenceFile.txt
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"PackageReferenceVersionFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"FrameworkReferenceVersionFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceProjectPackageFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardPackageReferenceFile.txt"))
- $(SourcePackingDirectory)SourceYardExcludePackageReferenceFile.txt
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardExcludePackageReferenceFile.txt"))
- $(SourcePackingDirectory)SourceYardExcludeFileItemFile.txt
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardExcludeFileItemFile.txt"))
- $(SourcePackingDirectory)SourceYardCompilePackageFile.txt
- $(SourcePackingDirectory)SourceYardResourcePackageFile.txt
- $(SourcePackingDirectory)SourceYardContentPackageFile.txt
- $(SourcePackingDirectory)SourceYardNonePackageFile.txt
- $(SourcePackingDirectory)SourceYardEmbeddedResourcePackageFile.txt
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardCompilePackageFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardResourcePackageFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardContentPackageFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardNonePackageFile.txt"))
+ $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardEmbeddedResourcePackageFile.txt"))
@@ -103,24 +104,24 @@
RepositoryUrl "$(RepositoryUrl)"
RepositoryType "$(RepositoryType)"
PackageProjectUrl "$(PackageProjectUrl)"-->
- --PackageLicenseUrl "$(PackageLicenseUrl) "
+ --PackageLicenseUrl "$(PackageLicenseUrl)"
--CopyrightFile "$(CopyrightFile)"
-v $(PackageVersion)
- --DescriptionFile "$(DescriptionFile) "
+ --DescriptionFile "$(DescriptionFile)"
--Title "$(Title)"
--Owner "$(Owner)"
- --PackageTags "$(PackageTags) "
+ --PackageTags "$(PackageTags)"
--PackageReleaseNotesFile $(PackageReleaseNotesFile)
- --PackageId "$(PackageId) "
+ --PackageId "$(PackageId)"
- -p "$(MSBuildProjectFullPath) "
+ -p "$(MSBuildProjectFullPath)"
-n "$(PackageOutputPath) "
- -n "$(OutputPath) "
+ -n "$(OutputPath) "
@@ -199,7 +200,7 @@
+ Command="$(SourceYardApplicationFilePath) $(SourceMSBuildProjectFullPath) $(SourcePackageOutputPath) $(SourceYardPackageVersion) $(SourceYardAuthors) $(SourceYardRepositoryUrl) $(SourceYardRepositoryType) $(SourceYardPackageProjectUrl) $(SourceYardCopyright) $(SourceYardDescription) $(SourceYardTitle) $(SourceYardPackageLicenseUrl) $(SourceYardPackageReleaseNotes) $(SourceYardPackageTags) $(SourceYardOwner) $(SourceYardPackageId) --TargetFrameworks "$(TargetFrameworks) " --TargetFramework "$(TargetFramework) " --MultiTargetingPackageInfoFolder "$(_SourceYardMultiTargetingPackageInfoFolder)"">
@@ -211,7 +212,7 @@
- <_SourcePackingDirectory>$(IntermediateOutputPath)SourcePacking\
+ <_SourcePackingDirectory>$([System.IO.Path]::Combine($(IntermediateOutputPath),"SourcePacking"))
diff --git a/src/dotnetCampus.SourceYard/Cli/Options.cs b/src/dotnetCampus.SourceYard/Cli/Options.cs
index 5b75d2b..d1979c0 100644
--- a/src/dotnetCampus.SourceYard/Cli/Options.cs
+++ b/src/dotnetCampus.SourceYard/Cli/Options.cs
@@ -7,7 +7,7 @@ internal class Options
///
/// 项目文件所在的路径
///
- [Option('p', "project", Description = "The full path of the project file.")]
+ [Option('p', "Project", Description = "The full path of the project file.")]
public string ProjectFile { get; set; } = null!;
/////
@@ -19,13 +19,13 @@ internal class Options
///
/// 打包输出的文件夹
///
- [Option('n', "package-output-path", Description = "The package output full path of the project.")]
+ [Option('n', "PackageOutputPath", Description = "The package output full path of the project.")]
public string PackageOutputPath { get; set; } = null!;
///
/// 当前项目的打包版本
///
- [Option('v', "package-version",
+ [Option('v', "PackageVersion",
// 默认不需要加上打包版本
Description = "The package version value.")]
public string PackageVersion { get; set; } = "1.0.0";
diff --git a/src/dotnetCampus.SourceYard/Program.cs b/src/dotnetCampus.SourceYard/Program.cs
index c63ace0..770d9a3 100644
--- a/src/dotnetCampus.SourceYard/Program.cs
+++ b/src/dotnetCampus.SourceYard/Program.cs
@@ -93,6 +93,10 @@ private static void RunOptionsAndReturnExitCode(Options options)
// 安装的项目的兼容性无法处理?源代码包有 net45 框架,项目是 net47 框架,如何让项目能兼容使用到 net45 框架?当前没有此生成逻辑
var sourcePackingFolder = GetCommonSourcePackingFolder(multiTargetingPackageInfo, logger);
var packageOutputPath = options.PackageOutputPath;
+ if (!string.IsNullOrEmpty(packageOutputPath))
+ {
+ packageOutputPath = packageOutputPath.Trim();
+ }
var packageVersion = options.PackageVersion;
// logger.Message($@"项目文件 {projectFile}
diff --git a/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj b/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj
index 67df931..c7b1dd6 100644
--- a/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj
+++ b/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj
@@ -43,6 +43,9 @@
all
runtime; build; native; contentfiles; analyzers
+
+
+