Created
December 10, 2015 16:19
-
-
Save mkoertgen/417e8d3dfbe6ae8bc2f7 to your computer and use it in GitHub Desktop.
Install FxCop14 on build server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem cf.: http://stackoverflow.com/questions/21729066/running-code-analysis-fxcop-12-0-14-0-on-build-agent-without-installing-visu/32093939#32093939 | |
@echo off | |
setlocal | |
set DIR=%~dp0 | |
rem cf. http://stackoverflow.com/questions/21729066/running-code-analysis-fxcop-12-0-14-0-on-build-agent-without-installing-visu/32093939#32093939 | |
:install_ms_build_tools | |
if exist "%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" goto install_vcredist | |
echo Installing 'Microsoft Build Tools 2015'... | |
start "" /WAIT "%DIR%\BuildTools_Full.exe" /NoRefresh /NoRestart /NoWeb /Q | |
:install_vcredist | |
if exist "%windir%\System32\vcruntime140.dll" goto install_winsdk10 | |
echo Installing 'VC++ Redist'... | |
start "" /WAIT "%DIR%\vc_redist.x64.exe" /quiet /norestart | |
start "" /WAIT "%DIR%\vc_redist.x86.exe" /quiet /norestart | |
:install_winsdk10 | |
if exist "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\CorFlags.exe" goto install_fxcop14 | |
echo Installing 'Windows SDK 10'... | |
start "" /WAIT "%DIR%\sdksetup.exe" /quiet /norestart | |
:install_fxcop14 | |
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe" goto install_end | |
echo Installing 'FXCop 14'... | |
pushd | |
cd /D c:\ | |
"%JAVA_HOME%\bin\jar.exe" xf "%DIR%\fxcop14.zip" | |
popd | |
:install_end | |
echo Everything installed. | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See StackOverflow Run FxCop 14.0 without installing Visual Studio 2015