Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Alternate builds in .NET

(This relates to my other question below...)  I'm working on a project where it's a requirement that the whole thing compiles to a single .exe file; no DLLs or other external references besides a database.

So my build builds to a .exe file.  But I'm wondering if either of these things is possible, and if so, how I do them:

1)  Debug build to a DLL, and Release build to an EXE.  I know I can change the Project Properties and do this, but is there a way to automatically have the Debug version compile to a DLL while Release compiles to an EXE?

2)  Swallow up a DLL.  By which I mean compiling to DLLs as well as an EXE in Debug mode, but having Release mode compile to a single EXE containing everything, including the DLL contents.

1) is probably more feasible, but can anybody tell me how to go about this?

Kyralessa
Friday, May 13, 2005

This is possible and most easily done with nant.

TownDrunk
Friday, May 13, 2005

First, use a build engine such as Nant. I use FinalBuilder.

Next, your build script should compile from the command-line, and should have 2 paths - one for Release and one for Testing.

Finally, XenoCode is a reasonable obfuscator which also has the option of packaging your whole app into a single EXE.

Note in passing that XenoCode can even link the .NET runtime assemblies, although your end-users will still need to have a version of the .NET Framework installed.

Mark Pearce
Monday, May 16, 2005

By the way, the threads leading up to (and following on from) are what directly led to IDisposable and using. It was ... a very noisy debate. :)

Brad Wilson [MSFT]
Tuesday, May 17, 2005

Bizarre. Posted to the wrong thread!

Brad Wilson [MSFT]
Tuesday, May 17, 2005

*  Recent Topics

*  Fog Creek Home