Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2006

Tip: Looking for answers? Try searching our database.

Building from command line

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
flopbucket - 14 Jun 2006 15:05 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.