I am wanting to run MSBUILD through code, and get asynchronous status of the build as it progresses (similar to TeamCity or any other build runner does).
I am using the following code:
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);
Is there a way to get the current executing MSBUILD task through code?