Link to home
Start Free TrialLog in
Avatar of peclat
peclat

asked on

Cascading assemblies in .net libraries

Hello,

First, sorry for my bad english.

I am developping a class library, in C# .Net 4, that references some other assemblies (e.g. emgucv).
Then, I have some applications that use this library. Sometimes, In these applications, I need to use some classes of the referred assemblies in the library (e.g. Image class from emgucv).

The point is that applications must also add references to the other assemblies that are already referred by my library. In order to have my library more comfortable to use, I wonder if it was possible to cascade these references. In this case, an application programmer would only need to reference my library.

I could create classes to wrap other classes in assemblies, but I prefer to avoid this. In summary, I want to provide to applications that use my library, the sames capabilities as my library.

Thanks in advance !
Avatar of HohlovDima
HohlovDima
Flag of Ukraine image

Hi
You can just put all referenced assemblies to bin folder and reference in your application only needed then they will  be loaded automaticaly. Or please tell in more details.
Best Regards,
Dima.
Avatar of peclat
peclat

ASKER

Hello,

I imagine this is not possible, but I would like application developers to only refer the library assembly and to be able to use classes in other assemblies referenced by the library.

Here is the current solution, lets say that applications A,B and library are mine and Assemblies X,Y,Z are not  :
Application A
  ref Library
  ref Assembly X
  ref Assembly Y
Application B
  ref Library
  ref Assembly Y
  ref Assembly Z
Library
  ref Assembly X
  ref Assembly Y
  ref Assembly Z

And here is the solution I want (A and B are able to use classes from assemblies X,Y,Z by "indirect reference" though the library :
Application A
  ref Library
Application B
  ref Library
Library
  ref Assembly X
  ref Assembly Y
  ref Assembly Z

We would like to provide the library as a framework, without annoying applications developers with referencing of all these assemblies. I've also noticed that all assemblies referenced by the library are copied into the bin directory of each application, even if they are not used by the application.

Thanks a lot.
ASKER CERTIFIED SOLUTION
Avatar of HohlovDima
HohlovDima
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of peclat

ASKER

Thanks again !