find a location for property in a new city

Tuesday, 23 October 2012

Build Visual Studio solutions without Visual Studio

I have a project that has four separate Visual Studio solutions. It is a bit annoying when I do an update from SVN and have to open each solution in Visual Studio just so I can build them. Visual Studio is hardly a lightweight program so surely there's a simpler way?

Most sys admins or developers accustomed to automated builds will probably start to titter at this point, but you can do it easily using NotePad (and the various stuff already installed on your dev machine). I don't want a mega complex system to deploy in a special way to a different server using expensive software, I just want to build everything without having to load many Visual Studio instances. So here is how.

Simple way to build all solutions with a batch file

First open NotePad and write the following code:

@echo off
CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
MSBUILD /v:q C:\Projects\Forums\Forums.sln
MSBUILD /v:q C:\Projects\MainSite.sln
MSBUILD /v:q C:\Projects\Users\UserMgmt.sln
MSBUILD /v:q C:\Projects\Core\Global.sln

Save this as something like BuildAll.bat then whenever you want to build everything just double click this file.

What was that?! Explain (a bit)

To use MSBUILD you must be running the Visual Studio command prompt but by default batch files run in normal compand prompt so line 2 enables all the Visual Studio-ness. Also, I added the /v:q parameter so that MSBUILD wont output every little detail about the build, just the important bits (PASS/FAIL).

Follow britishdev on Twitter


  1. I am a student of computer science and I am following your blogs from the last six months. This post is very informative for me which is about Build Visual Studio solutions without Visual Studio. I have always got some useful stuff from your experience which you share with us in your blog.
    Get safety flooring from uk

  2. This Blog is really useful. Please update more and thank you.

  3. Totally agree with guys, this is usefull blog. For this I can only add, that I found a storage of msvcp140.dll missing. To fix some kind of errors, which may show you program. Useful website, as for me.

  4. By taking the time to read a lot of information like this to add my insight . cara menggugurkan kandungan

  5. This article is very great, its content is the most unique and its website design is also very good. The speed of the website is also fast. I very much liked to share the blog very much thanks.

  6. Motifz Designer Lawn. 1, 2 & 3 Piece Unstitched Premium Embroidered Lawn 2019, Premium Lawn, Lawn 2019, Best lawn collection, Motifz, Best Lawn in Pakistan, Shipping worldwide. Stitching option available.

  7. Buy Premium lawn Online for Women's at best prices available at Motifz. ✓ Latest Fashion, ✓ Trendy Designs ➤ Shop Now!

  8. This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this..

  9. This comment has been removed by the author.

  10. This is really unbelievable and extraordinary work. Everyone should read. Thanks for sharing and don't miss WORLD'S BEST