471,357 Members | 1,145 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,357 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 1977
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ruchika | last post: by
1 post views Thread by Praveena Adabala | last post: by
2 posts views Thread by Catweasel | last post: by
4 posts views Thread by Allan Ebdrup | last post: by
13 posts views Thread by giloosh99 | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.