ServiceDependency question

Topics: CAB & Smart Client Software Factory
Oct 22, 2005 at 3:17 AM
originally posted by: CharlesGamble


I am trying to use ServiceDependency attribute on CAB October release to load a service in my controller class, the service and the controller exist in another module that is used by the main shell application. However it is failing to find the service.
What exactly do I need to do to get this to work?
For example, how do the services get loaded by the Quickstart ModuleLoader solution?
I am unclear as to how this works..

Any help is much appreciated,
Charles Gamble.
Oct 22, 2005 at 7:07 AM
originally posted by: sslysaght

I haven't tried this in CTP2, but in CTP1 if the services are in the App.config file, the default startup (FileCatalogReaderService and ModuleLoader) will load the services

In App.config

serviceType="ModuleA.ServiceA, ModuleA"
instanceType="ModuleA.ServiceA, ModuleA"

I did have a problem with ServiceDependency if a service in one module depended on a service in another module. The ServiceDependency seems
to work only within a module?
Oct 23, 2005 at 12:55 AM
originally posted by: CharlesGamble

Thanks for the help.

There is no app.config file for the ModuleLoader quickstart, so I am still unsure as to how it loads the service and why it's not working for my test application.

Oct 25, 2005 at 7:11 AM
originally posted by: CharlesGamble

I got this working. I had not set the ServiceDependency to be the Interface instead of the Class instance of the service.