references adding themselves based on references from other projects referenced

B

Brian Henry

My main project really only has one reference in it that is needed outside
of the System references. It references a DLL Class Library which has
references in that DLL library to other references like crystal reports and
such... I have noticed that my main project though randomly adds copies of
the referenced items in the DLL to the exe's reference list... why is it
doing this? it doesn't need the references, so why would it copy the
referenced project's references into itself?
 
H

Herfried K. Wagner [MVP]

Brian Henry said:
My main project really only has one reference in it that is needed outside
of the System references. It references a DLL Class Library which has
references in that DLL library to other references like crystal reports
and such... I have noticed that my main project though randomly adds
copies of the referenced items in the DLL to the exe's reference list...
why is it doing this? it doesn't need the references, so why would it copy
the referenced project's references into itself?

Imagine two libraries (assemblies) 'A' and 'B'. Assembly 'A' exposes a
class 'Bar', and assembly 'B' references 'A' and contains a class named
'FooBar' which inherits from 'Bar'. When referencing 'B' both the type
'FooBar' and 'Bar' need to be made available, because 'FooBar' inherits
'Bar'.
 

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