how can i suppress all compiler and code analysis warnings from msbuild at the command line?

后端 未结 6 1450
感情败类
感情败类 2021-01-11 17:45

This has been asked, but wasn\'t answered. The answer (use /warn:1) doesn\'t work for msbuild.exe, only csc.exe. Perhaps I\'m missing something between csc and

6条回答
  •  借酒劲吻你
    2021-01-11 18:09

    I know this is an old post but it got me on the right track and by adding the following to my msbuild call it suppressed all of the warnings and output as it built the project. I have this in a batch file so the only output I get I believe are the end results and any messages I prompt with echo. The secret was in the /clp switch. So I looked that up and put in all of the ones that supress output. Each one got rid of more but there were still the yellow warnings coming up and when I added the ErrorsOnly switch, there was no more output.

    call msbuild /clp:NoSummary;NoItemAndPropertyList;ErrorsOnly /verbosity:quiet /nologo
    

提交回复
热议问题