Henning,
Not always, though. It happens when MyProject.A use classes from
Gentle.Framewor k as base classes or implements interfaces. In this case the
compiler needs to have reference to the Gentle.Framewor k assembly because
now you basically uses a class from Gentle.Framewor k 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.Framewor k 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*****@moelle r-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.Framewor k). 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.Framewor k is needed in MyProject.B. Why is this? I
don't explicitly use anything from Gentle.Framewor k 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.Framewor k just
because MyProejct.A uses that framework for its implementation?
TIA,
Henning.