Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 829
Scott and the Dev Team Avatar asked Oct 21 '08 15:10

Scott and the Dev Team


People also ask

What is DLL in asp net?

A DLL is a library that contains code and data that can be used by more than one program at the same time. For example, in Windows operating systems, the Comdlg32 DLL performs common dialog box related functions. Each program can use the functionality that is contained in this DLL to implement an Open dialog box.

How do I save a Visual Studio as DLL?

Open your Visual Studio 2015 preview, go to the file menu, go to the new, go with the project, from the template field select C#, select Class Library then name it as you want. Save it at an appropriate place. So from the browse button you can select the appropriate location for saving the DLL.

Can we convert DLL to source code?

Right-click on the DLL that you want to convert. Hit “Export to Source Code” option. You will see the below page on the window.


2 Answers

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

You can use ILMerge to merge assemblies into one.

like image 166
Cristian Libardo Avatar answered Sep 23 '22 21:09

Cristian Libardo


The way we do it is by adding a deployment project to our site:

http://msdn.microsoft.com/en-us/asp.net/aa336619.aspx

like image 23
John Avatar answered Sep 21 '22 21:09

John