Visual-studio – How to get cmd line build command for VS solution

build-processcommand-linevisual-studio

This is probably easy but I am getting stuck: when I build a solution in Visual Studio – how do extract the exact cmd line for the current build command in order to be able to do the same build from VisualStudio console?

In the output window I can see the single projects in the solution build commands but not the one for the whole solution.

I am on VS2005.

Any help would be appreciated

Best Solution

Navigate to your Programs menu > Microsoft Visual Studio 2005 > Visual Studio Tools > Visual Studio 2005 Command Prompt.

this command prompt has all the necessary .NET environment variables set for the the command line session. You can change directory to your solution directory (e.g. c:\projects\mySolution) and run

Msbuild.exe mySolution.sln

You can see the various options available using msbuild /?

Msbuild is located at C:\Windows\Microsoft.NET\Framework\v2.0.50727

On top of msbuild /? quick-option check, you may reference the MSBuild Command Line Reference page for more explanations on its usage. And how to build specific targets in solutions.