How can I debug MSBuild 16.2 RRS feed

  • Question

  • For the old MSBuild I could activate debuging for MSBuild in the Registry.

    I have a projekt with the new project template "<Project Sdk="Microsoft.NET.Sdk">", so I can't debug msbuild with the old tool.

    Old tool: msbuild -h ->

    Microsoft (R)-Buildmodul, Version 4.7.3190.0
    [Microsoft .NET Framework, Version 4.0.30319.42000]
    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

                         Sorgt dafür, dass ein Debugger umgehend angezeigt wird, damit
                         Visual Studio angefügt werden kann, um die
                         MSBuild-XML und alle dafür verwendeten Aufgaben und Protokollierungen zu debuggen.

    There is no such option for:

    Microsoft (R)-Build-Engine, Version 16.2.37902+b5aaefc9f für .NET Framework
    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

    And I can't debug it with the old msbuild either.

    Wednesday, August 14, 2019 2:47 PM


  • Hi friend,

    Welcome to the MSDN forum.

    As far as l know, the debug option was removed since v14.0 (VS2015). If you want to continue to debug your file, l suggest that you can view the build log to monitor the entire build process by this way.

    >>>>>add the command "-v:Diagnostic" on command line

    Besides, the MSBuild supports downward compatibility.The higher version of MSBuild is compatible with the lower version. Your new MSBuild tool is v16.0. So it compiles both vs2019 itself and previous versions of the project successfully. We do not recommend that you use the old version of the MSBuild  tool to compile projects that are beyond the old version. You would better use your new MSBuild tool and add the "-v:Diagnostic" to achieve your requirement.

    More information you can refer to this:

    l hope it could help you.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, August 15, 2019 7:10 AM