In asp.net core 2.1 I could create IHostingEnvironment
like this:
public IHostingEnvironment CreateHostingEnvironment()
{
var hosting = new HostingEnvironment()
{
EnvironmentName = "IntegrationTests"
};
return hosting;
}
In Asp.net core 3.1 it was changed to IWebHostEnvironment
but I need to create it similar way. May goal is to create this object and set Environment name.
public IWebHostEnvironment CreateWebHostEnvironment()
{
var host = new WebHostEnvironment(); // ???
}
IWebHostEnvironment
.