From 93da19ba3a8163c1865afc509ebb6c748b1d9a59 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Oct 2025 22:05:22 +0000 Subject: [PATCH 01/12] Initial plan From 32adf0fc07580213c969ace752e84a87f4cc4a5b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Oct 2025 22:12:17 +0000 Subject: [PATCH 02/12] Add support for uninstalling .NET 10 Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../VSVersioning/VisualStudioSafeVersionsExtractor.cs | 5 +++-- .../Shared/VSVersioning/VSVersionTests.cs | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs index c964c0c2..44c04096 100644 --- a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs +++ b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs @@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Tools.Uninstall.Shared.VSVersioning internal static class VisualStudioSafeVersionsExtractor { // The tool should not be used to uninstall any more recent versions of the sdk - public static readonly SemanticVersion UpperLimit = new SemanticVersion(10, 0, 0); + public static readonly SemanticVersion UpperLimit = new SemanticVersion(11, 0, 0); // Must keep one of each of these divisions to ensure Visual Studio works. // Pairs are [inclusive, exclusive) @@ -30,7 +30,8 @@ internal static class VisualStudioSafeVersionsExtractor { (new SemanticVersion(6, 0, 100), new SemanticVersion(6, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(7, 0, 100), new SemanticVersion(7, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(8, 0, 100), new SemanticVersion(8, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, - { (new SemanticVersion(9, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") } + { (new SemanticVersion(9, 0, 100), new SemanticVersion(9, 0, 400)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") }, + { (new SemanticVersion(10, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") } }; private static (IDictionary, string>, IEnumerable) ApplyWindowsVersionDivisions(IEnumerable bundleList) diff --git a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs index 8c36e183..ef3f56ad 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs @@ -31,7 +31,8 @@ public class VSVersionTests [InlineData(new string[] { "6.0.100", "6.0.101", "7.0.100" }, new bool[] { true, false, false })] [InlineData(new string[] { "7.0.100", "7.0.101", "8.0.100" }, new bool[] { true, false, false })] [InlineData(new string[] { "8.0.100", "8.0.101", "9.0.100" }, new bool[] { true, false, false })] - [InlineData(new string[] { "10.0.100", "10.0.101", "11.100.100" }, new bool[] { false, false, false })] + [InlineData(new string[] { "9.0.100", "9.0.101", "10.0.100" }, new bool[] { true, false, false })] + [InlineData(new string[] { "10.0.100", "10.0.101", "11.100.100" }, new bool[] { true, false, false })] internal void TestGetUninstallableWindows(string[] versions, bool[] allowed) { var bundles = new List(); @@ -83,7 +84,7 @@ internal void TestGetUninstallableMac(string[] sdkVersions, bool[] sdkAllowed, s [InlineData(new string[] { "5.0.100", "5.0.101", "10.0.1" }, new bool[] { true, false, false })] [InlineData(new string[] { "6.0.100", "7.0.100", "7.0.101" }, new bool[] { false, true, false })] [InlineData(new string[] { "9.0.100", "9.0.101", "10.100.100" }, new bool[] { true, false, false })] - [InlineData(new string[] { "10.0.100", "10.0.101", "11.100.100" }, new bool[] { false, false, false })] + [InlineData(new string[] { "10.0.100", "10.0.101", "11.100.100" }, new bool[] { true, false, false })] internal void TestGetUninstallableNonSdkVersionsWindows(string[] versions, bool[] allowed) { var bundles = new List(); @@ -184,7 +185,7 @@ private void CheckAllowed(IEnumerable allBundles, IEnumerable un [InlineData(new string[] { "1.0.1", "1.0.0" }, new string[] { "", "None" })] [InlineData(new string[] { "2.3.0", "2.1.800", "2.1.300" }, new string[] { "None", " 2019", " 2017" })] [InlineData(new string[] { "2.1.500", "2.1.400", "2.1.600" }, new string[] { " 2017", "None", " 2019" })] - [InlineData(new string[] { "2.1.500", "10.0.1", "10.0.0" }, new string[] { " 2017", "UpperLimit", "UpperLimit" })] + [InlineData(new string[] { "2.1.500", "10.0.1", "10.0.0" }, new string[] { " 2017", "", "None" })] internal void TestGetListCommandUninstallableStringsWindows(string[] versions, string[] expectedStrings) { expectedStrings = expectedStrings.Select(s => s.Equals("UpperLimit") ? VisualStudioSafeVersionsExtractor.UpperLimit.ToNormalizedString() : s).ToArray(); @@ -206,7 +207,7 @@ internal void TestGetListCommandUninstallableStringsWindows(string[] versions, s [InlineData(new string[] { "1.0.0", "1.0.1" }, new string[] { "None", "SDK" }, new string[] { "1.0.0", "1.0.1" }, new string[] { "None", "Runtime" })] [InlineData(new string[] { "2.1.0", "1.0.1" }, new string[] { "SDK", "None" }, new string[] { "2.0.0", "1.1.0" }, new string[] { "Runtime", "Runtime" })] [InlineData(new string[] { "3.0.100", "5.0.100" }, new string[] { "None", "SDK" }, new string[] { "1.0.0", "1.1.0", "1.0.1", "1.0.2", "1.1.3" }, new string[] { "None", "None", "None", "Runtime", "Runtime" })] - [InlineData(new string[] { "3.0.100", "5.0.100" }, new string[] { "None", "SDK" }, new string[] { "1.0.0", "1.1.0", "1.0.1", "10.0.100" }, new string[] { "None", "Runtime", "Runtime", "UpperLimit" })] + [InlineData(new string[] { "3.0.100", "5.0.100" }, new string[] { "None", "SDK" }, new string[] { "1.0.0", "1.1.0", "1.0.1", "10.0.100" }, new string[] { "None", "Runtime", "Runtime", "Runtime" })] [InlineData(new string[] { "5.0.100", "5.0.101", "11.100.100" }, new string[] { "None", "SDK", "UpperLimit" }, new string[] { "5.0.100", "11.0.0" }, new string[] { "Runtime", "UpperLimit" })] internal void StringsMac(string[] sdkVersions, string[] sdkExpected, string[] runtimeVersions, string[] runtimeExpected) From b95b878f8feb71477aed930cc900b5d98ff1f101 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Oct 2025 23:07:00 +0000 Subject: [PATCH 03/12] Fix .NET 9 version range to cover all 9.x versions Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs index 44c04096..210d0e57 100644 --- a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs +++ b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs @@ -30,7 +30,7 @@ internal static class VisualStudioSafeVersionsExtractor { (new SemanticVersion(6, 0, 100), new SemanticVersion(6, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(7, 0, 100), new SemanticVersion(7, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(8, 0, 100), new SemanticVersion(8, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, - { (new SemanticVersion(9, 0, 100), new SemanticVersion(9, 0, 400)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") }, + { (new SemanticVersion(9, 0, 100), new SemanticVersion(10, 0, 0)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") }, { (new SemanticVersion(10, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") } }; From 8ada18167ff137087c11fe20323a43c57b4d1a5e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Oct 2025 18:40:55 +0000 Subject: [PATCH 04/12] Fix .NET 10 range to start at 10.0.0 instead of 10.0.100 Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs index 210d0e57..6facbaa3 100644 --- a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs +++ b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs @@ -31,7 +31,7 @@ internal static class VisualStudioSafeVersionsExtractor { (new SemanticVersion(7, 0, 100), new SemanticVersion(7, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(8, 0, 100), new SemanticVersion(8, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(9, 0, 100), new SemanticVersion(10, 0, 0)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") }, - { (new SemanticVersion(10, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") } + { (new SemanticVersion(10, 0, 0), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") } }; private static (IDictionary, string>, IEnumerable) ApplyWindowsVersionDivisions(IEnumerable bundleList) From 01803de990c9e6cbde5ce9a5bd02c05d69411ab6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Oct 2025 23:14:26 +0000 Subject: [PATCH 05/12] Fix tests for .NET 11 upper limit change Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../Shared/Commands/CommandBundleFilterTests.cs | 1 - .../Shared/VSVersioning/VSVersionTests.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs index c4d5c584..19fb8c5a 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs @@ -132,7 +132,6 @@ internal void TestRequiredUninstallableWhenExplicitlyAdded(IEnumerable b } [Theory] - [InlineData("remove {0} 10.0.100")] [InlineData("remove {0} 11.11.11")] [InlineData("remove {0} --all --force")] [InlineData("remove {0} 1.0.0 1.0.1 1.1.0 2.1.0 2.1.500 2.1.600 2.2.100 2.2.200 5.0.100 7.0.100 11.11.11")] diff --git a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs index ef3f56ad..06ce48b2 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs @@ -169,7 +169,7 @@ private void CheckAllowed(IEnumerable allBundles, IEnumerable un // Check others are uninstallable unless their version is above the upper limit foreach (Bundle bundle in otherBundles) { - if (bundle.Version.SemVer > VisualStudioSafeVersionsExtractor.UpperLimit) + if (bundle.Version.SemVer >= VisualStudioSafeVersionsExtractor.UpperLimit) { uninstallableBundles.Should().NotContain(bundle); } From 53a1bedd07375a92ae18de9731f59ea4408047c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Oct 2025 19:03:16 +0000 Subject: [PATCH 06/12] Update .NET 9/10 version ranges and VS versions per review feedback Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../VSVersioning/VisualStudioSafeVersionsExtractor.cs | 4 ++-- .../Shared/Commands/CommandBundleFilterTests.cs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs index 6facbaa3..fd1c058e 100644 --- a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs +++ b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs @@ -30,8 +30,8 @@ internal static class VisualStudioSafeVersionsExtractor { (new SemanticVersion(6, 0, 100), new SemanticVersion(6, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(7, 0, 100), new SemanticVersion(7, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(8, 0, 100), new SemanticVersion(8, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, - { (new SemanticVersion(9, 0, 100), new SemanticVersion(10, 0, 0)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") }, - { (new SemanticVersion(10, 0, 0), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") } + { (new SemanticVersion(9, 0, 100), new SemanticVersion(9, 0, 400)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, + { (new SemanticVersion(10, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2026") } }; private static (IDictionary, string>, IEnumerable) ApplyWindowsVersionDivisions(IEnumerable bundleList) diff --git a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs index 19fb8c5a..f2cd6730 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Tools.Uninstall.Tests.Shared.Commands { public class CommandBundleFilterTests { - private static readonly string[] versions = { "1.0.0", "1.0.1", "1.1.0", "2.1.0", "2.1.500", "2.1.600", "2.2.100", "2.2.200", "5.0.100", "6.0.100", "7.0.100", "8.0.100", "9.0.100", "10.0.100", "11.11.11" }; + private static readonly string[] versions = { "1.0.0", "1.0.1", "1.1.0", "2.1.0", "2.1.500", "2.1.600", "2.2.100", "2.2.200", "5.0.100", "6.0.100", "7.0.100", "8.0.100", "9.0.100", "10.0.100", "11.0.100", "11.11.11" }; private Dictionary versionsWithArch = new Dictionary { { "3.0.0", BundleArch.X64 }, @@ -132,9 +132,11 @@ internal void TestRequiredUninstallableWhenExplicitlyAdded(IEnumerable b } [Theory] + [InlineData("remove {0} 10.0.100")] + [InlineData("remove {0} 11.0.100")] [InlineData("remove {0} 11.11.11")] [InlineData("remove {0} --all --force")] - [InlineData("remove {0} 1.0.0 1.0.1 1.1.0 2.1.0 2.1.500 2.1.600 2.2.100 2.2.200 5.0.100 7.0.100 11.11.11")] + [InlineData("remove {0} 1.0.0 1.0.1 1.1.0 2.1.0 2.1.500 2.1.600 2.2.100 2.2.200 5.0.100 7.0.100 11.0.100 11.11.11")] internal void TestUpperLimitAlwaysRequired(string command) { var sdkBundles = new List>(); From 81f1158a6f812a229cf15f43d1fa5d76bcde7584 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Oct 2025 00:06:11 +0000 Subject: [PATCH 07/12] Add version range for .NET 10.0.0-10.0.100 and remove invalid test case Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs | 1 + .../Shared/Commands/CommandBundleFilterTests.cs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs index fd1c058e..07291c7e 100644 --- a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs +++ b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs @@ -31,6 +31,7 @@ internal static class VisualStudioSafeVersionsExtractor { (new SemanticVersion(7, 0, 100), new SemanticVersion(7, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(8, 0, 100), new SemanticVersion(8, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(9, 0, 100), new SemanticVersion(9, 0, 400)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, + { (new SemanticVersion(10, 0, 0), new SemanticVersion(10, 0, 100)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2026") }, { (new SemanticVersion(10, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2026") } }; diff --git a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs index f2cd6730..187dbbbe 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs @@ -132,7 +132,6 @@ internal void TestRequiredUninstallableWhenExplicitlyAdded(IEnumerable b } [Theory] - [InlineData("remove {0} 10.0.100")] [InlineData("remove {0} 11.0.100")] [InlineData("remove {0} 11.11.11")] [InlineData("remove {0} --all --force")] From f02d3ca2e4563bb8f4305a0bfb3ed27ff1b5d8b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 20:55:40 +0000 Subject: [PATCH 08/12] Fix VS version for .NET 10.0.0-10.0.100 range to use empty string Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs index 07291c7e..d15d1ead 100644 --- a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs +++ b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs @@ -31,7 +31,7 @@ internal static class VisualStudioSafeVersionsExtractor { (new SemanticVersion(7, 0, 100), new SemanticVersion(7, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(8, 0, 100), new SemanticVersion(8, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(9, 0, 100), new SemanticVersion(9, 0, 400)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, - { (new SemanticVersion(10, 0, 0), new SemanticVersion(10, 0, 100)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2026") }, + { (new SemanticVersion(10, 0, 0), new SemanticVersion(10, 0, 100)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") }, { (new SemanticVersion(10, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2026") } }; From 079e8414e027b396ca2db0e0243cae95fa137f83 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 23 Oct 2025 16:39:03 -0700 Subject: [PATCH 09/12] Remove obsolete version range for SemanticVersion 10.0 Removed an entry for SemanticVersion 10.0.0 to 10.0.100. --- .../Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs index d15d1ead..fd1c058e 100644 --- a/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs +++ b/src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs @@ -31,7 +31,6 @@ internal static class VisualStudioSafeVersionsExtractor { (new SemanticVersion(7, 0, 100), new SemanticVersion(7, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(8, 0, 100), new SemanticVersion(8, 0, 500)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, { (new SemanticVersion(9, 0, 100), new SemanticVersion(9, 0, 400)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2022") }, - { (new SemanticVersion(10, 0, 0), new SemanticVersion(10, 0, 100)), string.Format(LocalizableStrings.WindowsRequirementExplanationString, "") }, { (new SemanticVersion(10, 0, 100), UpperLimit), string.Format(LocalizableStrings.WindowsRequirementExplanationString, " 2026") } }; From 4a7c850d8fc71a47ca584d280203495ad6cb144c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 19:01:06 +0000 Subject: [PATCH 10/12] Changes before error encountered Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> --- .../Shared/VSVersioning/VSVersionTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs index 06ce48b2..2d1930a9 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs @@ -81,7 +81,7 @@ internal void TestGetUninstallableMac(string[] sdkVersions, bool[] sdkAllowed, s [InlineData(new string[] { "1.0.0", "1.0.1", "1.0.2" }, new bool[] { true, true, false })] [InlineData(new string[] { "2.1.500", "2.1.400", "2.1.600" }, new bool[] { false, true, false })] [InlineData(new string[] { "2.2.100", "2.2.200", "2.2.300" }, new bool[] { false, true, false })] - [InlineData(new string[] { "5.0.100", "5.0.101", "10.0.1" }, new bool[] { true, false, false })] + [InlineData(new string[] { "5.0.100", "5.0.101", "10.0.1" }, new bool[] { true, false, true })] [InlineData(new string[] { "6.0.100", "7.0.100", "7.0.101" }, new bool[] { false, true, false })] [InlineData(new string[] { "9.0.100", "9.0.101", "10.100.100" }, new bool[] { true, false, false })] [InlineData(new string[] { "10.0.100", "10.0.101", "11.100.100" }, new bool[] { true, false, false })] @@ -185,7 +185,7 @@ private void CheckAllowed(IEnumerable allBundles, IEnumerable un [InlineData(new string[] { "1.0.1", "1.0.0" }, new string[] { "", "None" })] [InlineData(new string[] { "2.3.0", "2.1.800", "2.1.300" }, new string[] { "None", " 2019", " 2017" })] [InlineData(new string[] { "2.1.500", "2.1.400", "2.1.600" }, new string[] { " 2017", "None", " 2019" })] - [InlineData(new string[] { "2.1.500", "10.0.1", "10.0.0" }, new string[] { " 2017", "", "None" })] + [InlineData(new string[] { "2.1.500", "10.0.1", "10.0.0" }, new string[] { " 2017", "None", "None" })] internal void TestGetListCommandUninstallableStringsWindows(string[] versions, string[] expectedStrings) { expectedStrings = expectedStrings.Select(s => s.Equals("UpperLimit") ? VisualStudioSafeVersionsExtractor.UpperLimit.ToNormalizedString() : s).ToArray(); From 960c7ab7075fbac5c7fbc607a4677e8c51d0711e Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 29 Oct 2025 12:10:36 -0700 Subject: [PATCH 11/12] Fix up a few of the test instances based on looking at the 9 PR that copilot missed (and some that were wrong in the 9 PR). --- .../Shared/Commands/CommandBundleFilterTests.cs | 6 +++--- .../Shared/VSVersioning/VSVersionTests.cs | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs index 187dbbbe..d0a81cf2 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Tools.Uninstall.Tests.Shared.Commands { public class CommandBundleFilterTests { - private static readonly string[] versions = { "1.0.0", "1.0.1", "1.1.0", "2.1.0", "2.1.500", "2.1.600", "2.2.100", "2.2.200", "5.0.100", "6.0.100", "7.0.100", "8.0.100", "9.0.100", "10.0.100", "11.0.100", "11.11.11" }; + private static readonly string[] versions = { "1.0.0", "1.0.1", "1.1.0", "2.1.0", "2.1.500", "2.1.600", "2.2.100", "2.2.200", "5.0.100", "6.0.100", "7.0.100", "8.0.100", "9.0.100", "10.0.100", "11.0.100", "12.12.12" }; private Dictionary versionsWithArch = new Dictionary { { "3.0.0", BundleArch.X64 }, @@ -133,9 +133,9 @@ internal void TestRequiredUninstallableWhenExplicitlyAdded(IEnumerable b [Theory] [InlineData("remove {0} 11.0.100")] - [InlineData("remove {0} 11.11.11")] + [InlineData("remove {0} 12.12.12")] [InlineData("remove {0} --all --force")] - [InlineData("remove {0} 1.0.0 1.0.1 1.1.0 2.1.0 2.1.500 2.1.600 2.2.100 2.2.200 5.0.100 7.0.100 11.0.100 11.11.11")] + [InlineData("remove {0} 1.0.0 1.0.1 1.1.0 2.1.0 2.1.500 2.1.600 2.2.100 2.2.200 5.0.100 7.0.100 11.0.100 12.12.12")] internal void TestUpperLimitAlwaysRequired(string command) { var sdkBundles = new List>(); diff --git a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs index 2d1930a9..f7453e1b 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs @@ -32,7 +32,8 @@ public class VSVersionTests [InlineData(new string[] { "7.0.100", "7.0.101", "8.0.100" }, new bool[] { true, false, false })] [InlineData(new string[] { "8.0.100", "8.0.101", "9.0.100" }, new bool[] { true, false, false })] [InlineData(new string[] { "9.0.100", "9.0.101", "10.0.100" }, new bool[] { true, false, false })] - [InlineData(new string[] { "10.0.100", "10.0.101", "11.100.100" }, new bool[] { true, false, false })] + [InlineData(new string[] { "10.0.100", "10.0.101", "11.0.100" }, new bool[] { true, false, false })] + [InlineData(new string[] { "11.0.100", "11.0.101", "12.0.100" }, new bool[] { false, false, false })] internal void TestGetUninstallableWindows(string[] versions, bool[] allowed) { var bundles = new List(); @@ -55,7 +56,7 @@ internal void TestGetUninstallableWindows(string[] versions, bool[] allowed) [InlineData(new string[] { "2.1.0", "1.0.1" }, new bool[] { false, true }, new string[] { "1.0.0", "1.1.0" }, new bool[] { false, false })] [InlineData(new string[] { "3.0.0", "7.0.100" }, new bool[] { true, false }, new string[] { "1.0.0", "1.1.0", "1.0.1", "1.0.2", "1.1.3" }, new bool[] { true, true, true, false, false })] [InlineData(new string[] { "3.0.0", "5.0.100" }, new bool[] { true, false }, new string[] { "1.0.0", "1.1.0", "1.0.1", "5.0.100" }, new bool[] { true, false, false, false })] - [InlineData(new string[] { "5.0.100", "5.0.101", "11.100.100" }, new bool[] { true, false, false }, new string[] { "5.0.100", "11.0.0" }, new bool[] { false, false })] + [InlineData(new string[] { "5.0.100", "5.0.101", "11.0.100" }, new bool[] { true, false, false }, new string[] { "5.0.100", "11.0.0" }, new bool[] { false, false })] [InlineData(new string[] { "5.0.100", "6.0.100", "6.0.101" }, new bool[] { true, true, false }, new string[] { "5.0.100" }, new bool[] { false })] internal void TestGetUninstallableMac(string[] sdkVersions, bool[] sdkAllowed, string[] runtimeVersions, bool[] runtimeAllowed) { @@ -84,7 +85,8 @@ internal void TestGetUninstallableMac(string[] sdkVersions, bool[] sdkAllowed, s [InlineData(new string[] { "5.0.100", "5.0.101", "10.0.1" }, new bool[] { true, false, true })] [InlineData(new string[] { "6.0.100", "7.0.100", "7.0.101" }, new bool[] { false, true, false })] [InlineData(new string[] { "9.0.100", "9.0.101", "10.100.100" }, new bool[] { true, false, false })] - [InlineData(new string[] { "10.0.100", "10.0.101", "11.100.100" }, new bool[] { true, false, false })] + [InlineData(new string[] { "10.0.100", "10.0.101", "11.0.100" }, new bool[] { true, false, false })] + [InlineData(new string[] { "11.0.100", "11.0.101", "12.0.100" }, new bool[] { false, false, false })] internal void TestGetUninstallableNonSdkVersionsWindows(string[] versions, bool[] allowed) { var bundles = new List(); @@ -208,7 +210,7 @@ internal void TestGetListCommandUninstallableStringsWindows(string[] versions, s [InlineData(new string[] { "2.1.0", "1.0.1" }, new string[] { "SDK", "None" }, new string[] { "2.0.0", "1.1.0" }, new string[] { "Runtime", "Runtime" })] [InlineData(new string[] { "3.0.100", "5.0.100" }, new string[] { "None", "SDK" }, new string[] { "1.0.0", "1.1.0", "1.0.1", "1.0.2", "1.1.3" }, new string[] { "None", "None", "None", "Runtime", "Runtime" })] [InlineData(new string[] { "3.0.100", "5.0.100" }, new string[] { "None", "SDK" }, new string[] { "1.0.0", "1.1.0", "1.0.1", "10.0.100" }, new string[] { "None", "Runtime", "Runtime", "Runtime" })] - [InlineData(new string[] { "5.0.100", "5.0.101", "11.100.100" }, new string[] { "None", "SDK", "UpperLimit" }, new string[] { "5.0.100", "11.0.0" }, new string[] { "Runtime", "UpperLimit" })] + [InlineData(new string[] { "5.0.100", "5.0.101", "11.0.100" }, new string[] { "None", "SDK", "UpperLimit" }, new string[] { "5.0.100", "11.0.0" }, new string[] { "Runtime", "UpperLimit" })] internal void StringsMac(string[] sdkVersions, string[] sdkExpected, string[] runtimeVersions, string[] runtimeExpected) { From cc43e30afe4818ea0fda03ec25dd8f2b6a292dbe Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 31 Oct 2025 13:27:50 -0700 Subject: [PATCH 12/12] Add access token to the env block for the signing step --- .vsts-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index cc3714d7..55511b0b 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -150,6 +150,8 @@ extends: --prepareMachine -p:RID=$(_RID) -p:DotNetSignType=$(_SignType) -p:TeamName=$(TeamName) -p:OfficialBuildId=$(Build.BuildNumber) displayName: Build + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - script: | codesign -dv --verbose=4 artifacts/layout/dotnet-core-uninstall/dotnet-core-uninstall name: VerifySignature