From 9bee85fcec2f534b29c8561bbc34f20387e4a550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Tue, 30 Jun 2026 15:08:24 +0200 Subject: [PATCH] Remove NoWarn for NU1511 false positives The upstream nuget issue was fixed, remove the warning suppressions. Also unify the comments for the remaining genuine NU1511 suppressions so that we use the same text everywhere. In some cases we were able to remove the suppression by making a P2P reference .NETFramework only, since the assembly was moved to the base shared framework in .NET 11. --- .../tests/AppHost.Bundle.Tests/AppHost.Bundle.Tests.csproj | 3 --- .../tests/HostActivation.Tests/HostActivation.Tests.csproj | 3 --- .../Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj | 3 --- .../Microsoft.NET.HostModel.Tests.csproj | 3 --- src/installer/tests/TestUtils/TestUtils.csproj | 3 --- .../Microsoft.Extensions.DependencyInjection.Tests.csproj | 2 ++ .../Microsoft.Extensions.Hosting.Abstractions.Tests.csproj | 3 ++- .../tests/Common/Microsoft.Extensions.Logging.Tests.csproj | 2 ++ .../MetricOuterLoopTests/MetricOuterLoop.Tests.csproj | 3 +-- .../MetricOuterLoopTests/MetricOuterLoop1.Tests.csproj | 3 +-- .../tests/System.Diagnostics.DiagnosticSource.Tests.csproj | 3 +-- .../System.Text.Json.SourceGeneration.Tests.targets | 7 ++----- .../tests/System.Threading.AccessControl.Tests.csproj | 5 +---- 13 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/installer/tests/AppHost.Bundle.Tests/AppHost.Bundle.Tests.csproj b/src/installer/tests/AppHost.Bundle.Tests/AppHost.Bundle.Tests.csproj index 51433527076fd0..28fc7ae3878f6a 100644 --- a/src/installer/tests/AppHost.Bundle.Tests/AppHost.Bundle.Tests.csproj +++ b/src/installer/tests/AppHost.Bundle.Tests/AppHost.Bundle.Tests.csproj @@ -9,9 +9,6 @@ true ahb - - $(NoWarn);NU1511;xUnit1004 XUnitV3 diff --git a/src/installer/tests/HostActivation.Tests/HostActivation.Tests.csproj b/src/installer/tests/HostActivation.Tests/HostActivation.Tests.csproj index 6202c71150c9f6..4d57d852a467a9 100644 --- a/src/installer/tests/HostActivation.Tests/HostActivation.Tests.csproj +++ b/src/installer/tests/HostActivation.Tests/HostActivation.Tests.csproj @@ -8,9 +8,6 @@ true ha - - $(NoWarn);NU1511 XUnitV3 diff --git a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj index 65fba58869bf6d..f2d6fa5a2009af 100644 --- a/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj +++ b/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj @@ -6,9 +6,6 @@ $(HostRid) false - - $(NoWarn);NU1511 XUnitV3 diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Tests.csproj b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Tests.csproj index 4dc86ad3257743..c3e488a0bf4496 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Tests.csproj +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Tests.csproj @@ -8,9 +8,6 @@ true hm - - $(NoWarn);NU1511;xUnit1004 XUnitV3 diff --git a/src/installer/tests/TestUtils/TestUtils.csproj b/src/installer/tests/TestUtils/TestUtils.csproj index a88b817b47ac5b..579b220196a042 100644 --- a/src/installer/tests/TestUtils/TestUtils.csproj +++ b/src/installer/tests/TestUtils/TestUtils.csproj @@ -5,9 +5,6 @@ true TestUtils TestUtils - - $(NoWarn);NU1511 diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj index 647a4aa7c6bb9b..39e02df0a05ce1 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj @@ -4,6 +4,8 @@ $(NetCoreAppCurrent);$(NetFrameworkCurrent) true true + $(NoWarn);NU1511 $(NoWarn);CS0436 diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/tests/Microsoft.Extensions.Hosting.Abstractions.Tests.csproj b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/tests/Microsoft.Extensions.Hosting.Abstractions.Tests.csproj index 86468f5456b163..6dad632fa33888 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/tests/Microsoft.Extensions.Hosting.Abstractions.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/tests/Microsoft.Extensions.Hosting.Abstractions.Tests.csproj @@ -3,7 +3,8 @@ $(NetCoreAppCurrent);$(NetFrameworkCurrent) true - + $(NoWarn);NU1511 diff --git a/src/libraries/Microsoft.Extensions.Logging/tests/Common/Microsoft.Extensions.Logging.Tests.csproj b/src/libraries/Microsoft.Extensions.Logging/tests/Common/Microsoft.Extensions.Logging.Tests.csproj index fbd4bfeda5a158..2d7a3ba89ad650 100644 --- a/src/libraries/Microsoft.Extensions.Logging/tests/Common/Microsoft.Extensions.Logging.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.Logging/tests/Common/Microsoft.Extensions.Logging.Tests.csproj @@ -3,6 +3,8 @@ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetFrameworkCurrent) true + $(NoWarn);NU1511 diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop.Tests.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop.Tests.csproj index 428a2d9bc39145..6a6d0c6e33f629 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop.Tests.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop.Tests.csproj @@ -3,7 +3,6 @@ $(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser;$(NetFrameworkCurrent) true - NU1511 @@ -24,7 +23,7 @@ - + diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop1.Tests.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop1.Tests.csproj index 6f55c5c3b27dcc..fb606513ff3d46 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop1.Tests.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricOuterLoopTests/MetricOuterLoop1.Tests.csproj @@ -3,7 +3,6 @@ $(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser;$(NetFrameworkCurrent) true - NU1511 @@ -24,7 +23,7 @@ - + diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj index 6aaa4ad2e062aa..4f926615e50999 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj @@ -4,7 +4,6 @@ $(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser;$(NetFrameworkCurrent) true true - NU1511 true false @@ -71,7 +70,7 @@ - + diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets index 2233ab2704d2e9..8d054c1b691b56 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets @@ -17,9 +17,6 @@ $(NoWarn);SYSLIB0020;SYSLIB0049;SYSLIB1030;SYSLIB1034;SYSLIB1037;SYSLIB1038;SYSLIB1039;SYSLIB1220;SYSLIB1223;SYSLIB1225;SYSLIB1226 true - - $(NoWarn);NU1511 @@ -161,7 +158,8 @@ - + + @@ -180,7 +178,6 @@ - diff --git a/src/libraries/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj b/src/libraries/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj index ff674a45771a0e..6973eb5eb35448 100644 --- a/src/libraries/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj +++ b/src/libraries/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj @@ -2,9 +2,6 @@ $(NetCoreAppCurrent)-windows;$(NetFrameworkCurrent) - - $(NoWarn);NU1511 @@ -20,7 +17,7 @@ - +