|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Building from command lineHi,
We are using Visual Studio.NET 2003 and need to build from command line for integration with Cruise Control. Reading the docs, I see I can do: c:\> devenv.exe /clean Debug example.sln This build fine, however, it seems that is starts a background process and the command prompt returns immediately. I need it to work like a normal "make" in that it does not exit until the build completes/fails, etc. Is there a way to do this? Thanks Are you using the Executable <exec> task? You might want to try the Visual
Studio task <devenv> http://ccnet.sourceforge.net/CCNET/Visual%20Studio%20Task.html -- Show quoteHide quoteCarsten Thomsen Communities - http://community.integratedsolutions.dk --------- Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything. (Karl Lehenbauer) --------- "flopbucket" <flopbuc***@hotmail.com> wrote in message news:1150293912.126994.171850@i40g2000cwc.googlegroups.com... > Hi, > > We are using Visual Studio.NET 2003 and need to build from command line > for integration with Cruise Control. Reading the docs, I see I can do: > > c:\> devenv.exe /clean Debug example.sln > > This build fine, however, it seems that is starts a background process > and the command prompt returns immediately. I need it to work like a > normal "make" in that it does not exit until the build completes/fails, > etc. Is there a way to do this? > > Thanks > "flopbucket" <flopbuc***@hotmail.com> wrote: The Windows command prompt returns, yes, but on a different command> We are using Visual Studio.NET 2003 and need to build from command line > for integration with Cruise Control. Reading the docs, I see I can do: > > c:\> devenv.exe /clean Debug example.sln > > This build fine, however, it seems that is starts a background process > and the command prompt returns immediately. prompt (such as the Cygwin Bash command prompt), it doesn't. What happens if you put it in a Makefile or somesuch? Have you tried writing a little utility like: ---8<--- using System; using System.Text; using System.Diagnostics; class App { static int Main(string[] args) { try { Process process = new Process(); StringBuilder argList = new StringBuilder(); for (int i = 1; i < args.Length; ++i) argList.AppendFormat(" \"{0}\"", args[i]); process.StartInfo = new ProcessStartInfo( args[0], argList.ToString()); process.Start(); process.WaitForExit(); return process.ExitCode; } catch (Exception ex) { Console.Error.WriteLine(ex.Message); return 255; } } } --->8--- and running: WaitFor devenv /clean Debug example.sln ? (Disclaimer: I no longer have VS 2003 installed, so I tested with VS 2005.) -- Barry Use console csc.exe from the .NET SDK
f> We are using Visual Studio.NET 2003 and need to build from command f> line for integration with Cruise Control. Reading the docs, I see I f> can do: f> f> c:\> devenv.exe /clean Debug example.sln f> f> This build fine, however, it seems that is starts a background f> process and the command prompt returns immediately. I need it to f> work like a normal "make" in that it does not exit until the build f> completes/fails, etc. Is there a way to do this? --- 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 Nietzsche
Other interesting topics
Efficient regular expression pattern ?
Can we use dlls build with VS2005 with old apps? How to define Type T for List<T> at runtime 2.0 smtpclient permission mystery sending fax using .NET Save running assembly to disk. Memory leak when SmtpMail and MailMessage are used. Ending an app programmatically Missing ASP.NET tab in IIS , last but not least! ReportingService is not define? (MSDN code!) |
|||||||||||||||||||||||