Thanks Nancy for your reply.
I was a little quick in marking it as the answer.
The problem still exists.
When further examining the output window of VS i can see for WPF project the CSC.exe is called two times.
The first part of the call to the compiler is equal to both calls (show as below)
C:\...\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /doc:..\..\output\Release\lib.XML /define:TRACE /reference:"..." /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\lib.dll
after this the first difference occurs. The second execution of csc.exe has some references to resource files like below plus marking the compilation with the flag warnaserror.
/warnaserror+ /resource:obj\Release\lib.g.resources /resource:obj\Release\lib.....resources (and more)
This is the first part where i think the problem occurs, why is the 'warnaserror+' not present in both compilation steps?
After that all the *.cs file are passed to the csc.exe the same over both the calls to csc.exe.
With finally at the end the last diference, the second compilation step contains '/warnaserror-:618,1030,1570,1572,1573,1574,1591,1701,1702'.
The descibed behaviour occurs both in using msbuild over the commandline aswel when using VisualStudio.
I hope the descibed behaviour makes sense :)
Kind regards,
Sven