@ECHO OFF REM == CONFIGURATION SECTION == SET VSSOLUTION=HeuristicLab.Visualization.sln SET /P CONFIGURATION=Which configuration to build [Debug]: IF "%CONFIGURATION%"=="" SET CONFIGURATION=Debug SET /P PLATFORM=Which platform to build [Any CPU]: IF "%PLATFORM%"=="" SET PLATFORM=Any CPU REM == END CONFIGURATION SECTION == REM First find the path to the msbuild.exe by performing a registry query FOR /F "tokens=1,3 delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"') DO IF "%%A"=="MSBuildToolsPath" SET MSBUILDPATH=%%B REM Then execute msbuild to clean and build the solution REM Disable that msbuild creates a cache file of the solution SET MSBuildUseNoSolutionCache=1 REM Run msbuild to clean and then build %MSBUILDPATH%msbuild.exe %VSSOLUTION% /target:Clean /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /nologo %MSBUILDPATH%msbuild.exe %VSSOLUTION% /target:Build /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /nologo PAUSE