Jonas Stawski

Everything .NET and More

Where are thou, DLL?

One of the enhancements of Visual Studio 2005 and ASP.NET 2.0 is the runtime compilation performed by ASPNET. With ASP.NET 1.1 and Visual Studio 2003 the compilation was performed by the compiler and the result was a DLL. With the new runtime compilation for 2.0 there is no more DLL. This means you have to push all the files (including the .cs and .vb) to your webserver and ASPNET would handle the compilation. This is a very nice feature since we wouldn't have to compile a DLL for the entire application and then mvoe it to the server, instead we have to move the changed file to the web server.

Sometimes it is nice to still be able to compile the web project into a DLL. Why? You might not trust your admins and you wouldn't want them to see your code once the app is on production. You might want to develop a web application and sell it and do not wish to provide the source code. Those are two reasons I can think of right off the bat.

"Ok, I see your point! How do I compile my ASP.NET 2.0 website into a DLL?"

Easy. First you need to install Visual Studio 2005 SP1 (if you haven't done so already) by downloading it here. Please note that if you already have ASP.NET installed on your machine you most likely have support for Web Site Projects, not Web Application Projects. Web Site Projects is the default model (no DLL) for Visual Studio 2005.

Then you have to create a new project by going to File - New Project - Select the desired Language - Web - ASP.NET Web Application.

And that's it. Now you have a dll output.

Happy Programming!

Add comment