This class was generated by NUGET after installing Unity.Wcf
public class WcfServiceFactory : UnityServiceHostFactory
{
protected override void ConfigureContainer(IUnityContainer container)
{
// register all your components with the container here
// container
// .RegisterType<IService1, Service1>()
// .RegisterType<DataContext>(new HierarchicalLifetimeManager());
}
}
public abstract class UnityServiceHostFactory : ServiceHostFactory
{
protected UnityServiceHostFactory();
protected abstract void ConfigureContainer(IUnityContainer container);
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses);
}
'ServiceImplementation2.WcfServiceFactory' does not implement
inherited abstract member
'Unity.Wcf.UnityServiceHostFactory.ConfigureContainer(Microsoft.Practices.Unity.IUnityContainer)'
'ServiceImplementation2.WcfServiceFactory.ConfigureContainer(Microsoft.Practices.Unity.IUnityContainer)':
no suitable method found to override
I had the same issue when working with Unity 4.0.1, but then the issue was disappeared after downgrade to Unity 3.5.1404. Looks to me like Unity.Wcf doesn't work well with 4.0.1.
To install unity version 3.5
Install-Package Unity -Version 3.5.1404
Hope this help.