Build Visual Studio project through the command line

Create a .bat file called: Manual_MSBuild_ReleaseVersion.bat Put this in the .bat file. REM you’ll have to find the “latest” version of where msbuild.exe resides on your machine.. here are some popular versions/locations REM set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v2.0.50727 REM set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v3.5 REM set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319 REM set msBuildDir=C:\Program Files (x86)\MSBuild\12.0\Bin set msBuildDir=C:\Program Files (x86)\MSBuild\14.0\Bin call “%msBuildDir%\msbuild.exe” MySolution.sln /p:Configuration=Release /l:FileLogger,Microsoft.Build.Engine;logfile=Manual_MSBuild_ReleaseVersion_LOG.log …

Read more

How can I run a PowerShell script with white spaces in the path from the command line?

The -File parameter If you want to run powershell.exe -File from the command line, you always have to set paths with spaces in double quotes (“). Single quotes (‘) are only recognized by PowerShell. But as powershell.exe is invoked (and hence the file parameter processed) by the command line, you have to use “. powershell.exe …

Read more