Add service from another dll of another solution

Viewed 27

We use ServiceStack 5.9.2 and have a ready, running application build with Visual Studio. Is it possible to add additional services to this application which were build in another Visual Studio solution? It provides a DLL which could be copied to the Exe of the host application. The application would have to detect the services in the copied dll on startup.

Just read https://docs.servicestack.net/modularizing-services#modularizing-services-in-multiple-assemblies but I'am not sure if that is possible/ allowed.

1 Answers

The AppHost supports wiring up Services from multiple .dll's so you can register services in an external .dll by adding the assembly to your AppHost's base constructor:

public class AppHost : AppHostBase
{
    public AppHost() 
      : base("App",typeof(MyServices).Assembly,typeof(ServiceInExtDll).Assembly){}

    public override void Configure(Container container) {}
}
Related