diff --git a/src/dotnet-core-uninstall/LocalizableStrings.Designer.cs b/src/dotnet-core-uninstall/LocalizableStrings.Designer.cs
index 5ed8aefc..5e3df9f7 100644
--- a/src/dotnet-core-uninstall/LocalizableStrings.Designer.cs
+++ b/src/dotnet-core-uninstall/LocalizableStrings.Designer.cs
@@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Tools.Uninstall {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class LocalizableStrings {
@@ -291,7 +291,7 @@ internal static string MacListCommandOutput {
}
///
- /// Looks up a localized string similar to Microsoft .NET Core {0} {1} (x64).
+ /// Looks up a localized string similar to Microsoft .NET Core {0} {1} ({2}).
///
internal static string MacOsBundleDisplayNameFormat {
get {
diff --git a/src/dotnet-core-uninstall/LocalizableStrings.resx b/src/dotnet-core-uninstall/LocalizableStrings.resx
index 035fd1c8..0f2aee37 100644
--- a/src/dotnet-core-uninstall/LocalizableStrings.resx
+++ b/src/dotnet-core-uninstall/LocalizableStrings.resx
@@ -229,7 +229,7 @@
Uninstalling: {0}.
- Microsoft .NET Core {0} {1} (x64)
+ Microsoft .NET Core {0} {1} ({2})
Canceling: waiting for the current uninstall to complete.
@@ -390,4 +390,4 @@ Warning: {0}: {1}
Uninstalling this item will cause Visual Studio for to break.
-
+
\ No newline at end of file
diff --git a/src/dotnet-core-uninstall/MacOs/FileSystemExplorer.cs b/src/dotnet-core-uninstall/MacOs/FileSystemExplorer.cs
index b7cff624..9e7bdd5b 100644
--- a/src/dotnet-core-uninstall/MacOs/FileSystemExplorer.cs
+++ b/src/dotnet-core-uninstall/MacOs/FileSystemExplorer.cs
@@ -26,10 +26,8 @@ internal class FileSystemExplorer : IBundleCollector
public virtual IEnumerable GetAllInstalledBundles()
{
- var nativeArch = IsMacx64Installation(DotNetInstallPath) ? BundleArch.X64 : BundleArch.Arm64;
- var sdks = GetInstalledBundles(nativeArch, DotNetSdkInstallPath(DotNetInstallPath));
+ var sdks = GetInstalledBundles(DotNetSdkInstallPath(DotNetInstallPath));
var runtimes = GetInstalledBundles(
- nativeArch,
DotNetRuntimeInstallPath(DotNetInstallPath),
DotNetAspAllInstallPath(DotNetInstallPath),
DotNetAspAppInstallPath(DotNetInstallPath),
@@ -37,25 +35,23 @@ public virtual IEnumerable GetAllInstalledBundles()
if (Directory.Exists(EmulatedDotNetInstallPath))
{
- sdks = sdks.Concat(GetInstalledBundles(BundleArch.X64, DotNetSdkInstallPath(EmulatedDotNetInstallPath)));
+ sdks = sdks.Concat(GetInstalledBundles(DotNetSdkInstallPath(EmulatedDotNetInstallPath)));
runtimes = runtimes.Concat(GetInstalledBundles(
- BundleArch.X64,
- DotNetRuntimeInstallPath(DotNetInstallPath),
- DotNetAspAllInstallPath(DotNetInstallPath),
- DotNetAspAppInstallPath(DotNetInstallPath),
- DotNetHostFxrInstallPath(DotNetInstallPath)));
+ DotNetRuntimeInstallPath(EmulatedDotNetInstallPath),
+ DotNetAspAllInstallPath(EmulatedDotNetInstallPath),
+ DotNetAspAppInstallPath(EmulatedDotNetInstallPath),
+ DotNetHostFxrInstallPath(EmulatedDotNetInstallPath)));
}
- return sdks.Concat(runtimes).ToList();
+ return [..sdks, ..runtimes];
}
- private static bool IsMacx64Installation(string path)
+ private static bool IsMacx64Installation(string sdkVersionPath)
{
try
{
- var versionDirs = Directory.GetDirectories(Path.Combine(path, "sdk"));
- var rids = File.ReadAllText(Path.Combine(versionDirs[0], "NETCoreSdkRuntimeIdentifierChain.txt"));
- return !rids.Contains("arm64");
+ var rids = File.ReadAllText(Path.Combine(sdkVersionPath, "NETCoreSdkRuntimeIdentifierChain.txt"));
+ return !rids.Contains("osx-arm64");
}
catch
{
@@ -63,7 +59,7 @@ private static bool IsMacx64Installation(string path)
}
}
- private static IEnumerable GetInstalledBundles(BundleArch arch, params string[] paths)
+ private static IEnumerable GetInstalledBundles(params string[] paths)
where TBundleVersion : BundleVersion, IComparable, new()
{
string bundleTypeString;
@@ -79,12 +75,12 @@ private static IEnumerable GetInstalledBundles(BundleArc
.GroupBy(tuple => tuple.Version)
.Select(group => Bundle.From(
group.First().Version,
- arch,
+ group.First().Arch,
GetUninstallCommand(group.Select(tuple => tuple.Path)),
- string.Format(LocalizableStrings.MacOsBundleDisplayNameFormat, bundleTypeString, group.First().Version.ToString())));
+ string.Format(LocalizableStrings.MacOsBundleDisplayNameFormat, bundleTypeString, group.First().Version.ToString(), group.First().Arch.ToString().ToLowerInvariant())));
}
- private static IEnumerable<(TBundleVersion Version, string Path)> GetInstalledVersionsAndUninstallCommands(string path)
+ private static IEnumerable<(TBundleVersion Version, string Path, BundleArch Arch)> GetInstalledVersionsAndUninstallCommands(string path)
where TBundleVersion : BundleVersion, IComparable, new()
{
return Directory.Exists(path) ?
@@ -93,11 +89,12 @@ private static IEnumerable GetInstalledBundles(BundleArc
.Select(dirInfo =>
{
var success = BundleVersion.TryFromInput(dirInfo.Name, out var version);
- return (Success: success, Version: version, Path: dirInfo.FullName);
+ var arch = IsMacx64Installation(dirInfo.FullName) ? BundleArch.X64 : BundleArch.Arm64;
+ return (Success: success, Version: version, Path: dirInfo.FullName, Arch: arch);
})
.Where(tuple => tuple.Success)
- .Select(tuple => (tuple.Version, tuple.Path)) :
- new List<(TBundleVersion Version, string Path)>();
+ .Select(tuple => (tuple.Version, tuple.Path, tuple.Arch)) :
+ new List<(TBundleVersion Version, string Path, BundleArch Arch)>();
}
private static string GetUninstallCommand(IEnumerable paths)
diff --git a/src/dotnet-core-uninstall/Shared/Configs/CommandLineConfigs.cs b/src/dotnet-core-uninstall/Shared/Configs/CommandLineConfigs.cs
index 0c489d1f..e834d5a1 100644
--- a/src/dotnet-core-uninstall/Shared/Configs/CommandLineConfigs.cs
+++ b/src/dotnet-core-uninstall/Shared/Configs/CommandLineConfigs.cs
@@ -52,6 +52,7 @@ internal static class CommandLineConfigs
public static readonly string HostingBundleOptionName = "hosting-bundle";
public static readonly string X64OptionName = "x64";
public static readonly string X86OptionName = "x86";
+ public static readonly string Arm64OptionName = "arm64";
public static readonly Option UninstallAllOption = new Option(
"--all",
@@ -314,7 +315,8 @@ public static BundleArch GetArchSelection(this ParseResult parseResult)
var archSelection = new[]
{
(OptionName: X64OptionName, Arch: BundleArch.X64),
- (OptionName: X86OptionName, Arch: BundleArch.X86)
+ (OptionName: X86OptionName, Arch: BundleArch.X86),
+ (OptionName: Arm64OptionName, Arch: BundleArch.Arm64)
}
.Where(tuple => parseResult.ValueForOption($"--{tuple.OptionName}"))
.Select(tuple => tuple.Arch)
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.cs.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.cs.xlf
index 3b84f842..c30e5b65 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.cs.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.cs.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.de.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.de.xlf
index f4078691..bc9c8aa7 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.de.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.de.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.es.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.es.xlf
index 0bc7c46a..fdd03e01 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.es.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.es.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.fr.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.fr.xlf
index a9ad3573..ca063615 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.fr.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.fr.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.it.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.it.xlf
index cb869c36..29b4e253 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.it.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.it.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.ja.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.ja.xlf
index 146cf074..07e0da2f 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.ja.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.ja.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.ko.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.ko.xlf
index 8f5ed828..cad26ea7 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.ko.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.ko.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.pl.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.pl.xlf
index 9943aab0..2a7d8f5f 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.pl.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.pl.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.pt-BR.xlf
index 3ce94ba8..2fceb1f0 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.pt-BR.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.ru.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.ru.xlf
index f52e8136..d1e40ff5 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.ru.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.ru.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.tr.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.tr.xlf
index 0edb4608..04a437d8 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.tr.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.tr.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hans.xlf
index f931ff9b..aec20ff4 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hans.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})
diff --git a/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hant.xlf
index 6b91e5e3..455186ec 100644
--- a/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/dotnet-core-uninstall/xlf/LocalizableStrings.zh-Hant.xlf
@@ -151,8 +151,8 @@ This tool cannot uninstall versions of the runtime or SDK that are installed usi
-
- Microsoft .NET Core {0} {1} (x64)
+
+ Microsoft .NET Core {0} {1} ({2})