From 80bc741a5215e36001184cb9157d23ea2c33c396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Thu, 22 May 2025 12:40:02 +0200 Subject: [PATCH 1/2] Warning on unsupported tfms (#15072) * Add warning when restoring old TFM * revert * Revert "revert" This reverts commit 81c7638c71d308b1bb857c23c1f8916abc51a7f6. --- eng/verify-nupkgs.ps1 | 2 +- .../Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj | 3 +++ .../Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec | 9 ++++++++- .../Microsoft.NET.Test.Sdk.targets | 6 ++++++ 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets diff --git a/eng/verify-nupkgs.ps1 b/eng/verify-nupkgs.ps1 index 8b922cde5f..9c23ac52d8 100644 --- a/eng/verify-nupkgs.ps1 +++ b/eng/verify-nupkgs.ps1 @@ -18,7 +18,7 @@ function Verify-Nuget-Packages { Write-Host "Starting Verify-Nuget-Packages." $expectedNumOfFiles = @{ "Microsoft.CodeCoverage" = 59; - "Microsoft.NET.Test.Sdk" = 15; + "Microsoft.NET.Test.Sdk" = 20; "Microsoft.TestPlatform" = 619; "Microsoft.TestPlatform.Build" = 20; "Microsoft.TestPlatform.CLI" = 481; diff --git a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj index 1764ba0ef3..6c3cb6a586 100644 --- a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj +++ b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj @@ -29,6 +29,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec index 54e0694f48..12c281a274 100644 --- a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec +++ b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec @@ -21,10 +21,17 @@ - + + + + + + + + diff --git a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets new file mode 100644 index 0000000000..6ef96e693d --- /dev/null +++ b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets @@ -0,0 +1,6 @@ + + + + + From 5b8e9e41146b0852e5dec1f1a25f07e1ef8f27eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Thu, 29 May 2025 18:10:03 +0200 Subject: [PATCH 2/2] Make the warning error, and restore previous props so we attempt to run (#15078) * Make the warning error, and restore previous props so we get errors when user suppresses * Update src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec * Correct file count, because we are adding more props * Wrong edit --- eng/verify-nupkgs.ps1 | 2 +- .../Microsoft.NET.Test.Sdk.nuspec | 16 +++++++++++++++- .../Microsoft.NET.Test.Sdk.targets | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/eng/verify-nupkgs.ps1 b/eng/verify-nupkgs.ps1 index 9c23ac52d8..f1595e100f 100644 --- a/eng/verify-nupkgs.ps1 +++ b/eng/verify-nupkgs.ps1 @@ -18,7 +18,7 @@ function Verify-Nuget-Packages { Write-Host "Starting Verify-Nuget-Packages." $expectedNumOfFiles = @{ "Microsoft.CodeCoverage" = 59; - "Microsoft.NET.Test.Sdk" = 20; + "Microsoft.NET.Test.Sdk" = 25; "Microsoft.TestPlatform" = 619; "Microsoft.TestPlatform.Build" = 20; "Microsoft.TestPlatform.CLI" = 481; diff --git a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec index 12c281a274..13812afbd9 100644 --- a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec +++ b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec @@ -8,10 +8,15 @@ + + + + + @@ -26,13 +31,22 @@ - + + + + + + + + + + diff --git a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets index 6ef96e693d..d2d47da66e 100644 --- a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets +++ b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets @@ -1,6 +1,6 @@ - + Condition="'$(SuppressTfmSupportBuildErrors)' == ''"> +