Open
Description
Hi, When I use unityContainer.Resolve<IWebHostEnvironment>();
on the main container it resolve it and return a value but if I use the following code and resolve IWebHostEnvironment
from child container it throws exception:
unityContainer.RegisterFactory<someType>(c =>
{
var iWeb = c.Resolve<IWebHostEnvironment>();
return new someType(iWeb);
}, new SingletonLifetimeManager());
The exception:
Unity.ResolutionFailedException: 'Resolution failed with error: No public constructor is available for type Microsoft.AspNetCore.Hosting.IWebHostEnvironment.
Why Asp.net core services are not accessible in the factory?