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, .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?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.