Skip to content

Commit a0b75d5

Browse files
Update .NET SDK
Update .NET SDK to pick up fix for issues with IConfiguration and remove workaround.
1 parent 25eccef commit a0b75d5

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "6.0.100-rc.1.21373.1",
3+
"version": "6.0.100-rc.1.21374.7",
44
"allowPrerelease": false,
55
"rollForward": "latestMajor"
66
}

tests/TodoApp.Tests/TodoApp.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<FrameworkReference Include="Microsoft.AspNetCore.App" />
99
<PackageReference Include="JustEat.HttpClientInterception" Version="3.1.0" />
1010
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.1.2" />
11-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.0-rc.1.21373.1" />
11+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.0-rc.1.21374.5" />
1212
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
1313
<PackageReference Include="Microsoft.Playwright" Version="1.13.0" />
1414
<PackageReference Include="Shouldly" Version="4.0.3" />

tests/TodoApp.Tests/TodoAppFixture.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,18 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)
6161
builder.Sources.Clear();
6262

6363
builder.AddJsonFile(fullPath)
64-
.AddInMemoryCollection(config);
64+
.AddInMemoryCollection(config);
6565
});
6666

6767
builder.ConfigureLogging((loggingBuilder) => loggingBuilder.ClearProviders().AddXUnit(this))
68-
.UseSolutionRelativeContentRoot(Path.Combine("src", "TodoApp"));
68+
.UseSolutionRelativeContentRoot(Path.Combine("src", "TodoApp"));
6969

7070
builder.ConfigureServices((services) =>
7171
{
7272
services.AddSingleton<IHttpMessageHandlerBuilderFilter, HttpRequestInterceptionFilter>(
7373
(_) => new HttpRequestInterceptionFilter(Interceptor));
7474

7575
services.AddSingleton<IPostConfigureOptions<GitHubAuthenticationOptions>, RemoteAuthorizationEventsFilter>();
76-
77-
// HACK Remove the IConfiguration that WebApplication(Builder) adds that
78-
// does not reflect the changes applied by ConfigureAppConfiguration() above.
79-
// See https://github.com/dotnet/aspnetcore/issues/33876.
80-
var configs = services.Where((p) => p.ServiceType == typeof(IConfiguration)).ToList();
81-
services.Remove(configs[1]);
8276
});
8377

8478
Interceptor.RegisterBundle("oauth-http-bundle.json");

0 commit comments

Comments
 (0)