private void Build(uint options, IVsOutputWindowPane output, string target)
{
if (!this.NotifyBuildBegin())
{
return;
}
try
{
config.ProjectMgr.BuildAsync(options, this.config.ConfigKey, output, target, (result, buildTarget) => this.NotifyBuildEnd(result, buildTarget));
}
catch (Exception e)
{
Trace.WriteLine("Exception : " + e.Message);
ErrorHandler.ThrowOnFailure(output.OutputStringThreadSafe("Unhandled Exception:" + e.Message + "\n"));
this.NotifyBuildEnd(MSBuildResult.Failed, target);
throw;
}
finally
{
ErrorHandler.ThrowOnFailure(output.FlushToTaskList());
}
}