Skip to content

Commit 04bc56b

Browse files
committed
[internal/release/6.0] Update dependencies from dnceng/internal/dotnet-efcore dnceng/internal/dotnet-runtime
- Revert "Make UseUrls() override default hosting config (#39836)"
1 parent f01a14d commit 04bc56b

File tree

5 files changed

+52
-96
lines changed

5 files changed

+52
-96
lines changed

NuGet.config

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
66
<!-- Begin: Package sources from dotnet-runtime -->
7-
<add key="darc-int-dotnet-runtime-839cdfb-2" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-839cdfb0-2/nuget/v3/index.json" />
8-
<add key="darc-int-dotnet-runtime-839cdfb-1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-839cdfb0-1/nuget/v3/index.json" />
9-
<add key="darc-int-dotnet-runtime-839cdfb" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-839cdfb0/nuget/v3/index.json" />
7+
<add key="darc-int-dotnet-runtime-10db735" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-10db7350/nuget/v3/index.json" />
108
<!-- End: Package sources from dotnet-runtime -->
119
<!-- Begin: Package sources from dotnet-efcore -->
12-
<add key="darc-int-dotnet-efcore-0e90675" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-0e90675a/nuget/v3/index.json" />
10+
<add key="darc-int-dotnet-efcore-348a3ca" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-348a3ca4/nuget/v3/index.json" />
1311
<!-- End: Package sources from dotnet-efcore -->
1412
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
1513
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
@@ -29,12 +27,10 @@
2927
<clear />
3028
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
3129
<!-- Begin: Package sources from dotnet-efcore -->
32-
<add key="darc-int-dotnet-efcore-0e90675" value="true" />
30+
<add key="darc-int-dotnet-efcore-348a3ca" value="true" />
3331
<!-- End: Package sources from dotnet-efcore -->
3432
<!-- Begin: Package sources from dotnet-runtime -->
35-
<add key="darc-int-dotnet-runtime-839cdfb" value="true" />
36-
<add key="darc-int-dotnet-runtime-839cdfb-1" value="true" />
37-
<add key="darc-int-dotnet-runtime-839cdfb-2" value="true" />
33+
<add key="darc-int-dotnet-runtime-10db735" value="true" />
3834
<!-- End: Package sources from dotnet-runtime -->
3935
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
4036
</disabledPackageSources>

eng/Version.Details.xml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,35 @@
1111
<ProductDependencies>
1212
<Dependency Name="dotnet-ef" Version="6.0.3">
1313
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
14-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
14+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
1515
</Dependency>
1616
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.3">
1717
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
18-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
18+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
1919
</Dependency>
2020
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.3">
2121
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
22-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
22+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
2323
</Dependency>
2424
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.3">
2525
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
26-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
26+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
2727
</Dependency>
2828
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.3">
2929
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
30-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
30+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
3131
</Dependency>
3232
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.3">
3333
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
34-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
34+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
3535
</Dependency>
3636
<Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.3">
3737
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
38-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
38+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
3939
</Dependency>
4040
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.3">
4141
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
42-
<Sha>0e90675a4547f95779176ce3c969a16e30c8bdce</Sha>
42+
<Sha>348a3ca4621a7a75cce74a5586e081570dc28897</Sha>
4343
</Dependency>
4444
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0">
4545
<Uri>https://github.com/dotnet/runtime</Uri>
@@ -85,9 +85,9 @@
8585
<Uri>https://github.com/dotnet/runtime</Uri>
8686
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
8787
</Dependency>
88-
<Dependency Name="Microsoft.Extensions.Configuration" Version="6.0.0">
89-
<Uri>https://github.com/dotnet/runtime</Uri>
90-
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
88+
<Dependency Name="Microsoft.Extensions.Configuration" Version="6.0.1">
89+
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
90+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
9191
</Dependency>
9292
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0">
9393
<Uri>https://github.com/dotnet/runtime</Uri>
@@ -129,9 +129,9 @@
129129
<Uri>https://github.com/dotnet/runtime</Uri>
130130
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
131131
</Dependency>
132-
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0">
133-
<Uri>https://github.com/dotnet/runtime</Uri>
134-
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
132+
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1">
133+
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
134+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
135135
</Dependency>
136136
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="6.0.0">
137137
<Uri>https://github.com/dotnet/runtime</Uri>
@@ -177,9 +177,9 @@
177177
<Uri>https://github.com/dotnet/runtime</Uri>
178178
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
179179
</Dependency>
180-
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.2-servicing.22064.6">
180+
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.3-servicing.22115.5">
181181
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
182-
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
182+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
183183
</Dependency>
184184
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.0">
185185
<Uri>https://github.com/dotnet/runtime</Uri>
@@ -205,9 +205,9 @@
205205
<Uri>https://github.com/dotnet/runtime</Uri>
206206
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
207207
</Dependency>
208-
<Dependency Name="System.Reflection.Metadata" Version="6.0.0">
209-
<Uri>https://github.com/dotnet/runtime</Uri>
210-
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
208+
<Dependency Name="System.Reflection.Metadata" Version="6.0.1">
209+
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
210+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
211211
</Dependency>
212212
<Dependency Name="System.Resources.Extensions" Version="6.0.0">
213213
<Uri>https://github.com/dotnet/runtime</Uri>
@@ -245,40 +245,40 @@
245245
<Uri>https://github.com/dotnet/runtime</Uri>
246246
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
247247
</Dependency>
248-
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.2">
248+
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.3">
249249
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
250-
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
250+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
251251
</Dependency>
252-
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.2">
252+
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.3">
253253
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
254-
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
254+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
255255
</Dependency>
256-
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.2">
256+
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.3">
257257
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
258-
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
258+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
259259
</Dependency>
260260
<!--
261261
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
262262
All Runtime.$rid packages should have the same version.
263263
-->
264-
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.2">
264+
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.3">
265265
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
266-
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
266+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
267267
</Dependency>
268-
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.2">
268+
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.3">
269269
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
270-
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
270+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
271271
</Dependency>
272-
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.2-servicing.22064.6">
272+
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.3-servicing.22115.5">
273273
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
274-
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
274+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
275275
</Dependency>
276276
</ProductDependencies>
277277
<ToolsetDependencies>
278278
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
279-
<Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.1">
279+
<Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.2">
280280
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
281-
<Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha>
281+
<Sha>10db7350e1288caf09e684e1b219f8f5b08eca02</Sha>
282282
</Dependency>
283283
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22107.2">
284284
<Uri>https://github.com/dotnet/arcade</Uri>

eng/Versions.props

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
<PropertyGroup Label="Automated">
6464
<!-- Packages from dotnet/runtime -->
6565
<MicrosoftExtensionsDependencyModelVersion>6.0.0</MicrosoftExtensionsDependencyModelVersion>
66-
<MicrosoftNETCoreAppRefVersion>6.0.2</MicrosoftNETCoreAppRefVersion>
67-
<MicrosoftNETCoreAppRuntimewinx64Version>6.0.2</MicrosoftNETCoreAppRuntimewinx64Version>
68-
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.2</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
69-
<MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.2</MicrosoftNETRuntimeWebAssemblySdkVersion>
70-
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.2</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
71-
<MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.2-servicing.22064.6</MicrosoftNETCoreBrowserDebugHostTransportVersion>
66+
<MicrosoftNETCoreAppRefVersion>6.0.3</MicrosoftNETCoreAppRefVersion>
67+
<MicrosoftNETCoreAppRuntimewinx64Version>6.0.3</MicrosoftNETCoreAppRuntimewinx64Version>
68+
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.3</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
69+
<MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.3</MicrosoftNETRuntimeWebAssemblySdkVersion>
70+
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.3</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
71+
<MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.3-servicing.22115.5</MicrosoftNETCoreBrowserDebugHostTransportVersion>
7272
<MicrosoftExtensionsCachingAbstractionsVersion>6.0.0</MicrosoftExtensionsCachingAbstractionsVersion>
7373
<MicrosoftExtensionsCachingMemoryVersion>6.0.1</MicrosoftExtensionsCachingMemoryVersion>
7474
<MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0</MicrosoftExtensionsConfigurationAbstractionsVersion>
@@ -78,7 +78,7 @@
7878
<MicrosoftExtensionsConfigurationFileExtensionsVersion>6.0.0</MicrosoftExtensionsConfigurationFileExtensionsVersion>
7979
<MicrosoftExtensionsConfigurationIniVersion>6.0.0</MicrosoftExtensionsConfigurationIniVersion>
8080
<MicrosoftExtensionsConfigurationJsonVersion>6.0.0</MicrosoftExtensionsConfigurationJsonVersion>
81-
<MicrosoftExtensionsConfigurationVersion>6.0.0</MicrosoftExtensionsConfigurationVersion>
81+
<MicrosoftExtensionsConfigurationVersion>6.0.1</MicrosoftExtensionsConfigurationVersion>
8282
<MicrosoftExtensionsConfigurationUserSecretsVersion>6.0.1</MicrosoftExtensionsConfigurationUserSecretsVersion>
8383
<MicrosoftExtensionsConfigurationXmlVersion>6.0.0</MicrosoftExtensionsConfigurationXmlVersion>
8484
<MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0</MicrosoftExtensionsDependencyInjectionAbstractionsVersion>
@@ -91,7 +91,7 @@
9191
<MicrosoftExtensionsHostingAbstractionsVersion>6.0.0</MicrosoftExtensionsHostingAbstractionsVersion>
9292
<MicrosoftExtensionsHostingVersion>6.0.1</MicrosoftExtensionsHostingVersion>
9393
<MicrosoftExtensionsHttpVersion>6.0.0</MicrosoftExtensionsHttpVersion>
94-
<MicrosoftExtensionsLoggingAbstractionsVersion>6.0.0</MicrosoftExtensionsLoggingAbstractionsVersion>
94+
<MicrosoftExtensionsLoggingAbstractionsVersion>6.0.1</MicrosoftExtensionsLoggingAbstractionsVersion>
9595
<MicrosoftExtensionsLoggingConfigurationVersion>6.0.0</MicrosoftExtensionsLoggingConfigurationVersion>
9696
<MicrosoftExtensionsLoggingConsoleVersion>6.0.0</MicrosoftExtensionsLoggingConsoleVersion>
9797
<MicrosoftExtensionsLoggingDebugVersion>6.0.0</MicrosoftExtensionsLoggingDebugVersion>
@@ -103,14 +103,14 @@
103103
<MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0</MicrosoftExtensionsOptionsDataAnnotationsVersion>
104104
<MicrosoftExtensionsOptionsVersion>6.0.0</MicrosoftExtensionsOptionsVersion>
105105
<MicrosoftExtensionsPrimitivesVersion>6.0.0</MicrosoftExtensionsPrimitivesVersion>
106-
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.2-servicing.22064.6</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
106+
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.3-servicing.22115.5</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
107107
<SystemDiagnosticsDiagnosticSourceVersion>6.0.0</SystemDiagnosticsDiagnosticSourceVersion>
108108
<SystemDiagnosticsEventLogVersion>6.0.0</SystemDiagnosticsEventLogVersion>
109109
<SystemDirectoryServicesProtocolsVersion>6.0.1</SystemDirectoryServicesProtocolsVersion>
110110
<SystemIOPipelinesVersion>6.0.2</SystemIOPipelinesVersion>
111111
<SystemNetHttpJsonVersion>6.0.0</SystemNetHttpJsonVersion>
112112
<SystemNetHttpWinHttpHandlerVersion>6.0.0</SystemNetHttpWinHttpHandlerVersion>
113-
<SystemReflectionMetadataVersion>6.0.0</SystemReflectionMetadataVersion>
113+
<SystemReflectionMetadataVersion>6.0.1</SystemReflectionMetadataVersion>
114114
<SystemResourcesExtensionsVersion>6.0.0</SystemResourcesExtensionsVersion>
115115
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
116116
<SystemSecurityCryptographyPkcsVersion>6.0.0</SystemSecurityCryptographyPkcsVersion>
@@ -120,7 +120,7 @@
120120
<SystemTextJsonVersion>6.0.2</SystemTextJsonVersion>
121121
<SystemThreadingChannelsVersion>6.0.0</SystemThreadingChannelsVersion>
122122
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
123-
<MicrosoftNETCorePlatformsVersion>6.0.1</MicrosoftNETCorePlatformsVersion>
123+
<MicrosoftNETCorePlatformsVersion>6.0.2</MicrosoftNETCorePlatformsVersion>
124124
<!-- Packages from dotnet/efcore -->
125125
<dotnetefVersion>6.0.3</dotnetefVersion>
126126
<MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.3</MicrosoftEntityFrameworkCoreInMemoryVersion>

src/DefaultBuilder/src/WebApplicationBuilder.cs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public sealed class WebApplicationBuilder
2222
private readonly BootstrapHostBuilder _bootstrapHostBuilder;
2323
private readonly WebApplicationServiceCollection _services = new();
2424
private readonly List<KeyValuePair<string, string>> _hostConfigurationValues;
25-
private readonly ConfigurationManager _hostConfigurationManager = new();
2625

2726
private WebApplication? _builtApplication;
2827

@@ -77,8 +76,6 @@ internal WebApplicationBuilder(WebApplicationOptions options, Action<IHostBuilde
7776
});
7877

7978
Configuration = new();
80-
// This is chained as the first configuration source in Configuration so host config can be added later without overriding app config.
81-
Configuration.AddConfiguration(_hostConfigurationManager, shouldDisposeConfiguration: true);
8279

8380
// Collect the hosted services separately since we want those to run after the user's hosted services
8481
_services.TrackHostedServices = true;
@@ -197,32 +194,22 @@ public WebApplication Build()
197194
// to the new one. This allows code that has references to the service collection to still function.
198195
_services.InnerCollection = services;
199196

200-
// Keep any configuration sources added before the TrackingChainedConfigurationSource (namely host configuration from _hostConfigurationValues)
201-
// from overriding config values set via Configuration by inserting them at beginning using _hostConfigurationValues.
202-
var beforeChainedConfig = true;
203197
var hostBuilderProviders = ((IConfigurationRoot)context.Configuration).Providers;
204198

205199
if (!hostBuilderProviders.Contains(chainedConfigSource.BuiltProvider))
206200
{
207201
// Something removed the _hostBuilder's TrackingChainedConfigurationSource pointing back to the ConfigurationManager.
208202
// This is likely a test using WebApplicationFactory. Replicate the effect by clearing the ConfingurationManager sources.
209203
((IConfigurationBuilder)Configuration).Sources.Clear();
210-
beforeChainedConfig = false;
211204
}
212205

213-
// Make the ConfigurationManager match the final _hostBuilder's configuration. To do that, we add the additional providers
214-
// to the inner _hostBuilders's configuration to the ConfigurationManager. We wrap the existing provider in a
215-
// configuration source to avoid rebuilding or reloading the already added configuration sources.
206+
// Make builder.Configuration match the final configuration. To do that, we add the additional
207+
// providers in the inner _hostBuilders's Configuration to the ConfigurationManager.
216208
foreach (var provider in hostBuilderProviders)
217209
{
218-
if (ReferenceEquals(provider, chainedConfigSource.BuiltProvider))
210+
if (!ReferenceEquals(provider, chainedConfigSource.BuiltProvider))
219211
{
220-
beforeChainedConfig = false;
221-
}
222-
else
223-
{
224-
IConfigurationBuilder configBuilder = beforeChainedConfig ? _hostConfigurationManager : Configuration;
225-
configBuilder.Add(new ConfigurationProviderSource(provider));
212+
((IConfigurationBuilder)Configuration).Add(new ConfigurationProviderSource(provider));
226213
}
227214
}
228215
});

0 commit comments

Comments
 (0)