views:

26

answers:

1

I have a C# solution in VS2010 that contains three projects. This solution has a client project (A) and a server project (B) which both build into applications. The third project (C) is where my classes that are common to both projects go (like a utility library) and this is built into a class library, which I reference in both the client and the server.

Now I want to reference a 3rd party library in my common library (C). I reference the dll and everything seems fine, I am able to use it within that project. However, when I try to use the class I created (that makes reference to the dll) in either the client or server, I get a FileNotFoundException (In regards to the 3rd party library).

I also tried to reference the 3rd party library in my client and server project as well as in the common code project, but the error is still occurring.

I also saw this question here, http://stackoverflow.com/questions/1056892/net-multiple-class-library-in-one-library, which suggests to me that you can reference a class within a class, so how would I go about doing it?

+2  A: 

You need to copy the 3rd-party DLL, and all of its dependencies, to the folders containing your executables.

You can do that by setting Copy Local to true in the properties of the references.

SLaks
Cheers! The dependencies (of the 3rd party dll) weren't being copied. Although it seems my references have copy local set to true by default. I only had to copy the missing dependency manually.
themartinmcfly