开发者

Logging Build messages with MSBuild 4.0

I am using MsBuild 4.0 in code, like so:

 var globalProperties = new Dictionary<string, string&开发者_如何学Cgt;();
 var buildRequest = new BuildRequestData(solutionPathAbsolute, globalProperties, null, new string[] { "Build" }, null);
 var pc = new ProjectCollection();

 var result = BuildManager.DefaultBuildManager.Build(new BuildParameters(pc), buildRequest);

Note how this API is completely different from MsBuild 3.5... How does one hook in a logger to recieve detailed build messages with the new API?


The BeginBuild method on the BuildManager allows you to pass in a set of BuildParameters which includes a Loggers property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜