Closed Tratcher closed 6 years ago
Previously reported at https://github.com/aspnet/Hosting/issues/1335.
CreateDefaultBuilder always calls .UseContentRoot(Directory.GetCurrentDirectory()), which means it overwrites ASPNETCORE_CONTENTROOT that was read in the WebHostBuilder constructor.
.UseContentRoot(Directory.GetCurrentDirectory())
Some recent changes in the functional test infrastructure have started relying on ASPNETCORE_CONTENTROOT (https://github.com/aspnet/Hosting/pull/1429) and now WebHost functional tests are broken. (http://aspnetci/viewLog.html?buildId=474296&tab=buildResultsDiv&buildTypeId=Lite_UniverseTest)
Proposal: Only call UseContentRoot if a value has not already been provided.
Previously reported at https://github.com/aspnet/Hosting/issues/1335.
CreateDefaultBuilder always calls
.UseContentRoot(Directory.GetCurrentDirectory())
, which means it overwrites ASPNETCORE_CONTENTROOT that was read in the WebHostBuilder constructor.Some recent changes in the functional test infrastructure have started relying on ASPNETCORE_CONTENTROOT (https://github.com/aspnet/Hosting/pull/1429) and now WebHost functional tests are broken. (http://aspnetci/viewLog.html?buildId=474296&tab=buildResultsDiv&buildTypeId=Lite_UniverseTest)
Proposal: Only call UseContentRoot if a value has not already been provided.