how can i suppress all compiler and code analysis warnings from msbuild at the command line? -
this has been asked, wasn't answered. answer (use /warn:1
) doesn't work msbuild.exe, csc.exe. perhaps i'm missing between csc , msbuild?
i'd suppress compiler warnings , code analysis warnings (e.g. "the variable 'variablenamehere' assigned value ..." or code analysis warning : ca1805 : microsoft.performance : ...) when i'm using command line msbuild. don't want alter solution file. there several hundred warning messages in large solution i'm building -- fixing them far out of scope project.
i tried /v:quiet
didn't work.
is there way via command line?
update: this:
c:\windows\microsoft.net\framework\v3.5\msbuild.exe c:\dev\reallybigsolution.sln /p:nowarn=true /p:nowarn=ca1031
absolutely doesn't work. still hundreds of warnings, including 1 blocked (ca1031).
using /p:runcodeanalysis=never
or /p:runcodeanalysis=false
apparently doesn't suppress code analysis warnings or errors.
can use nowarn flag on compiler, corresponds <nowarn>
property in .csproj file. maybe msbuild /p:nowarn="37;68"
turn off warning numbers (haven't tried it).
or use
http://msdn.microsoft.com/en-us/library/13b90fz7.aspx
to turn off warnings altogether. don't know property name offhand, try /p:warn=0
.
edit: read comments toward end; seems getting rid of these warnings isn't possible.
Comments
Post a Comment