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

2 Responses to How to Build your Solution with Visual Studio Command Prompt

  1. Alex says:

    The following link is related to asp.net applications,
    http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt.aspx

  2. Pingback: Setting up Qt 4.8.5 for Visual Studio 2008 x86 and x64 | Achint's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: