Skip to content

Commit b7bc228

Browse files
authored
Update SDK (#4162)
* Update global.json As per dotnet/aspnetcore#49297 * Update Directory.Build.targets Suppress TBD * Fix build
1 parent 142fe18 commit b7bc228

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

Directory.Build.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<!-- This is false for local development, but set to true in the CI system -->
1717
<TreatWarningsAsErrors Condition=" '$(TreatWarningsAsErrors)' == '' ">false</TreatWarningsAsErrors>
1818

19+
<!-- TODO: remove once https://github.com/dotnet/extensions/issues/4161 is resolved -->
20+
<NoWarn>$(NoWarn);TBD</NoWarn>
21+
1922
<!--
2023
TODO: to be resolved (https://github.com/dotnet/extensions/issues/4128)
2124

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "8.0.100-preview.7.23328.2"
3+
"version": "8.0.100-preview.7.23360.1"
44
},
55
"tools": {
6-
"dotnet": "8.0.100-preview.7.23328.2",
6+
"dotnet": "8.0.100-preview.7.23360.1",
77
"runtimes": {
88
"dotnet/x64": [
99
"3.1.32",

src/Libraries/Microsoft.Extensions.Diagnostics.Probes/Kubernetes/TcpEndpointHealthCheckService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ internal sealed class TcpEndpointHealthCheckService : BackgroundService
2323
private readonly ILogger<TcpEndpointHealthCheckService> _logger;
2424
private readonly HealthCheckService _healthCheckService;
2525
private readonly KubernetesProbesOptions.EndpointOptions _options;
26+
#pragma warning disable CA2213 // 'TcpEndpointHealthCheckService' contains field '_listener' that is of IDisposable type 'TcpListener'
2627
private readonly TcpListener _listener;
28+
#pragma warning restore CA2213
2729

2830
public TcpEndpointHealthCheckService(ILogger<TcpEndpointHealthCheckService> logger, HealthCheckService healthCheckService, KubernetesProbesOptions.EndpointOptions options)
2931
{

test/Libraries/Microsoft.Extensions.Diagnostics.Probes.Tests/Kubernetes/TcpEndpointHealthCheckServiceTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ private static bool IsTcpOpened(int port)
119119

120120
private static int GetFreeTcpPort()
121121
{
122+
#pragma warning disable CA2000 // Dispose objects before losing scope
122123
var listener = new TcpListener(IPAddress.Loopback, 0);
124+
#pragma warning restore CA2000 // Dispose objects before losing scope
123125
listener.Start();
124126
int port = ((IPEndPoint)listener.LocalEndpoint).Port;
125127
listener.Stop();

0 commit comments

Comments
 (0)