Answers from stackoverflow.com:
5
With VS2008 you can do this:devenv solution.sln /build configuration
linkflag
answered Aug 29 '08 at 6:38
Agnel Kurian3,129●10●24
This way always seems the easiest. – Aardvark Sep 25 '08 at 22:53
add comment
9
\Windows\Microsoft.NET\Framework\[YOUR .NET VERSION]\msbuild.exe
Lots of command line parameters, but the simplest is just:msbuild.exe yoursln.sln
linkflag
answered Aug 23 '08 at 20:46
FlySwat21.5k●3●31●98
add comment
2
nant and msbuild are the most popular tools to automate your build in .net, and you can can find a discussion on there the pros/cons of each in this question "best .net build tool"
linkflag
edited Aug 23 '08 at 21:02
answered Aug 23 '08 at 20:52
alanl323●2●7
add comment
2
Look into build tool NAnt (http://nant.sourceforge.net/) or MSBuild (http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx). I believe MSBuild is the build tool for VS2005+, I am however a fan of NAnt...
linkflag
answered Aug 23 '08 at 20:43
mmattax5,274●2●11●46
add comment
1
As of VS2005, all of the project files (at least for .NET based projects) are actual MSBuild files, so you can call MSBuild on the command line and pass it the project file.
Bottom line is that you need to use a "build scripting language" like NAnt or MSBuild (there are others, but these are the mainstream ones right now) if you want to have any real control over your build process.
linkflag
answered Aug 28 '08 at 17:09
Scott Dorman9,212●9●29
add comment
1
Simplest way: navigate to the directory containing the solution or project file, and run msbuild (assuming you have Visual Studio 2005 or newer).
More flexible ways:
read up on the MSBuild reference. There's tons of customization, especially once you've installed the community tasks.
use NAnt. It has existed for longer than MSBuild and has more community support, but requires you to start a project file from scratch, rather than extending the existing, VS-created one.
linkflag
answered Aug 23 '08 at 20:44
Sören Kuklau4,660●6●18
add comment
0
I had to do this for a C++ project in Visual Studio 2003 so I don't know how relevant this is to later version of visual studio:
In the directory where your executable is created there will be a BuildLog.htm file. Open that file in your browser and then for each section such as:Creating temporary file "c:\some\path\RSP00003C.rsp" with contents[/D "WIN32" /D "_WINDOWS" /D "STRICT" /D "NDEBUG" ..... (lots of other switches).\Project.cpp.\Another.cpp.\AndAnother.cpp".\And Yet Another.cpp"]Creating command line "cl.exe @c:\some\path\RSP00003C.rsp /nologo"
create a .rsp file with the content between the square brackets (but not including the square brackets) and call it whatever you like. I seem to remember having problems with absolute paths so you may have to make sure all the paths are relative.
Then in your build script add the command line from the BuildLog.htm file but with your .rsp filename:cl.exe @autobuild01.rsp /nologo
Friday, September 11, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment