473,473 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to do a build in the background with command prompt

Hello,

I'm using C# .NET. Is there a way to do a build my project and solution
with command prompt? I hope that while it's doing that, at least I can
browse around the code instead of being stuck with un-responsive IDE during
build started in IDE.

That would save me lots of time.
Thanks!


Jul 21 '05 #1
6 2048
You can use the command-line compiler (csc.exe), but it can be pretty
complicated to translate all the work the IDE does into the appropriate
command-line arguments.

A simpler solution might be to use a build tool like NANT.
http://nant.sourceforge.net/
I believe they have a "Solution" action (might be part of NantContrib)
that allows you to build your solution by specifying the .sln file -
much simpler than trying to figure it all out for csc.exe.

Zeng wrote:
Hello,

I'm using C# .NET. Is there a way to do a build my project and solution
with command prompt? I hope that while it's doing that, at least I can
browse around the code instead of being stuck with un-responsive IDE during
build started in IDE.

That would save me lots of time.
Thanks!

Jul 21 '05 #2
Zeng <Ze******@hotmail.com> wrote:
I'm using C# .NET. Is there a way to do a build my project and solution
with command prompt? I hope that while it's doing that, at least I can
browse around the code instead of being stuck with un-responsive IDE during
build started in IDE.


You can run devenv from a command prompt, eg

devenv MySolution.sln /build Debug

Just be warned that if you change code during a compile, you could end
up with "interesting" results :)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #3
I tried it and got build error. It complained that my <project>.dll is being
used, if I build it in IDE doesn't complain if I build in there. Probably
it's being used by the IDE itself. Occasionally I need to attach IDE to the
asp exe to debug. Any idea how to resolve this part? Thanks for your help.

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Zeng <Ze******@hotmail.com> wrote:
I'm using C# .NET. Is there a way to do a build my project and solution
with command prompt? I hope that while it's doing that, at least I can
browse around the code instead of being stuck with un-responsive IDE during build started in IDE.


You can run devenv from a command prompt, eg

devenv MySolution.sln /build Debug

Just be warned that if you change code during a compile, you could end
up with "interesting" results :)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #4
Zeng <Ze******@hotmail.com> wrote:
I tried it and got build error. It complained that my <project>.dll is being
used, if I build it in IDE doesn't complain if I build in there.
Ah, right. You won't be able to do that, then :(
Probably
it's being used by the IDE itself. Occasionally I need to attach IDE to the
asp exe to debug. Any idea how to resolve this part? Thanks for your help.


Under Debug, there should be "Attach to process" - find ASPNET (I seem
to remember it being called that, anyway).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #5
>>Probably
it's being used by the IDE itself. Occasionally I need to attach IDE to the
asp exe to debug. Any idea how to resolve this part? Thanks for your help.

Under Debug, there should be "Attach to process" - find ASPNET (I seem
to remember it being called that, anyway).


aspnet_wp.exe on NT/2000/XP
w3p.exe on 2003
Jul 21 '05 #6
do you have an example of a full command statement with parameters to make
it work?

Thanks!

"Joshua Flanagan" <jo**@msnews.com> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
Probably
it's being used by the IDE itself. Occasionally I need to attach IDE to theasp exe to debug. Any idea how to resolve this part? Thanks for your
help.

Under Debug, there should be "Attach to process" - find ASPNET (I seem
to remember it being called that, anyway).


aspnet_wp.exe on NT/2000/XP
w3p.exe on 2003

Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ruchika | last post by:
Hi, I want to build an embedded Visual C++ project from the python script. This is what I do - evc = r'"C:\Program Files\Microsoft eMbedded C++ 4.0\Common\EVC\Bin\EVC.EXE"' proj =...
1
by: Praveena Adabala | last post by:
Hi Can i Build an ASP.NET Project from the command Prompt THank yo Praveena.
3
by: Mullin Yu | last post by:
i've created a console application, and by default the filename will be my project/solution name, ie. testCmd.exe but, can i change it during the build/deployment process to testCmdNew.com ...
2
by: Catweasel | last post by:
Hi all, I'm new to C++ and .Net but I have been giving the task of building a C++ application using NMAKE. Simple huh? I have visual studio .net installed and therefore VC++7.0. However...
6
by: Zeng | last post by:
Hello, I'm using C# .NET. Is there a way to do a build my project and solution with command prompt? I hope that while it's doing that, at least I can browse around the code instead of being...
4
by: Allan Ebdrup | last post by:
Hi I'm Using VS.Net 2003 and am trying to get the app.config file copied to the directory of the target dll by using a post build command. In Properties/Common Properties/Build Events/Post-build...
13
by: giloosh99 | last post by:
Exec, shell_exec, system, popen functions all run the process in the background. how can i get it to run the process normally. my code looks like this: <? exec("batch_file.bat"); ?> am i...
0
by: sparkw | last post by:
I collect the following messages from Usenet and make a summary. *Problem*: There is no buffer output or output prompt ( the line after output), when a mysql process is initiated in Emacs WinNT....
4
by: Ronny | last post by:
I have a mixed solution -most of its projects are in C# and some are in C++?MFC. Problem is that when I compile the solution with batch build the MFC files end up wit compilation errors, but if I...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.