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

Scott and the Dev Team picture Scott and the Dev Team · Oct 21, 2008 · Viewed 49.3k times · Source

I have finally finished my web site. I published it, and I was surprised at the results. Although the App_Code compiled into a single DLL file, every page's code behind compiled into its own DLL file. How do I make it so that it is one DLL file?

Also, is it possible to compile everything (SubSonic, AJAX, etc.) into that same single DLL file?

Answer

Cristian Libardo picture Cristian Libardo · Oct 21, 2008

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

You can use ILMerge to merge assemblies into one.