.NET References Interface Dll

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • peridian
    New Member
    • Dec 2006
    • 72

    #1

    .NET References Interface Dll

    Hi,

    Thought I knew how this should work, but I don't understand what the compiler is up to.

    I have a 3rd party dll, in which an interface is defined.

    I have my own class library in which I define a class that implements that interface. The class library project references the 3rd party dll to access the interface.

    I have a WinForms project that references the class library project in order to use that class.

    However, for some reason when I try to use that class in the WinForms project, the compiler complains that there is no reference to the 3rd party dll. But I am not using the interface in any of my code, only the class I wrote.

    My understanding was that if I reference a library, I do not also need to reference the libraries referenced by that library (coz that would become stupid in a big system).

    Why would the compiler want to reference the 3rd party dll?

    Regards,
    Rob.
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    Because youre DLL has impemented the interface of the 3rd party DLL...
    Whenever you'll be using your dll in any of your projects the 3rd party DLL will also be required

    Comment

    Working...