2
我想通過代碼運行的MSBuild,並獲得建造的異步狀態,因爲它的進展(類似於TeamCity的或任何其他構建亞軍一樣)。通過代碼運行的MSBuild並獲得異步進度
我使用下面的代碼:
var projectFileName = @"...\MyApplication\MyApplication.sln";
ProjectCollection pc = new ProjectCollection();
var GlobalProperty = new Dictionary<string, string>();
GlobalProperty.Add("Configuration", "Debug");
GlobalProperty.Add("Platform", "x86");
var buildRequest = new BuildRequestData(projectFileName, GlobalProperty, null, new string[] { "Build" }, null);
var buildResult = BuildManager.DefaultBuildManager.Build(new BuildParameters(pc), buildRequest);
有沒有辦法打通當前代碼執行的MSBuild任務?
我實際上是在考慮設置一個MSBUILD日誌提供程序,並觀察它的構建完成消息嗎? – Doug 2012-10-23 10:16:09
我會說這絕對是正確的答案 – OrPaz 2014-02-24 15:00:33