I'm sure this is simple but I can't quite find out how to do it in Visual Studio. How can I specify the DLL names in the \bin directory when the application is deployed - even with "Use fixed naming and single page assemblies" option checked, it still appends "random" characters to the DLL name.
2 Answers
When you use the -fixednames
option, aspnet_compiler.exe
does not enable you to name the resulting assemblies, or to be able to produce just one or a few assemblies.
A separate merge utility named aspnet_merge.exe
enables you to combine and manage the assemblies created by the compiler.
The merge tool enables you to combine:-
- All assemblies generated by ASP.NET (not custom assemblies) in a precompiled Web site into a single named assembly.
- All Web UI content assemblies into a single named assembly.
- Web UI content assemblies into an assembly for each folder in the Web site
Refer this article on MSDN for more details on how you can combine the compiler with the merge tool to get more flexibility for your output and its naming.
Note: Using the merge tool still doesnt allow you to explicitly name EACH precompiled dll but what it does is based on option 1 / 3 above, give you a lot more flexibility

- 10,283
- 1
- 34
- 58
I'm not sure this can be done. Using the "fixed naming" option just ensures that the assembly names will be the same every time you publish the web site.
It is possible that you have several pages/controls with the same name (e.g. somePage.aspx) in different sub-directories of your application. If the publishing wizard didn't generate some random file-names, then you would end with conflicting assembly names.
One option you have, is to convert the web site project to a web application project (see here for details). Then you will end up with just one DLL in the bin folder.