views:

1010

answers:

4

Hi in .NET on my local machine I have a reference to a DLL on my local assembly folder. I was wondering how I can "package" this dll with the deployment of my website? When I deploy on the staging serer it is complaining that it does not have that dll. (It is not in the GAC of the staging server). Thank you.

+1  A: 

Have you tried setting the DLL reference to CopyLocal = true?

Judah Himango
Its not even in my DLL reference, its in my GAC.
DavidS
if it's on GAC you need to have some reference in the web.config!
balexandre
+1  A: 

Visual Studio Save the Reference Location as relative paths so put in the a folder in your project and make sure the it proprieties "Copy Local" is true, it will make the VS to copy the file to the output directory.

Baget
How can I reference a dll thats in my assembly folder? It's not letting me.
DavidS
Why not? you add new reference -> Existing -> Goto the Assembly folder
Baget
+2  A: 

If your referenced DLL will not be in the GAC of the targeted computer then you should place the DLL in your web site's \bin folder. For asp.net websites, referenced DLLs must exist in the GAC or in the \bin folder. Alternatively, you could install your DLL into the GAC of your target computer using something like a WebSetup project.

Ken Browning
A: 

I think this will help you.

http://www.tipscentre.net/Details/Copy-DLL-From-GAC-Assembly.aspx

Regards,

Naveed Mazhar