473,241 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

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 2041
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
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.