是否可以执行与here相同的操作,但对于DotNetCoreBuild? 如果是,怎么办?
This workaround不适合,因为我需要执行下一个目标,并且在构建步骤之后需要这些日志。
答案 0 :(得分:2)
var target = Argument("target", "Build");
var slnPath = "./src/some-project.sln";
var distDirectory = Directory("./dist");
Task("Build")
.Does(() =>
{
var settings = new DotNetCoreMSBuildSettings();
settings.FileLoggers.Add(new MSBuildFileLoggerSettings(){
LogFile = "./WarningReportes.txt",
SummaryOutputLevel = MSBuildLoggerOutputLevel.WarningsOnly
});
DotNetCoreMSBuild(slnPath, settings);
});
RunTarget(target);