I want to be able to utilise a C# assembly which can be easily be initialised in a decoupled manner to set up some (AutoMapper) configuration at start-up. WebActivator allows me to do this.
But I also want to be able to utilise this assembly in a Windows Service Host environment which I want to be completely decoupled also. Is there something equivalent to WebActivatorEx that I can use?
In the absence of a response to this question (probably because it was badly worded and a bit questionable in its approach) I came back to it today and decided to look again.
As I want to be able to host an MEF enabled plugin I had used WebActivator to get it working in MVC.
On the WebActivator page I noticed the following comment at the bottom of the page under the heading Support for invoking the start methods outside of ASP.NET
In my case the WebActivator.ActivationManager.RunPreStartMethods() would provide what I wanted. This approach (although it feels a bit hacky!) would allow me to run the same plugin (without Web dependencies) from a Windows Service.