Reputation: 209
I wanna use msbuild in C#, there are 2 approach:
we have a build engine to compile some xmls, and the engine has its own logging system.
1) Call msbuild in C#
Process P=new Process();
p.StartInfo.FileName=...
This works, but I wanna a more programically way.
2) Use Microsoft.Build namespace
BuildManager.DefaultBuildManager.Build(
new BuildParameters()
{
DetailedSummary = false,
Loggers = new List<ILogger>() { logger }
}, buildRequest);
The Question is, I can't use the build engine logging system, let's say, the Microsoft.Build Logger returns the build result but not that useful, our build engine's logger can figure out more detail information on errors.
Since Microsoft.Build also use *.vproj
and the assembly dlls works fine, is there a way to use customer build engine's logger and out put somewhere...
Upvotes: 4
Views: 1575