Which batch file command launches and builds and compiles a VS2008 solution file?
I am writing a Windows batch script in order to automate the process of launching Visual Studio 2008, building and compiling the solution file, so that instead of manually launching VS2008 and then pressing F5, I can just run my batch file (or perhaps call it).
However, the command below doesn't seem to do the job:
devenv /build debug开发者_高级运维 "C:\Program Files\MobileRobots\Aria\examples\myProg.sln"
Can someone please guide me through writing this batch file?
Thank you,
try devenv "C:\Program Files\MobileRobots\Aria\examples\myProg.sln" /build
Your best bet is to use MsBuild which can be called from the command line - here's the Microsoft reference for it.
You would do something like this: msbuild "mysolutionname".sln.
MsBuild itself would reside in the .Net framework folder. It would be quicker as it avoid you having to have Visual Studio launch when doing a build
You can pass parameters to it to control the build such as /p:Configuration=Release to do a release build on the solution
精彩评论