How to Build your Solution with Visual Studio Command Prompt

Working with command prompt always been a nice job, it helps you to schedule your routines and gives you more understanding of what’s going on the background. You will give more and on-time information; you can check the result as they happen. You can create a batch fileto build your solutions one after another and many other advantages.Visual Studio command prompt gives you all of the simple windows command prompt abilities plus some tools to control build and publish your source codesand many other abilities which you can find here. You can run Visual Studio command prompt from

Start Menu \ Visual Studio [2005|2008|2010] \ Visual Studio Tools \ Visual Studio 2008 Command Prompt

You can use other prompts like – Visual Studio 2008 x64 Cross Tools Command Prompt – for general x64 system. None of them are different; the only difference is that they are provided for different platforms. As it is hard to run Visual Studio Command Prompt from Windows Task manager, you have to call it from a simple Command Prompt; it means that you have to run the following command in your Command Prompt. After that Visual Studio tools will include into your simple command prompt.

call "C:\Program Files (x86) \ Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64

x86_amd64 will call x64 Cross Tools. To build your solutions you can use following commands

MSBuild YourSolution.sln /p:Configuration=Release

Note that you can use a path like MSBuild D:\src\YourSolution.sln for your projects. As you all know .NET provide two different type of output for each project, Debug & Release. To specify the type of output you can use following code

MSBuild D:\src\YourSolution.sln /p:Configuration=Release