Matt Ball
Matt Ball

Reputation: 359776

How do I specify the name of the assembly created when publishing an ASP.NET Web Site Project?

The title pretty much says it all.

Given a web site project in VS2008 named FooDLL, I would like to be able to specify the name of the assembly that VS2008 spits out when I click "Publish Web Site". I am using the "use fixed naming and single page assemblies" option, so the resulting DLL is consistently named.

However, I would much rather be able to specify that the DLL is named something like FooDLL.dll (or just Foo.dll, whatever) than be stuck with the ugliness of App_Web_foo.ascx.cdcab7d2.dll.

Am I stuck since Web Sites don't have .project files (e.g. aren't projects)?

Upvotes: 2

Views: 1061

Answers (4)

Matt Ball
Matt Ball

Reputation: 359776

Not to continue the pattern of answering my own questions, but here it is anyway:

All I had to do was add a Web Deployment Project for the web site containing my user control. Though you can't specify the assembly name when building/publishing a web site, you can do this through the web deployment project. It's basically just a nice GUI for an msbuild project file... for a web site. Hooray for hacking a .project file onto a web site!

Upvotes: 2

Anwar Chandra
Anwar Chandra

Reputation: 8638

ASP.NET Merge Tool (Aspnet_merge.exe) is your way to go. It merge your web assemblies into one assembly for the whole Web site.

more information: http://msdn.microsoft.com/en-us/library/bb397866.aspx

Upvotes: 0

Spencer Ruport
Spencer Ruport

Reputation: 35107

I believe you are.

I am unaware of any benefits to using a web site project and while the benefits of using a web application project are minor, they exist. Create web application projects from now on.

Upvotes: 0

Neil N
Neil N

Reputation: 25258

You could just compile your code as a class library project, then drop it into the Bin directory of your website.

Upvotes: 0

Related Questions