I have a WPF project and compilation by Visual Studio/MSBuild seems to do 2 passes, with the latter pass adding some temporary resource files, e.g.
csc <options> <files>
csc <options> <files> /resource:obj\Debug\Project.g.resources
I suspect you cannot work around this (at least not without giving up code generation or XAML). But the problem I face with that is that every compiler warning is doubled. Even worse, they are in different languages! For example for me in English and German, with the first pass generating English warnings, and the second German warnings:
5 The event 'SomeEvent' is never used Foo.xaml.cs 29
8 Unreachable code detected Bar.cs 33
34 Unerreichbarer Code wurde entdeckt. Bar.cs 33
44 Das Ereignis "SomeEvent" wird nie verwendet. Foo.xaml.cs 29
Obviously this generates a lot of noise.
Is this normal behavior or am I doing something wrong here? Are there any ways to improve this? It should show every warning only once, preferably in English. But everything in German would suffice, too.