Skip to content

Instantly share code, notes, and snippets.

@lavn0
Created October 23, 2018 15:46
Show Gist options
  • Save lavn0/92d1bfeffb1cb05fd60bd60e6b728a94 to your computer and use it in GitHub Desktop.
Save lavn0/92d1bfeffb1cb05fd60bd60e6b728a94 to your computer and use it in GitHub Desktop.
ソリューションファイルを指定してコード分析結果を出力する方法。FxCopCmd.exeではDLLすべてのパスを渡す必要がある。
@SET DT=%TIME: =0%
@SET DT=%DT::=%
@SET DT=%DATE:/=-%-%DT:~0,6%
@SET MSBUILD=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
@SET SOLUTION=SampleSolution.sln
@SET LOGDIR=LOG
@MKDIR "%LOGDIR%" >nul 2>&1
"%MSBUILD%" "%SOLUTION%" /t:ReBuild /verbosity:q /p:Configuration=Release;RunCodeAnalysis=true;CodeAnalysisOutputToConsole=true > %DT%_out.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment