Hi Phil,
Thanks for posting! Something that you can try doing is running MSBuild against the project as it exists in NCrunch's workspace. If you right-click on your failing build, you'll see an option to browse to the workspace using explorer. This should allow you to find the location on disk that NCrunch is using to build your project, and the project file shown here will also contain a number of manipulations NCrunch makes to it.
What you've described doesn't sound like normal behaviour, so there must be another variable hidden in here somewhere that is affecting the way the warning is processed. NCrunch doesn't do any manipulation of the 'warnings as errors' flag, so I'm curious as to why this is happening.
Something you'll notice is that if you build the application using a release configuration, you won't get any debugging information and NCrunch likely won't instrument your assemblies (so you won't get code coverage). The best way would be to have NCrunch work with your debug configuration by suppressing the warnings as error flag. There’s an MSBuild property that controls this. You can make the property conditional so that it won’t apply when NCrunch is running.
If you open each of your .proj files in a text editor, look for:
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Change this to:
<TreatWarningsAsErrors Condition="$(NCrunch) != '1'">true</TreatWarningsAsErrors>
I think this should do the trick for you. Let me know how it goes.
Cheers,
Remco