I have an ASP.NET website in which all pages use the same master page, but recently needed to add an additional master page to work with one particular page. I tested it in Visual Studio 2012 and everything worked just fine and dandy, and it published just fine. However, I noticed that an extra .dll is created called app_web_.dll and is referenced by my new master page. I want the code-behind of the new master page to be compiled with the main .dll like everything else, or better yet not at all since the new master page's code-behind file is empty anyways. If I delete the extra .dll and then go into the new master page and delete the reference to it, it works just fine. I just don't want to have to keep going back and deleting things on every publish. How can I get Visual Studio to stop putting that in there? I imagine it would be some sort of setting I have because I did this exact thing to 4 websites and only 2 have this mystery dll issue.
Asked
Active
Viewed 708 times
0
-
do you have any server side script on your page ? – sino Oct 07 '13 at 20:14
-
1when you have a asp.net website, each page and each file in `app_code` is compiled to DLL. But here you saying "main Dll" - now it sounds that you have web application. So which one you have? – T.S. Oct 07 '13 at 20:21
-
Convert from web site project to web application project? – SLaks Oct 07 '13 at 20:29
-
sino, no server side scripts in the page. T.S., it's a web application that compiles all the code behind into one dll called organizationApp.dll. That's the only .dll I want to have. I've been told by another .NET developer that the project was originally created incorrectly (I didn't create the project, but rather inherited it.) and that is part of the issue. SLaks, converting the project is something we'd like to do, but I just want to get it working for now because I'm not sure how long it will be until we do this. – Keith Salmon Oct 07 '13 at 20:53
-
It seems that we've found an alternative to the additional master page so that may remedy the situation, but the app_web_.dll is still a weird issue, especially since I only had it with 2 out of 4 sites. For the future, how do I instruct Visual Studio which files to compile into a particular .dll? – Keith Salmon Oct 07 '13 at 20:55
-
[aspnet_merge.exe](http://msdn.microsoft.com/en-us/library/aa479044.aspx) can take your DLLs and merge them into one - you'd have to set it up in your build process. – Joe Enos Oct 07 '13 at 21:11
-
I think, in web.config you can tell which files to exclude from compile. Make sure that you don't have anything in your `app_code`, and generally, don't have `app_code` folder. I believe that even if it is web application, the asp.net will still find app_code folder and build things inside of it. – T.S. Oct 07 '13 at 21:18