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 / Visual Studio.NET / General / January 2005

Tip: Looking for answers? Try searching our database.

abort a C++ configuration build using command line ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
palaga - 03 Jan 2005 13:13 GMT
I'm on a CShrap tool to manage compilation of C++ projects using visual net
command line.
To build a specific configuration of my solution, I use the
System.Diagnostic.Process object, giving it this command line :

devenv.com /build "my solution configuration" "my solution".

I use .com extension fort devenv because I want to redirect standard output
into my Process to get compilation result on the fly.
I also don't want any IDE or window to open, I want the build to be
transparent to the user.
So by using this Process with correct parameters, everything works fine, the
build start, and during the build, window task manager tells me there are :
devenv.com, devenv.exe & cl.exe processus running.

my problem : I would like to be able to abort this compilation from withi my
CSharp tool...
If I try process.CloseMainWindow( ), it returns false because the process
has no windows, and so no message loop.
The doc tells me that the only way to stop a process that has no window is
to use Kill( ).
But if I call Kill( ), it does stop the devenv.com processus, but devenv.exe
& cl.exe keep running !
All the more, once cl.exe stops because a module build has finished,
devenv.exe starts another cl.exe for the next module, although devenv.com
does not run any more !!

So, calling Process.Kill( ) does not stop compilation ! It only stops
devenv.com... the build keeps going until it has finished the whole solution
configuration !

How can I stop the complete build process chain ?
Is there something I'm doing wrong ? Is there another way to start an
invisible build of a solution configuration, with more control on it, and
with the ability to redirect output to my tool ?

thanks
Sundari - 04 Jan 2005 10:47 GMT
Hi

Please read up this article from MSDN. This is an alternate solution to
automating a build process.

http://msdn.microsoft.com/vstudio/downloads/samples/automation2002/

Regards
Sundari.

> I'm on a CShrap tool to manage compilation of C++ projects using visual net
> command line.
[quoted text clipped - 33 lines]
>
> thanks

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.