C# Class library within Class Library
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 cr开发者_如何学Ceated (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?
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.
精彩评论