views:

201

answers:

2

I am writing an application using the Microsoft enterprise library. I wrote a wrapper dll for that enterprise library dll. I want to use my wrapper in some windows form application. The problem is that every time I want to use my wrapper I get an error in the compilation that says that a reference to the enterprise library dll is missing.

I can simply solve it by supplying this reference but I think I am missing something here because I just wrapped that enterprise library dll in my dll. Why isn't the reference inherited from my wrapper project to the windows form project?

As I understand the windows form application searches the bin directory and then the GAC and if it doesn't find the wanted dll it raises an error.

The Microsoft enterprise library dll are already signed and in the GAC so what is the problem here? As I said I feel I am missing something!

+1  A: 

You must specify the library you use (and only then it searches it in the local folder and the GAC)

References are not "inherited" and as it is dynamically linked (and not included as part of your dll) they will be opened when needed.

Dani
+3  A: 

Assembly references are not transitive.

If you reference and call assembly A, which references assembly B, you don't automatically get a reference to assembly B. If your interaction with A requires types from B, you'll need to refer to B, too.

Jay Bazuzi