How to make ASP.NET 2.0 web application compile as 1.1 application?

When I compile ASP.NET 2.0 MySite application names for deployment, I get a series of assemblies similar to "bin / APP_xyz123.dll", "bin / APP_xyz456.dll", and so on.

Everything works fine, but if I make a small change in the code, I need to update the entire site, because some of the names "_xyz123" and "_xyz456" change in every new build.

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

0


source to share


3 answers


Yes, the 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 (it seems that you need to "Merge All Pages and Control Outputs to One Assembly"), and you give it the desired name (mysite.dll).

All cs files (in App_code and pages by file) will be merged into this single dll (if you choose that option).



Then every time you compile, just copy the output from the debug or release folders of wdproj (if none of the ASPX pages have changed, you can just copy the dll.

+1


source


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

WAP is the one you want. It's available by default in 2008, but you'll need to download the 2005 update to get it.



You can read more about this in the Gu-ster Blog.

+2


source


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

0


source







All Articles