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
CT - 14 Jun 2006 15:28 GMT
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

Signature
Carsten 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)
---------
> Hi,
>
[quoted text clipped - 9 lines]
>
> Thanks
Barry Kelly - 14 Jun 2006 16:06 GMT
> 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:
[quoted text clipped - 3 lines]
> This build fine, however, it seems that is starts a background process
> and the command prompt returns immediately.
The Windows command prompt returns, yes, but on a different command
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

Signature
http://barrkel.blogspot.com/
Michael Nemtsev - 14 Jun 2006 18:09 GMT
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