Search code examples
c#tfsmsbuildcontinuous-integrationstylecop

Different behaviour between Debug and Release


We are using MSBuild for our Continuous integration system and check the code issues with an StyleCop task for each project.

When we compile the project in build machine in debug mode StyleCop finish successfully, but the same code in Release find one problem.

I would like that Debug mode find this problem.

enter image description here


Solution

  • It looks like you don't have XML documentation turned on for the debug build.

    Go to the Project properties, "Build" tab, ensure that the Debug configuration is selected (droplist at the top) and check that the "XML Documentation file" option is ticked.

    Also check that "Treat warnings as errors" is selected.