Stop setting WebRoot explicitly.
This commit is contained in:
parent
a67bd6820c
commit
4e929bb300
|
|
@ -29,7 +29,6 @@ namespace MusicStore
|
||||||
config.AddCommandLine(args);
|
config.AddCommandLine(args);
|
||||||
|
|
||||||
var serviceCollection = HostingServices.Create(_hostServiceProvider);
|
var serviceCollection = HostingServices.Create(_hostServiceProvider);
|
||||||
serviceCollection.AddSingleton<IHostingEnvironment, TestHostingEnvironment>();
|
|
||||||
var services = serviceCollection.BuildServiceProvider();
|
var services = serviceCollection.BuildServiceProvider();
|
||||||
|
|
||||||
var context = new HostingContext()
|
var context = new HostingContext()
|
||||||
|
|
@ -54,13 +53,5 @@ namespace MusicStore
|
||||||
}
|
}
|
||||||
return Task.FromResult(0);
|
return Task.FromResult(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestHostingEnvironment : HostingEnvironment
|
|
||||||
{
|
|
||||||
public TestHostingEnvironment(IApplicationEnvironment env, IEnumerable<IConfigureHostingEnvironment> configure) : base(env, configure)
|
|
||||||
{
|
|
||||||
WebRoot = "wwwroot";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue