Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a large C# project w/ multiple dll's referenced that I've created in MS Vis Studio 2003. It creates a Windows Application. Is it possible to compile the entire project command line and produce the same output as if I compiled it through studio? I've asked this question before, but received no answer.. :(

 

I know about csc.exe already, just can't figure out how to use it to compile the same. I don't like having to specify everything, like references, output type, etc. When i heard that c# had a command line compiler I just figured i could switch to the project directory via command line and csc.exe the .sln file and voila, output. :)

 

Any response is appreciated.

Posted

I have a batch file:

cd C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

devenv /build release C:\My Solution Dir\My Solution.sln

 

This is the easiest way I've found (I actually execute the batch file from my "builder" program and set various preprocesser flags there also).

Posted
I have a batch file:

cd C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

devenv /build release C:\My Solution Dir\My Solution.sln

 

This is the easiest way I've found (I actually execute the batch file from my "builder" program and set various preprocesser flags there also).

 

Wait! Can this be accomplished with someone who doesn't have studio installed? Instead, they would only have the framework or SDK or whatever the free stuff is.

Posted

I've got my builds automated using Nant, thereby using the C# command-line compiler in this sort of fashion. It's a damn nice utility - I have 5 projects in my solution and Nant fires through everything, runs my unit-tests (NDoc) and creates a .chm file (NDoc) at the end.

 

Best of all, these utilities I use are all open-source/free.

 

 

Wait! Can this be accomplished with someone who doesn't have studio installed? Instead' date=' they would only have the framework or SDK or whatever the free stuff is.[/quote']
Posted
Wait! Can this be accomplished with someone who doesn't have studio installed? Instead' date=' they would only have the framework or SDK or whatever the free stuff is.[/quote']

 

 

No, you need studio installed. Actually, the call to "devenv" is a call to the VS IDE to compile without actually showing the IDE. It's just so much easier than the true command line compiler (still don't know how you would compile a solution in that).

Posted
Right - I should have mentioned that - Nant just hooks into other utilities you have installed through the Framework SDK and any other (NDoc, NUnit, etc).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...