Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you automate a Visual Studio build?

How do you turn a Visual Studio build that you'd perform in the IDE into a script that you can run from the command line?

like image 862
Sam Hasler Avatar asked Aug 23 '08 20:08

Sam Hasler


People also ask

What is Automated build script?

Build scripts are the first step toward automating your build. These scripts come in all shapes and sizes – they can be shell or batch scripts, XML-based, or written in a custom or an existing programming language; they can be auto-generated or hand-coded; or they can be totally hidden inside an IDE.


2 Answers

With VS2008 you can do this:

devenv solution.sln /build configuration 
like image 144
Agnel Kurian Avatar answered Oct 11 '22 07:10

Agnel Kurian


\Windows\Microsoft.NET\Framework\[YOUR .NET VERSION]\msbuild.exe 

Lots of command line parameters, but the simplest is just:

msbuild.exe yoursln.sln 
like image 32
FlySwat Avatar answered Oct 11 '22 08:10

FlySwat