提交 e8005bd8 编写于 作者: lindexi_gd's avatar lindexi_gd

尝试修复对单框架项目的支持

上级 8d171c62
......@@ -45,8 +45,9 @@ namespace dotnetCampus.SourceYard.Context
return true;
}
if (targetFrameworks != null)
if (targetFrameworks != null && string.IsNullOrWhiteSpace(targetFrameworks) is false)
{
// 对于单框架,也许 targetFrameworks 的值是空字符串
if (targetFrameworks.Contains(t.TargetFramework) is false)
{
return true;
......
......@@ -79,6 +79,8 @@ namespace dotnetCampus.SourceYard
#endif
var logger = new Logger();
FixOptions(options);
try
{
logger.Message("Source packaging");
......@@ -179,6 +181,18 @@ namespace dotnetCampus.SourceYard
}
}
/// <summary>
/// 兼容修复
/// </summary>
/// <param name="options"></param>
private static void FixOptions(Options options)
{
if (string.IsNullOrWhiteSpace(options.MultiTargetingPackageInfoFolder))
{
options.MultiTargetingPackageInfoFolder = null!;
}
}
/// <summary>
/// 获取通用的 SourcePacking 文件夹,无视框架版本的不同
/// </summary>
......@@ -212,7 +226,7 @@ namespace dotnetCampus.SourceYard
folder = Path.GetFullPath(folder);
const string packageName = "Package";
if (string.IsNullOrEmpty(options.TargetFrameworks))
if (string.IsNullOrWhiteSpace(options.TargetFrameworks))
{
// 单个框架的项目
var sourcePackingFolder = GetCommonSourcePackingFolder(multiTargetingPackageInfo, logger);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册