On our continous integration server (Teamcity 5.1.3) we have a msbuild script that is automatically building our applications.
When we enable "Warning as error": in Visual Studio, it build fine (it ignores the methods within "*.designer.cs" files. But on the build server we always receive the following error:
[(Rebuild target(s)):] somefile.Designer.cs(XX, XX): error CS1591: Warning as Error: Missing XML comment for publicly visible type or member...
The MSBuild script that is being used looks like this:
<MSBuild Projects="proj\$(ProjectName).sln"
Targets="Clean;Rebuild"
Properties="Configuration=Release"
StopOnFirstFailure="True">
</MSBuild>
I can understand why it does that, but there must be a way to tell msbuild to ignore missing comments in generated files?
EDITED
Digging a little further: In the Visual Studio Solution we had "Warning as error" checked but we also add error 1591 listed in the "Suppress warning" textbox. MSBuild does'nt seem to pick up that "suppress warning" textbox and fails the build. Anything I can do?
EDITED Again The problem was that MSBuild was targetting any CPU (and in the "ANY CPU" configuration we didnt suppressed error 1591). Once we changed ANY CPU to exclude error 1591 it all started to build correctly on the build server. Thanks for those that helped.