I've upgraded from .NET 4.8 framework to .NET 7 and I can't seem to get rid of the following error;
The type 'CoreWCF.ServiceHostBase' cannot be used as type parameter 'T' in the generic type or method 'UnityWcfLifetimeManager<T>'
using CoreWCF;
using Unity.Lifetime;
namespace Chiro.Cdf.UnityWcfExtensions
{
/// <summary>
/// Unity lifetime manager to support <see cref="ServiceHostBase"/>.
/// </summary>
public class UnityServiceHostBaseLifetimeManager : UnityWcfLifetimeManager<ServiceHostBase>
{
/// <summary>
/// Returns the appropriate extension for the current lifetime manager.
/// </summary>
/// <returns>The registered extension for the current lifetime manager, otherwise, null if the extension is not registered.</returns>
protected override UnityWcfExtension<ServiceHostBase> FindExtension()
{
return UnityServiceHostBaseExtension.Current;
}
protected override LifetimeManager OnCreateLifetimeManager()
{
throw new System.NotImplementedException();
}
}
}
I've tried a lot of solutions I saw on the internet, but nothing really seems to work
UnityWcfLifetimeManager
?