references adding themselves based on references from other projects referenced

  • Thread starter Thread starter Brian Henry
  • Start date Start date
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?
 
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'.
 
Back
Top