views:

230

answers:

3

Scenerio: I have an asp.net website that I am compiling successfully but keep getting an error in the browser saying that it can not find a referenced dll in the solution. I checked the directory in the Temporary ASP.NET File location and all of my referenced dll's are there except for the one it is failing to retrieve. I manually added the location it was looking for and the site worked. The dll is referenced in code so it should have been moved to the temp folder. Does anyone have any idea why this would happen? I checked the properties on the referenced dll and copy local is set to true so it should be moved to the output directory.

A: 

Right click on the DLLs in your References/Bin directory in your project and look at the Copy Local property. Make sure they are set to True.

Nissan Fan
That property is marked true for all DLLs
TampaRich
A: 

When you say "referenced in code" do you mean it's listed in the project file's Reference section? Or do you mean you are manually referring/naming it in your source code?

Have you tried this in your web.config (or higher up the config chain?)

<hostingEnvironment shadowCopyBinAssemblies="false" />

Where exactly are you expecting it to be copied? What is the path the error message is reporting?

Bryan
Bryan, I am adding a dll as a reference. When the application compiles it builds folder in the Temporary ASP.NET folder. What is happening is I have a custom configuration section that uses that assembly but was not loading since it could not find it in the temp folder location. All the other assemblies were in the temp folder that I referenced. It could not load the config section since that assembly was not found
TampaRich
A: 

After hours of searching google and finding nothing, I decided to take a look at the actual properties of the dll file. To my surprise the issue ended up being permissions. For some reason the one dll that was beating me up all day needed correct permissions to be moved to the output folder. ughhh.

TampaRich
Interesting... what permission was missing? You should mark your answer, I can see this coming up again for others.
Bryan