19 references to HostingPathResolver
Microsoft.AspNetCore (19)
ConfigureHostBuilder.cs (3)
66
var previousContentRoot =
HostingPathResolver
.ResolvePath(_context.HostingEnvironment.ContentRootPath);
81
&& !string.Equals(previousContentRoot,
HostingPathResolver
.ResolvePath(_configuration[HostDefaults.ContentRootKey]), StringComparison.OrdinalIgnoreCase))
83
throw new NotSupportedException($"The content root changed from \"{previousContentRoot}\" to \"{
HostingPathResolver
.ResolvePath(_configuration[HostDefaults.ContentRootKey])}\". Changing the host configuration using WebApplicationBuilder.Host is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
ConfigureWebHostBuilder.cs (16)
39
var previousContentRoot =
HostingPathResolver
.ResolvePath(_context.HostingEnvironment.ContentRootPath);
41
var previousWebRoot =
HostingPathResolver
.ResolvePath(_context.HostingEnvironment.WebRootPath, previousContentRoot);
52
&& !string.Equals(
HostingPathResolver
.ResolvePath(previousWebRoot, previousContentRoot),
HostingPathResolver
.ResolvePath(_configuration[WebHostDefaults.WebRootKey], previousContentRoot), StringComparison.OrdinalIgnoreCase))
55
throw new NotSupportedException($"The web root changed from \"{
HostingPathResolver
.ResolvePath(previousWebRoot, previousContentRoot)}\" to \"{
HostingPathResolver
.ResolvePath(_configuration[WebHostDefaults.WebRootKey], previousContentRoot)}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
63
&& !string.Equals(previousContentRoot,
HostingPathResolver
.ResolvePath(_configuration[WebHostDefaults.ContentRootKey]), StringComparison.OrdinalIgnoreCase))
66
throw new NotSupportedException($"The content root changed from \"{previousContentRoot}\" to \"{
HostingPathResolver
.ResolvePath(_configuration[WebHostDefaults.ContentRootKey])}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
116
var previousContentRoot =
HostingPathResolver
.ResolvePath(_context.HostingEnvironment.ContentRootPath);
117
var previousWebRoot =
HostingPathResolver
.ResolvePath(_context.HostingEnvironment.WebRootPath);
124
!string.Equals(
HostingPathResolver
.ResolvePath(previousWebRoot, previousContentRoot),
HostingPathResolver
.ResolvePath(value, previousContentRoot), StringComparison.OrdinalIgnoreCase))
127
throw new NotSupportedException($"The web root changed from \"{
HostingPathResolver
.ResolvePath(previousWebRoot, previousContentRoot)}\" to \"{
HostingPathResolver
.ResolvePath(value, previousContentRoot)}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
136
!string.Equals(previousContentRoot,
HostingPathResolver
.ResolvePath(value), StringComparison.OrdinalIgnoreCase))
139
throw new NotSupportedException($"The content root changed from \"{previousContentRoot}\" to \"{
HostingPathResolver
.ResolvePath(value)}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");