views:

280

answers:

3

When compiling an ASP.NET 2.0 App names MySite for deployment I get a series of assemblies that resemble something like "bin/APP_xyz123.dll", "bin/APP_xyz456.dll" and so on.

Everything works fine but if I make a small code change I have to update the entire site because the "_xyz123" and "_xyz456" part of the assembles names change with each new build.

What I desire is to have one assembly called MySite.dll that I can update as needed, right now there is no clear way to accomplisht this. Does anyone know a way I can create the desired outcome I want?

+2  A: 

In 2005 and 2008 there are two options for creating a website--the WebSite project and the Web Application project.

The WAP is the one you want. Its available by default in 2008, but you have to download an update in 2005 to get it.

You can read more about it on the Gu-ster's blog.

Will
+1  A: 

Yes, WAP project you want. And you need to add a Web Deployment Project (.wdproj). Then in the property pages you go to the Output Assemblies page and you select the option you want (sounds like you would want 'Merge all pages and control outputs to a single assembly') and you give it the name you want (mysite.dll).

All cs files (in App_code and page behind files) will be merged into this single dll (if that's the option you select).

Then everytime you compile just copy the output from the wdproj debug or release folders (if no aspx pages changed you can just copy the dll.

Ricardo Villamil
Joe
A: 

Another option is to use the aspnet_merge.exe tool which can generate a single assembly for your application.

Todd Smith