C# Libraries and Projects

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a solution with 2 projects: Infrastructure and Presentation.

Presentation has a reference to Infrastructure and Infrastructure has
references to some .dll assemblies.

Shouldn't those assemblies classes and namespaces being also available
in Presentation without the need to add references to the .dll
assemblies?

Thanks,
Miguel
 
shapper said:
Hello,

I have a solution with 2 projects: Infrastructure and Presentation.

Presentation has a reference to Infrastructure and Infrastructure has
references to some .dll assemblies.

Shouldn't those assemblies classes and namespaces being also available
in Presentation without the need to add references to the .dll
assemblies?

No. That's not how assembly references work. One assembly doesn't
inherit as members references it makes to another.

(For that matter, my recollection is that's not how DLL linkages work
either...you'd only get that sort of transitive referencing with static
linkages, and only if you've specifically exported the members of those
statically linked libraries in the output library. But even if I'm
wrong about that, it's just not how .NET assemblies work).
 
Back
Top