Posts

Showing posts from June, 2012

How to create a batch command file to build your Visual Studio Solution

Create a batch file ".bat" file under the same directory of your solution and paste the following commands into that file. net stop w3svc @echo off setlocal pushd "%~dp0" set MSBUILDEXE=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe if not exist "%MSBUILDEXE%" (     echo Microsoft Build Engine ^(MSBuild^) 4.0 does not appear to be      echo installed on this machine, which is required to build the      echo solution.     exit /b 1 ) for %%i in (debug release) do if exist "%MSBUILDEXE%" "%MSBUILDEXE%" MySolutionNameHere .sln /p:Configuration=%%i popd net start w3svc Save the file in your solution directory. Replace the " MySolutionNameHere .sln " with your solution name. Run the batch file