Skip to content

Commit fd5f0a6

Browse files
committed
尝试获取准备输出文件夹
1 parent 3cee019 commit fd5f0a6

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

  • Code/UsingMSBuildCopyOutputFileToFastDebug

Code/UsingMSBuildCopyOutputFileToFastDebug/Program.cs

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.IO;
23
using System.Linq;
34
using dotnetCampus.Cli;
45
using dotnetCampus.MSBuildUtils;
@@ -36,12 +37,42 @@ static void Main(string[] args)
3637
.AddHandler<CopyOutputFileOptions>(c =>
3738
{
3839
Logger.Message($"Enter CopyOutputFileOptions");
39-
});
40+
CopyOutputFile(c);
41+
})
42+
.Run();
43+
}
44+
45+
private static void CopyOutputFile(CopyOutputFileOptions copyOutputFileOptions)
46+
{
47+
48+
}
49+
50+
/// <summary>
51+
/// 获取准备输出的文件夹
52+
/// </summary>
53+
/// <param name="copyOutputFileOptions"></param>
54+
/// <returns></returns>
55+
private static DirectoryInfo GetTargetFolder(CopyOutputFileOptions copyOutputFileOptions)
56+
{
57+
var mainProjectPath = copyOutputFileOptions.MainProjectPath;
58+
// 如果用户有设置此文件夹,那就期望是输出到此文件夹
59+
if(!string.IsNullOrEmpty(mainProjectPath))
60+
{
61+
return new DirectoryInfo(mainProjectPath);
62+
}
63+
64+
return null;
4065
}
4166

4267
private static IMSBuildLogger Logger { get; } = new MSBuildConsoleLogger();
4368
}
4469

70+
71+
public static class TargetFrameworkChecker
72+
{
73+
74+
}
75+
4576
[Verb("CopyOutputFile")]
4677
public class CopyOutputFileOptions
4778
{

0 commit comments

Comments
 (0)