Henning,
Not always, though. It happens when MyProject.A use classes from
Gentle.Framework as base classes or implements interfaces. In this case the
compiler needs to have reference to the Gentle.Framework assembly because
now you basically uses a class from Gentle.Framework is part of the
declaration of a class in MyProject.A.
Look at it this way - if in MyProject.B you wan to instantiate some class
declared in Gentle.Framework and you didn't add a reference to it, the
compiler will complain and you will add this reference without saying a
word. The situation is almost the same - now you don't isntantiate this
class directly, but it is instantiated as part of the class declared in
MyProject.B so you need to add reference to assembly(ies) for all base
classes and intefaces.
HTH
Stoitcho Goutsev (100) [C# MVP]
"Henning Möller" <he*****@moeller-mingers.de> wrote in message
news:dm**********@online.de...
I've got a solution with two projects. One of those (namespace
MyProject.A) is using a library (e.g. Gentle.Framework). The other
(namespace MyProject.B) is only using classes from MyProject.A.
When compiling the stuff, I get an error message saying that an assembly
reference to Gentle.Framework is needed in MyProject.B. Why is this? I
don't explicitly use anything from Gentle.Framework from within
MyProject.B. Shouldn't the idea of Packages be to hide information about
the implementation. Why has MyProject.B to link to Gentle.Framework just
because MyProejct.A uses that framework for its implementation?
TIA,
Henning.