Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reference assembly NOT in same folder as app?

Status
Not open for further replies.

millerk

Programmer
Jul 5, 2002
133
US
My C# app needs to reference a .Net assembly that was built by one of our previous developers. Everything works fine when I add a reference to the dll and leave "Copy Local" set to true.

But this dll is used by several different applications and on several different machines and already has it's own setup package that puts it in a particular folder. I'd rather not have to include another copy of this dll with my app, but I can't figure out how to tell my app to look for it in a different location.

I found an article that looks like it explains how to do this. But should it really be this complicated? If so, it makes me wonder if this is the wrong way to go about this? I'm fairly new to .Net, so I'm wondering if there is a better way to install assemblies that you want multiple apps to be able to use. I know about the GAC, but I don't know enough to know if that's a better way to go or not.

Any advice is appreciated.

Thanks
 
Option #2 - the .config file is your best bet. If there are more dll's located in different places, or if the location of this dll changes you can specify right in the config.

I would recommend that option.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top