Can't load module with dependent services

Topics: CAB & Smart Client Software Factory
Aug 11, 2005 at 11:54 PM
originally posted by: kirchsth

My module that has two services and the first loaded service depends on the second service.

Service
public class FirstLoadedService : IFirstService
{
ServiceDependency
public ISecondService secondLoadedService;
..
}

Service
public class SecondLoadedService : ISecondService
{
...
}

During FirstLoadedService load I get ServiceMissingException in ServiceDependencyMonitor.OnDependencyCallback()
Aug 15, 2005 at 11:40 AM
originally posted by: BradWilsonMSFT

Make sure SecondLoadedService is actually the first one placed into the container.

EDIT:

Okay, looking at this again, I realize that I could have provided more guidance. ;)

You're using Service as a way to get the services automatically registered. Because we don't have service dependency support, you'll need to:

- Remove the Service attribute from the classes
- In your ModuleInit derived class, register the services with the ApplicationHost, making sure to register SecondLoadedService before you register FirstLoadedService.
Aug 16, 2005 at 10:42 PM
originally posted by: kirchsth

Will the final version has a service dependency support?