简体   繁体   中英

How do I make an ASP.NET 2.0 Web App compile like a 1.1 App?

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?

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.

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.

另一个选择是使用aspnet_merge.exe工具,该工具可以为您的应用程序生成单个程序集。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM