17 references to WebRootKey
Microsoft.AspNetCore (8)
ConfigureWebHostBuilder.cs (5)
42var previousWebRootConfig = _configuration[WebHostDefaults.WebRootKey]; 51if (!string.Equals(previousWebRootConfig, _configuration[WebHostDefaults.WebRootKey], StringComparison.OrdinalIgnoreCase) 52&& !string.Equals(HostingPathResolver.ResolvePath(previousWebRoot, previousContentRoot), HostingPathResolver.ResolvePath(_configuration[WebHostDefaults.WebRootKey], previousContentRoot), StringComparison.OrdinalIgnoreCase)) 55throw 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."); 123if (string.Equals(key, WebHostDefaults.WebRootKey, StringComparison.OrdinalIgnoreCase) &&
WebApplicationBuilder.cs (3)
54new KeyValuePair<string, string?>(WebHostDefaults.WebRootKey, options.WebRootPath), 117new KeyValuePair<string, string?>(WebHostDefaults.WebRootKey, options.WebRootPath), 170new KeyValuePair<string, string?>(WebHostDefaults.WebRootKey, options.WebRootPath),
Microsoft.AspNetCore.Hosting (1)
Internal\WebHostOptions.cs (1)
25WebRoot = GetConfig(WebHostDefaults.WebRootKey);
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
116return hostBuilder.UseSetting(WebHostDefaults.WebRootKey, webRoot);
Microsoft.AspNetCore.Hosting.Tests (2)
HostingEnvironmentExtensionsTests.cs (1)
21[WebHostDefaults.WebRootKey] = "testroot"
WebHostConfigurationsTests.cs (1)
16{ WebHostDefaults.WebRootKey, "wwwroot"},
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
SimpleWithWebApplicationBuilderTests.cs (1)
204builder.UseSetting(WebHostDefaults.WebRootKey, webRoot);
Microsoft.AspNetCore.Tests (4)
WebApplicationTests.cs (4)
396Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.WebRootKey, webRoot)); 441{ WebHostDefaults.WebRootKey, webRoot } 842$"--{WebHostDefaults.WebRootKey}=wwwroot2", 893$"--{WebHostDefaults.WebRootKey}={webRoot}",