Using a service from a referenced project?

Topics: CAB & Smart Client Software Factory
Sep 21, 2005 at 5:07 AM
originally posted by: espice

The application template we have been given has services in a seperate project from the controller. I create a service dependency from the controller like this:

<ServiceDependency()> _
Private m_objService As TestService = Nothing

I get a run time error stating that the required service cannot be added because it is not available in the current container. I can manually add the service to the work item in the Run method as a work around but I don't want to have to do that. Anyone know of a way I can use the service without having to manually add it to the work item?

Thanks for any help!
Sep 29, 2005 at 10:18 AM
originally posted by: espice

Hmmm.... guess not.
Sep 30, 2005 at 7:35 AM
originally posted by: DLorenz

The module init automatically runs anything that is marked as a Service. However, that only runs services in its own module. Any services on the outside will not be contained in that Module. The only way you'd be able to use it is if you added that service into the module. However, I am unsure that if you run two different modules (from the ProfileCatalog.xml) at the beginning, you can access cross module services.