C# Libraries and Projects

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
 
P

Peter Duniho

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top