Building a solution outside of visual studio

M

Mani

Can you build a solution from the command prompt? like so "c:\ build
mysolution.sln" or do you always have to manually open the solution
in Visual Studio and click "build"

Second Question is if you can build from the command prompt, can you
write a program that builds a solution from the command prompt?
Say i write a program called "SolutionBuilder", and in this program i
have a button called "BuildButton" which when it is pressed will build
a solution by opening the command prompt and typing the soutions name
and the build command. has this been done or can it be done?
 
M

Michael Nemtsev

Hello Mani,

Use NAnt or MSBuild tools for this. It's very popular tools to create build
servers


M> Can you build a solution from the command prompt? like so "c:\ build
M> mysolution.sln" or do you always have to manually open the
M> solution in Visual Studio and click "build"
M>
M> Second Question is if you can build from the command prompt, can you
M> write a program that builds a solution from the command prompt?
M> Say i write a program called "SolutionBuilder", and in this program i
M> have a button called "BuildButton" which when it is pressed will
M> build
M> a solution by opening the command prompt and typing the soutions name
M> and the build command. has this been done or can it be done?
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 
J

John Vottero

Mani said:
Can you build a solution from the command prompt? like so "c:\ build
mysolution.sln" or do you always have to manually open the solution
in Visual Studio and click "build"

Try:

MSBUILD mysolution.sln /t:Rebuild /p:Configuration=Release
Second Question is if you can build from the command prompt, can you
write a program that builds a solution from the command prompt?
Say i write a program called "SolutionBuilder", and in this program i
have a button called "BuildButton" which when it is pressed will build
a solution by opening the command prompt and typing the soutions name
and the build command. has this been done or can it be done?

Try:

System.Diagnostics.Process.Start(
"MSBUILD.EXE",
"mysolution.sln /t:Rebuild /p:Configuration=Release");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top