You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MSBuild has the option of registering custom loggers, via the /logger:foo switch. This can be utilized through something like this today (this is in use in our build script):
MSBuild(solutionPath, settings =>
{
settings.Configuration = configuration;
if (EnvironmentVariable("BUILD_DEFINITIONNAME") != null) // this only happens on TFS
{
settings.ArgumentCustomization = arguments =>
{
arguments.Append(string.Format(
"/logger:{0}\\Agent\\Worker\\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll",
EnvironmentVariable("AGENT_HOMEDIRECTORY")));
return arguments;
};
}
});
This is required to get "nice" output on TFS builds, so the web UI shows a list of errors rather than just "MSBuild failed" (see this SO question for an example).
It would be nice if this was available in a less roundabout way, e.g. through a property directly on MSBuildToolSettings, maybe something like this:
MSBuild(solutionPath, settings =>
{
settings.Configuration = configuration;
settings.Loggers.Add(/* long path to dll omitted */);
}
The text was updated successfully, but these errors were encountered:
I'm interested in fixing this if no one else is working on it yet.
The idea I have is basically the same as for adding/setting properties. MSBuildSettings would be extended with a Loggers property. Adding to this list would be done via an extension method WithLogger, taking the assembly name and optionally the class name or parameters for the logger. So the usage would be like this:
MSBuild has the option of registering custom loggers, via the
/logger:foo
switch. This can be utilized through something like this today (this is in use in our build script):This is required to get "nice" output on TFS builds, so the web UI shows a list of errors rather than just "MSBuild failed" (see this SO question for an example).
It would be nice if this was available in a less roundabout way, e.g. through a property directly on
MSBuildToolSettings
, maybe something like this:The text was updated successfully, but these errors were encountered: