简体   繁体   中英

Error reporting in TFS with Cake build and MSBuild

On compilation errors in one of my projects, the build results page on TFS is significantly less informative than I'd hoped; I only get this:

集结错误 - 无信息

I had hoped more for something like this (from a different project built the same way):

集结错误 - 用 - 信息

What do I need to do to get TFS to show the specific errors?


I build both projects using Cake build with the following target definition:

Task("Build")
    .IsDependentOn("Update version")
    .Does(() =>
    {
        Information("Verbosity: {0}", verbosity);
        MSBuild(solutionPath, settings =>
        {
            settings.SetConfiguration(configuration);
            settings.SetVerbosity(verbosity);
        });
    });

This sounds like it could be solved by using a custom MSBuild logger . Currently we do not have one built into Cake, but if you add an issue to Cake's issue tracker we can take this into consideration for a future release.

As a temporary solution, you could write a custom logger and provide it to the MSBuild alias using the ArgumentCustomization property on the MSBuild tool settings.

If TFS provides a MSBuild logger out of the box, you should be able to reference that one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM