How do I compile an ASP.NET website into a single DLL file? How do I compile an ASP.NET website into a single DLL file? asp.net asp.net

How do I compile an ASP.NET website into a single DLL file?


You might prefer to use the web application project style for that.

You can use ILMerge to merge assemblies into one.


To accomplish this you will have to covert your project into a Web Application Project (Supported in Visual Studio 2005 SP1 and Visual Studio 2008).

The process of converting is not that hard, but you will need to move everything out of the app_code folder, as WAP (Web Application Projects) projects do not have code inside app_code.

Once you do this, everything inside your project is compiled into a single DLL file, any external assemblies are still contained in their own DLL files though, but there are options around that as well.