From c8a5942e41672765e6195d4f9a5824e7ff28fa4e Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 18 Jan 2024 16:15:50 -0800
Subject: [PATCH 01/39] framework
---
.../Microsoft.DotNet.NativeWrapper/Interop.cs | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
index 98769e68e2df..38ae4bf3fb11 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
@@ -149,6 +149,18 @@ internal static extern int hostfxr_resolve_sdk2(
hostfxr_resolve_sdk2_flags_t flags,
hostfxr_resolve_sdk2_result_fn result);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF16)]
+ internal delegate int hostfxr_initialize_for_runtime_config_fn(
+ string runtime_config_path,
+ IntPtr parameters,
+ out IntPtr host_context_handle);
+
+ [DllImport(Constants.HostFxr, CharSet = UTF16, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+ internal static extern int hostfxr_initialize_for_runtime_config(
+ string runtime_config_path,
+ IntPtr parameters,
+ out IntPtr host_context_handle);
+
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF16)]
internal delegate void hostfxr_get_available_sdks_result_fn(
int sdk_count,
@@ -179,6 +191,18 @@ internal static extern int hostfxr_resolve_sdk2(
hostfxr_resolve_sdk2_flags_t flags,
hostfxr_resolve_sdk2_result_fn result);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF8)]
+ internal delegate int hostfxr_initialize_for_runtime_config_fn(
+ string runtime_config_path,
+ IntPtr parameters,
+ out IntPtr host_context_handle);
+
+ [DllImport(Constants.HostFxr, CharSet = UTF8, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+ internal static extern int hostfxr_initialize_for_runtime_config(
+ string runtime_config_path,
+ IntPtr parameters,
+ out IntPtr host_context_handle);
+
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF8)]
internal delegate void hostfxr_get_available_sdks_result_fn(
int sdk_count,
From 31ccfc2dd837db5c409661a31595329280cb7951 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 18 Jan 2024 16:44:16 -0800
Subject: [PATCH 02/39] add function
---
.../Microsoft.DotNet.NativeWrapper/Interop.cs | 10 ++--------
.../NETCoreSdkResolverNativeWrapper.cs | 11 +++++++++++
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
index 38ae4bf3fb11..d2c9cf9f28b3 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
@@ -152,14 +152,11 @@ internal static extern int hostfxr_resolve_sdk2(
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF16)]
internal delegate int hostfxr_initialize_for_runtime_config_fn(
string runtime_config_path,
- IntPtr parameters,
out IntPtr host_context_handle);
[DllImport(Constants.HostFxr, CharSet = UTF16, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int hostfxr_initialize_for_runtime_config(
- string runtime_config_path,
- IntPtr parameters,
- out IntPtr host_context_handle);
+ string runtime_config_path);
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF16)]
internal delegate void hostfxr_get_available_sdks_result_fn(
@@ -194,14 +191,11 @@ internal static extern int hostfxr_resolve_sdk2(
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF8)]
internal delegate int hostfxr_initialize_for_runtime_config_fn(
string runtime_config_path,
- IntPtr parameters,
out IntPtr host_context_handle);
[DllImport(Constants.HostFxr, CharSet = UTF8, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int hostfxr_initialize_for_runtime_config(
- string runtime_config_path,
- IntPtr parameters,
- out IntPtr host_context_handle);
+ string runtime_config_path);
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF8)]
internal delegate void hostfxr_get_available_sdks_result_fn(
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
index 340d5c042f26..35b549fab184 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
@@ -50,5 +50,16 @@ public void Initialize(int count, string[] entries)
return list.Entries;
}
+
+ public static int InitializeForRuntimeConfig(string runtimeConfigPath)
+ {
+ var result = new SdkResolutionResult();
+
+ int errorCode = Interop.RunningOnWindows
+ ? Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath)
+ : Interop.Unix.hostfxr_initialize_for_runtime_config(runtimeConfigPath);
+
+ return errorCode;
+ }
}
}
From 1c5bf353cc3610fc58e7ea9c82f2551c46c92052 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 18 Jan 2024 16:57:07 -0800
Subject: [PATCH 03/39] call inside functions
---
.../ToolPackage/ToolPackageDownloader.cs | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index aca233442f01..75c2d63256bd 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -27,10 +27,8 @@
using NuGet.Versioning;
using NuGet.Configuration;
using Microsoft.TemplateEngine.Utils;
-using System.Text.Json;
-using System.Xml;
-using System.Text.Json.Nodes;
using Newtonsoft.Json.Linq;
+using Microsoft.DotNet.NativeWrapper;
namespace Microsoft.DotNet.Cli.ToolPackage
{
@@ -190,6 +188,21 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
});
}
+ private static void ReadRuntimeConfig(
+ ToolPackageInstance toolPackageInstance
+ )
+ {
+ var executableFilePath = toolPackageInstance.Commands[0].Executable;
+ var runtimeConfigFilePath = Path.ChangeExtension(executableFilePath.ToString(), ".runtimeconfig.json");
+
+ // Update the runtimeconfig.json file
+ if (File.Exists(runtimeConfigFilePath))
+ {
+ var result = NETCoreSdkResolverNativeWrapper.InitializeForRuntimeConfig(runtimeConfigFilePath);
+ Console.WriteLine(result);
+ }
+ }
+
// The following methods are copied from the LockFileUtils class in Nuget.Client
private static void AddToolsAssets(
ManagedCodeConventions managedCodeConventions,
From 3126fd0e03627e2fa352fe16260e0e0eff993bf0 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Mon, 22 Jan 2024 13:44:18 -0800
Subject: [PATCH 04/39] update the hostfx_initialize_runtime_config function
---
.../Microsoft.DotNet.NativeWrapper/Interop.cs | 5 +++-
.../NETCoreSdkResolverNativeWrapper.cs | 23 +++++++++++++++----
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
index d2c9cf9f28b3..6df1bdc2b31b 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
@@ -152,11 +152,14 @@ internal static extern int hostfxr_resolve_sdk2(
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF16)]
internal delegate int hostfxr_initialize_for_runtime_config_fn(
string runtime_config_path,
+ IntPtr parameters,
out IntPtr host_context_handle);
[DllImport(Constants.HostFxr, CharSet = UTF16, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int hostfxr_initialize_for_runtime_config(
- string runtime_config_path);
+ string runtime_config_path,
+ IntPtr parameters,
+ out IntPtr host_context_handle);
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF16)]
internal delegate void hostfxr_get_available_sdks_result_fn(
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
index 35b549fab184..a2db59783b26 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
@@ -51,15 +51,30 @@ public void Initialize(int count, string[] entries)
return list.Entries;
}
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct hostfxr_initialize_parameters
+ {
+
+ }
+
public static int InitializeForRuntimeConfig(string runtimeConfigPath)
{
var result = new SdkResolutionResult();
+ IntPtr hostContextHandle;
- int errorCode = Interop.RunningOnWindows
- ? Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath)
- : Interop.Unix.hostfxr_initialize_for_runtime_config(runtimeConfigPath);
+ hostfxr_initialize_parameters parameters = new hostfxr_initialize_parameters();
- return errorCode;
+ IntPtr parametersPtr = Marshal.AllocHGlobal(Marshal.SizeOf(parameters));
+ Marshal.StructureToPtr(parameters, parametersPtr, false);
+
+ if (File.Exists(runtimeConfigPath))
+ {
+ return Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath, parametersPtr, out hostContextHandle);
+ }
+ else
+ {
+ return -1;
+ }
}
}
}
From 4bb3a3ccb169594ac4223a8e7bfc9903cd80fa58 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Mon, 22 Jan 2024 15:02:14 -0800
Subject: [PATCH 05/39] update the wrapper for memory initialization
---
.../NETCoreSdkResolverNativeWrapper.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
index a2db59783b26..4ab09916588c 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
@@ -59,8 +59,7 @@ internal struct hostfxr_initialize_parameters
public static int InitializeForRuntimeConfig(string runtimeConfigPath)
{
- var result = new SdkResolutionResult();
- IntPtr hostContextHandle;
+ IntPtr hostContextHandle = default;
hostfxr_initialize_parameters parameters = new hostfxr_initialize_parameters();
@@ -69,7 +68,7 @@ public static int InitializeForRuntimeConfig(string runtimeConfigPath)
if (File.Exists(runtimeConfigPath))
{
- return Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath, parametersPtr, out hostContextHandle);
+ return Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath, default, out hostContextHandle);
}
else
{
From 0459205444f25524f661df0c420bff33125516da Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Mon, 22 Jan 2024 15:03:37 -0800
Subject: [PATCH 06/39] free memory after
---
.../NETCoreSdkResolverNativeWrapper.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
index 4ab09916588c..23a9c5d4b499 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
@@ -59,6 +59,7 @@ internal struct hostfxr_initialize_parameters
public static int InitializeForRuntimeConfig(string runtimeConfigPath)
{
+ var result = -1;
IntPtr hostContextHandle = default;
hostfxr_initialize_parameters parameters = new hostfxr_initialize_parameters();
@@ -68,12 +69,11 @@ public static int InitializeForRuntimeConfig(string runtimeConfigPath)
if (File.Exists(runtimeConfigPath))
{
- return Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath, default, out hostContextHandle);
- }
- else
- {
- return -1;
+ result = Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath, default, out hostContextHandle);
}
+
+ Marshal.FreeHGlobal(parametersPtr);
+ return result;
}
}
}
From b7cf73519190036c7f71a5ca4c4d0d718835e854 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Mon, 22 Jan 2024 15:07:27 -0800
Subject: [PATCH 07/39] able to run on unix
---
src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs | 5 ++++-
.../NETCoreSdkResolverNativeWrapper.cs | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
index 6df1bdc2b31b..38ae4bf3fb11 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
@@ -194,11 +194,14 @@ internal static extern int hostfxr_resolve_sdk2(
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF8)]
internal delegate int hostfxr_initialize_for_runtime_config_fn(
string runtime_config_path,
+ IntPtr parameters,
out IntPtr host_context_handle);
[DllImport(Constants.HostFxr, CharSet = UTF8, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int hostfxr_initialize_for_runtime_config(
- string runtime_config_path);
+ string runtime_config_path,
+ IntPtr parameters,
+ out IntPtr host_context_handle);
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF8)]
internal delegate void hostfxr_get_available_sdks_result_fn(
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
index 23a9c5d4b499..bfeab7cddbe8 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
@@ -69,7 +69,9 @@ public static int InitializeForRuntimeConfig(string runtimeConfigPath)
if (File.Exists(runtimeConfigPath))
{
- result = Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath, default, out hostContextHandle);
+ result = Interop.RunningOnWindows
+ ? Interop.Windows.hostfxr_initialize_for_runtime_config(runtimeConfigPath, default, out hostContextHandle)
+ : Interop.Unix.hostfxr_initialize_for_runtime_config(runtimeConfigPath, default, out hostContextHandle);
}
Marshal.FreeHGlobal(parametersPtr);
From bed712f99d1310dd5dd61fde4ffa93988dfbc6f4 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Mon, 22 Jan 2024 16:31:53 -0800
Subject: [PATCH 08/39] partial logic
---
src/Cli/dotnet/CommonLocalizableStrings.resx | 13 +++++++
.../ToolPackage/ToolPackageDownloader.cs | 37 +++++++++++++++++--
.../xlf/CommonLocalizableStrings.cs.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.de.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.es.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.fr.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.it.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.ja.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.ko.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.pl.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.pt-BR.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.ru.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.tr.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.zh-Hans.xlf | 24 ++++++++++++
.../xlf/CommonLocalizableStrings.zh-Hant.xlf | 24 ++++++++++++
15 files changed, 359 insertions(+), 3 deletions(-)
diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx
index 58c9371ccd01..ce5e17f1b23b 100644
--- a/src/Cli/dotnet/CommonLocalizableStrings.resx
+++ b/src/Cli/dotnet/CommonLocalizableStrings.resx
@@ -735,5 +735,18 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 75c2d63256bd..6608f3961f59 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -29,6 +29,7 @@
using Microsoft.TemplateEngine.Utils;
using Newtonsoft.Json.Linq;
using Microsoft.DotNet.NativeWrapper;
+using System.Text.Json;
namespace Microsoft.DotNet.Cli.ToolPackage
{
@@ -189,17 +190,47 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
}
private static void ReadRuntimeConfig(
- ToolPackageInstance toolPackageInstance
+ ToolPackageInstance toolPackageInstance,
+ PackageId packageId
)
{
var executableFilePath = toolPackageInstance.Commands[0].Executable;
var runtimeConfigFilePath = Path.ChangeExtension(executableFilePath.ToString(), ".runtimeconfig.json");
// Update the runtimeconfig.json file
+ // TBD: read tfm from runtimeconfig.json
+ string tfmValue = "";
if (File.Exists(runtimeConfigFilePath))
- {
+ {
+ JsonElement rootElement = JsonDocument.Parse(File.ReadAllText(runtimeConfigFilePath)).RootElement;
+
+ if (rootElement.TryGetProperty("runtimeOptions", out JsonElement runtimeOptionsElement) &&
+ runtimeOptionsElement.TryGetProperty("tfm", out JsonElement tfmElement))
+ {
+ tfmValue = tfmElement.GetString();
+ }
var result = NETCoreSdkResolverNativeWrapper.InitializeForRuntimeConfig(runtimeConfigFilePath);
- Console.WriteLine(result);
+ RuntimeConfigDetectionMessage(result, packageId, tfmValue);
+ }
+ }
+
+ private static void RuntimeConfigDetectionMessage(int result, PackageId packageId, string tfmValue = "")
+ {
+ switch(result)
+ {
+ // RuntimeConfigDetectionResult::Success
+ case 0:
+ case 1:
+ case 2:
+ break;
+
+ // RuntimeConfigDetectionResult incompatible
+ // TBD: if include -g in sample command; which version should be included in the install; --force?
+ default:
+ throw new ToolPackageException(
+ string.Format(
+ CommonLocalizableStrings.ToolPackageRuntimeConfigIncompatible,
+ packageId, "7"));
}
}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
index 8ae7960c4016..fa078748934c 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
@@ -285,6 +285,30 @@ Výchozí hodnota je false, ale pokud cílíte na .NET 7 nebo nižší a je zad
Tool settings file does not exist for the tool {0}.Soubor nastavení nástroje {0} neexistuje.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
index e8aed6ea1205..7f7948532444 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
@@ -285,6 +285,30 @@ Der Standardwert lautet FALSE. Wenn sie jedoch auf .NET 7 oder niedriger abziele
Tool settings file does not exist for the tool {0}.Die Tooleinstellungsdatei ist für das Tool „{0}“ nicht vorhanden.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
index d0456889ad38..54d395adf569 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
@@ -286,6 +286,30 @@ El valor predeterminado es "false". Sin embargo, cuando el destino es .NET 7 o i
Tool settings file does not exist for the tool {0}.El archivo de configuración de herramientas no existe para la herramienta {0}.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
index da5f2b48c79d..a3456db3f683 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
@@ -286,6 +286,30 @@ La valeur par défaut est « false ». Toutefois, lorsque vous ciblez .NET 7 ou
Tool settings file does not exist for the tool {0}.Le fichier de paramètres d’outil n’existe pas pour l’outil {0}.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
index 84b8e63f7b0d..dd262d508d83 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
@@ -285,6 +285,30 @@ Il valore predefinito è 'false'. Tuttavia, quando la destinazione è .NET 7 o u
Tool settings file does not exist for the tool {0}.Il file delle impostazioni dello strumento non esiste per lo strumento {0}.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
index 955e9cfc91e8..6ab11cece7c4 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
@@ -285,6 +285,30 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.ツール {0} のツール設定ファイルが存在しません。
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
index d26185296366..d0b7a3505a1c 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
@@ -286,6 +286,30 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.도구 {0}에 대한 도구 설정 파일이 없습니다.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
index 091c83288270..d38fc73bf384 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
@@ -285,6 +285,30 @@ Wartość domyślna to „false”. Jednak w przypadku określania wartości doc
Tool settings file does not exist for the tool {0}.Plik ustawień narzędzia nie istnieje dla narzędzia {0}.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
index 2a82fe3a1562..65fef5268a17 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
@@ -285,6 +285,30 @@ O padrão é falso.' No entanto, ao direcionar o .NET 7 ou inferior, o padrão
Tool settings file does not exist for the tool {0}.O arquivo de configurações de ferramenta não existe para a ferramenta {0}.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
index 30524ccfe60c..83164f45e91e 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
@@ -285,6 +285,30 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.Файл параметров для средства {0} не существует.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
index 2cd50917f9fc..b232b54f06f3 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
@@ -285,6 +285,30 @@ Varsayılan değer 'false' olur. Ancak çalışma zamanı tanımlayıcısı beli
Tool settings file does not exist for the tool {0}.{0} aracı için araç ayarları dosyası mevcut değil.
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
index 2345a2ae6ecd..1f8ba4d24f20 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
@@ -285,6 +285,30 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.工具 {0} 的工具设置文件不存在。
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
index aff0bb272f7f..95ebcde4d345 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
@@ -285,6 +285,30 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.工具 {0} 沒有工具設定檔案。
+
+
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
+ Installation failed.
+
+This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+
+1. Install with the `--allow-roll-forward` flag, using with the following command.
+
+dotnet tool install {0} (-g) --allow-roll-forward
+
+2. Install .NET {1} with the following link
+
+https://aka.ms/dotnet/download/sdk/{1}
From 357069f5467a0e46eef996c2cfe1739f951949cd Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 23 Jan 2024 14:20:13 -0800
Subject: [PATCH 09/39] output specific target framework
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 6608f3961f59..92cb49e5ff6a 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -227,10 +227,10 @@ private static void RuntimeConfigDetectionMessage(int result, PackageId packageI
// RuntimeConfigDetectionResult incompatible
// TBD: if include -g in sample command; which version should be included in the install; --force?
default:
- throw new ToolPackageException(
+ throw new GracefulException(
string.Format(
CommonLocalizableStrings.ToolPackageRuntimeConfigIncompatible,
- packageId, "7"));
+ packageId, tfmValue));
}
}
From 943a94e24d0e86e142394b92aff9b8a4a397fba2 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 23 Jan 2024 14:25:07 -0800
Subject: [PATCH 10/39] adding --force to ToolInstallCommand
---
.../commands/dotnet-tool/install/LocalizableStrings.resx | 3 +++
.../dotnet-tool/install/ToolInstallCommandParser.cs | 7 ++++++-
.../dotnet-tool/install/xlf/LocalizableStrings.cs.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.de.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.es.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.fr.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.it.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.ja.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.ko.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.pl.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.ru.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.tr.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf | 5 +++++
.../dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf | 5 +++++
15 files changed, 74 insertions(+), 1 deletion(-)
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
index 03a66b2fc690..f039eddbdeed 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
@@ -241,4 +241,7 @@ If you would like to create a manifest, use the `--create-manifest-if-needed` fl
Allow package downgrade when installing a .NET tool package.
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
index 2a4f0d28db6c..e87012ca1a0c 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
@@ -51,7 +51,12 @@ internal static class ToolInstallCommandParser
public static readonly CliOption AllowPackageDowngradeOption = new("--allow-downgrade")
{
Description = LocalizableStrings.AllowPackageDowngradeOptionDescription
- };
+ };
+
+ public static readonly CliOption ForceInstallOption = new("--force")
+ {
+ Description = LocalizableStrings.ForceInstallOptionName
+ };
public static readonly CliOption VerbosityOption = CommonOptions.VerbosityOption;
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
index b0aa9c495588..398b56942ee3 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
@@ -12,6 +12,11 @@
Vytvořte manifest nástroje, pokud se nějaký nenajde během instalace nástroje. Informace o tom, jak se manifesty nacházejí, najdete v tématu https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.Možnost local (--local), možnost global (--global), možnost tool path (--tool-path), v jednu chvíli je možné mít jen jednu. Zadejte jen jednu z možností: {0}
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
index 333c4d572581..2d3b72164a14 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
@@ -12,6 +12,11 @@
Erstellen Sie ein Toolmanifest, wenn es während der Toolinstallation nicht gefunden wird. Informationen dazu, wie Manifeste gefunden werden, finden Sie unter https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.Die lokale Option (--local), die globale Option (--global) und die Toolpfadoption (--tool-path) können nicht zusammen angegeben werden. Geben Sie nur eine der Optionen an: {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
index b977cf36fc3f..cd52eaf5e61e 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
@@ -12,6 +12,11 @@
Cree un manifiesto de herramienta si no se encuentra ninguno durante la instalación de la herramienta. Para obtener información sobre cómo se encuentran los manifiestos, consulte https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.La opción local (--local), la opción global (--global) y la opción de ruta de acceso de herramienta (--tool-path), solo pueden estar una cada vez. Especifique solo una de las opciones: {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
index 3579f944f2a6..d0a2732050d0 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
@@ -12,6 +12,11 @@
Créez un manifeste d'outil si aucun n'est trouvé lors de l'installation de l'outil. Pour plus d'informations sur la localisation des manifestes, voir https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.L'option locale (--local), l'option globale (--global) et l'option de chemin d'outil (--tool-path) ne peuvent pas être utilisées simultanément. Spécifiez une seule des options : {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
index 510a92e862cd..92e4990940bb 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
@@ -12,6 +12,11 @@
Creare un manifesto dello strumento se non ne viene trovato uno durante l'installazione dello strumento. Per informazioni sulla posizione dei manifesti, vedere https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.Le opzioni locale (--local), globale (--global) e del percorso dello strumento (--tool-path) non possono essere specificate contemporaneamente. Specificare una sola di queste opzioni: {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
index 4e76e6aa2572..f786a839eabb 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
@@ -12,6 +12,11 @@
ツールのインストール中にツール マニフェスト見つからない場合は作成します。マニフェストの場所については、https://aka.ms/dotnet/tools/create-manifest-if-needed を参照してください
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.ローカル オプション (--local)、グローバル オプション (--global)、ツール パス オプション (--tool-path) は、一度に 1 つだけ指定できます。オプションを 1 つだけ指定します: {0}。
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
index 10da0b6e9481..08d7e7bca0df 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
@@ -12,6 +12,11 @@
도구 설치 중에 도구 매니페스트를 찾을 수 없는 경우 도구 매니페스트를 만드세요. 매니페스트의 위치는 https://aka.ms/dotnet/tools/create-manifest-if-needed를 참조하세요.
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.로컬 옵션(--local), 전역 옵션(--global), 도구 경로 옵션(--tool-path)은 한 번에 하나씩만 사용할 수 있습니다. {0} 옵션 중에서 하나만 지정하세요.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
index 4e44031a1e85..5a7ec58d934e 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
@@ -12,6 +12,11 @@
Utwórz manifest narzędzi, jeśli nie zostanie znaleziony podczas instalacji narzędzia. Aby uzyskać informacje o lokalizacji manifestów, zobacz https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.Można określić tylko jedną opcję jednocześnie: opcję lokalną (--local), opcję globalną (--global) lub opcję ścieżki do narzędzia (--tool-path). Podaj tylko jedną z opcji: {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
index 9b79e8a3fa0d..f2bc11d18978 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
@@ -12,6 +12,11 @@
Crie um manifesto de ferramenta se nenhum for encontrado durante a instalação da ferramenta. Para obter informações sobre como os manifestos estão localizados, consulte https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.As opções local (--local), global (--global) e do caminho da ferramenta (--tool-path) só podem ocorrer uma por vez. Especifique apenas uma das opções: {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
index 53a272f52fd4..fd33b99e7c96 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
@@ -12,6 +12,11 @@
Создайте манифест инструмента, если он не найден во время установки инструмента. Сведения о способе размещения манифестов см. на странице https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.Локальный параметр (--local), глобальный параметр (--global) и параметр пути к средству (--tool-path) можно использовать только отдельно друг от друга. Укажите только один из этих параметров: {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
index bd447601850f..544fe70dc16b 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
@@ -12,6 +12,11 @@
Araç yüklemesi sırasında bir araç bildirimi bulunmazsa bir araç bildirimi oluşturun. Bildirimlerin nasıl bulunduğu hakkında bilgi edinmek için bkz. https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.Yerel seçeneği (--local), genel seçeneği (--global), araç yolu seçeneği (--tool-path) arasından yalnızca biri seçilebilir. Seçeneklerden yalnızca birini belirtin: {0}.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
index 1b7a901a5d0c..354dd1768f63 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
@@ -12,6 +12,11 @@
如果在工具安装期间找不到工具清单,请创建一个工具清单。若要了解如何查找清单,请参阅 https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.本地选项(--local)、全局选项(--global)和工具路径选项(--tool-path)一次只能有一个。请仅指定其中一个选项: {0}。
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
index 05465c0310df..0b301745aedc 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
@@ -12,6 +12,11 @@
如果在工具安裝期間找不到工具資訊清單,則建立工具資訊清單。如需如何尋找資訊清單的相關資訊,請參閱 https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if the runtime is not compatible with your machine.
+
+ The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: {0}.一次只能有一個本機選項 (--local)、全域選項 (--global)、工具路徑選項 (--tool-path)。請僅指定其中一個選項: {0}。
From af2dbe4707bc5b887cbed747a236751da20f0e86 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 23 Jan 2024 14:26:51 -0800
Subject: [PATCH 11/39] add force install option to global and local tools
---
.../dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs | 3 ++-
.../commands/dotnet-tool/install/ToolInstallLocalCommand.cs | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
index 8344a7ccf914..d59fcd81c153 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
@@ -52,7 +52,7 @@ internal class ToolInstallGlobalOrToolPathCommand : CommandBase
private readonly bool _allowRollForward;
private readonly bool _allowPackageDowngrade;
private readonly bool _updateAll;
-
+ private readonly bool _forceInstall;
public ToolInstallGlobalOrToolPathCommand(
ParseResult parseResult,
@@ -99,6 +99,7 @@ public ToolInstallGlobalOrToolPathCommand(
_createToolPackageStoreDownloaderUninstaller = createToolPackageStoreDownloaderUninstaller ??
ToolPackageFactory.CreateToolPackageStoresAndDownloaderAndUninstaller;
_updateAll = parseResult.GetValue(ToolUpdateCommandParser.UpdateAllOption);
+ _forceInstall = parseResult.GetValue(ToolInstallCommandParser.ForceInstallOption);
_reporter = (reporter ?? Reporter.Output);
_errorReporter = (reporter ?? Reporter.Error);
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
index c0ce8078427c..ed964a47c239 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
@@ -24,6 +24,7 @@ internal class ToolInstallLocalCommand : CommandBase
private readonly PackageId? _packageId;
private readonly bool _allowPackageDowngrade;
private readonly IToolPackageDownloader _toolPackageDownloader;
+ private readonly bool _forceInstall;
private readonly string _explicitManifestFile;
private readonly bool _createManifestIfNeeded;
@@ -59,6 +60,7 @@ public ToolInstallLocalCommand(
_toolPackageDownloader = toolPackageDownloader;
_allowRollForward = parseResult.GetValue(ToolInstallCommandParser.RollForwardOption);
_allowPackageDowngrade = parseResult.GetValue(ToolInstallCommandParser.AllowPackageDowngradeOption);
+ _forceInstall = parseResult.GetValue(ToolInstallCommandParser.ForceInstallOption);
}
public override int Execute()
From 97dbdd5ae143d0484adc3847751751e4fadcd175 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 23 Jan 2024 14:34:56 -0800
Subject: [PATCH 12/39] pass force into ToolPackageDownloader
---
src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs | 3 ++-
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 3 ++-
.../install/ToolInstallGlobalOrToolPathCommand.cs | 3 ++-
.../dotnet-tool/install/ToolInstallLocalCommand.cs | 8 ++++----
.../dotnet-tool/install/ToolInstallLocalInstaller.cs | 5 +++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf | 3 ++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf | 3 ++-
.../ToolPackageDownloaderMock.cs | 3 ++-
19 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
index 45a72e6aadf6..a10ccde55164 100644
--- a/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
@@ -15,7 +15,8 @@ IToolPackage InstallPackage(PackageLocation packageLocation,
VersionRange versionRange = null,
string targetFramework = null,
bool isGlobalTool = false,
- bool isGlobalToolRollForward = false
+ bool isGlobalToolRollForward = false,
+ bool forceInstall = false
);
NuGetVersion GetNuGetVersion(
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 92cb49e5ff6a..8332f7ef0361 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -76,7 +76,8 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
VersionRange versionRange = null,
string targetFramework = null,
bool isGlobalTool = false,
- bool isGlobalToolRollForward = false
+ bool isGlobalToolRollForward = false,
+ bool forceInstall = false
)
{
var packageRootDirectory = _toolPackageStore.GetRootPackageDirectory(packageId);
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
index d59fcd81c153..595e062b8967 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
@@ -196,7 +196,8 @@ private int ExecuteInstallCommand(PackageId packageId)
targetFramework: _framework,
verbosity: _verbosity,
isGlobalTool: true,
- isGlobalToolRollForward: _allowRollForward
+ isGlobalToolRollForward: _allowRollForward,
+ forceInstall: _forceInstall
);
EnsureVersionIsHigher(oldPackageNullable, newInstalledPackage, _allowPackageDowngrade);
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
index ed964a47c239..9cb2b92d6e9a 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
@@ -98,11 +98,11 @@ private int ExecuteInstallCommand(PackageId packageId)
if (!existingPackageWithPackageId.Any())
{
- return InstallNewTool(manifestFile, packageId);
+ return InstallNewTool(manifestFile, packageId, _forceInstall);
}
var existingPackage = existingPackageWithPackageId.Single();
- var toolDownloadedPackage = _toolLocalPackageInstaller.Install(manifestFile, packageId);
+ var toolDownloadedPackage = _toolLocalPackageInstaller.Install(manifestFile, packageId, _forceInstall);
InstallToolUpdate(existingPackage, toolDownloadedPackage, manifestFile, packageId);
@@ -159,10 +159,10 @@ public int InstallToolUpdate(ToolManifestPackage existingPackage, IToolPackage t
return 0;
}
- public int InstallNewTool(FilePath manifestFile, PackageId packageId)
+ public int InstallNewTool(FilePath manifestFile, PackageId packageId, bool forceInstall)
{
IToolPackage toolDownloadedPackage =
- _toolLocalPackageInstaller.Install(manifestFile, packageId);
+ _toolLocalPackageInstaller.Install(manifestFile, packageId, forceInstall);
_toolManifestEditor.Add(
manifestFile,
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalInstaller.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalInstaller.cs
index 4a52d585dac7..c3303ca50145 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalInstaller.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalInstaller.cs
@@ -47,7 +47,7 @@ public ToolInstallLocalInstaller(
TargetFrameworkToInstall = BundledTargetFramework.GetTargetFrameworkMoniker();
}
- public IToolPackage Install(FilePath manifestFile, PackageId packageId)
+ public IToolPackage Install(FilePath manifestFile, PackageId packageId, bool forceInstall)
{
if (!string.IsNullOrEmpty(_configFilePath) && !File.Exists(_configFilePath))
{
@@ -75,7 +75,8 @@ public IToolPackage Install(FilePath manifestFile, PackageId packageId)
packageId,
verbosity: _verbosity,
versionRange,
- TargetFrameworkToInstall
+ TargetFrameworkToInstall,
+ forceInstall: forceInstall
);
return toolDownloadedPackage;
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
index fa078748934c..661904446521 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
@@ -284,7 +284,8 @@ Výchozí hodnota je false, ale pokud cílíte na .NET 7 nebo nižší a je zad
Tool settings file does not exist for the tool {0}.
- Soubor nastavení nástroje {0} neexistuje.
+ Soubor nastavení nástroje {0} neexistuje.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
index 7f7948532444..da0dd2b9dfd1 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
@@ -284,7 +284,8 @@ Der Standardwert lautet FALSE. Wenn sie jedoch auf .NET 7 oder niedriger abziele
Tool settings file does not exist for the tool {0}.
- Die Tooleinstellungsdatei ist für das Tool „{0}“ nicht vorhanden.
+ Die Tooleinstellungsdatei ist für das Tool „{0}“ nicht vorhanden.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
index 54d395adf569..c6111de22067 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
@@ -285,7 +285,8 @@ El valor predeterminado es "false". Sin embargo, cuando el destino es .NET 7 o i
Tool settings file does not exist for the tool {0}.
- El archivo de configuración de herramientas no existe para la herramienta {0}.
+ El archivo de configuración de herramientas no existe para la herramienta {0}.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
index a3456db3f683..a2b88bd850cf 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
@@ -285,7 +285,8 @@ La valeur par défaut est « false ». Toutefois, lorsque vous ciblez .NET 7 ou
Tool settings file does not exist for the tool {0}.
- Le fichier de paramètres d’outil n’existe pas pour l’outil {0}.
+ Le fichier de paramètres d’outil n’existe pas pour l’outil {0}.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
index dd262d508d83..7f52fc3278ac 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
@@ -284,7 +284,8 @@ Il valore predefinito è 'false'. Tuttavia, quando la destinazione è .NET 7 o u
Tool settings file does not exist for the tool {0}.
- Il file delle impostazioni dello strumento non esiste per lo strumento {0}.
+ Il file delle impostazioni dello strumento non esiste per lo strumento {0}.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
index 6ab11cece7c4..f8e05f60cc56 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
@@ -284,7 +284,8 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.
- ツール {0} のツール設定ファイルが存在しません。
+ ツール {0} のツール設定ファイルが存在しません。
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
index d0b7a3505a1c..d27276119d89 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
@@ -285,7 +285,8 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.
- 도구 {0}에 대한 도구 설정 파일이 없습니다.
+ 도구 {0}에 대한 도구 설정 파일이 없습니다.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
index d38fc73bf384..2c47a4265c3c 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
@@ -284,7 +284,8 @@ Wartość domyślna to „false”. Jednak w przypadku określania wartości doc
Tool settings file does not exist for the tool {0}.
- Plik ustawień narzędzia nie istnieje dla narzędzia {0}.
+ Plik ustawień narzędzia nie istnieje dla narzędzia {0}.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
index 65fef5268a17..9ccc9a8372b0 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
@@ -284,7 +284,8 @@ O padrão é falso.' No entanto, ao direcionar o .NET 7 ou inferior, o padrão
Tool settings file does not exist for the tool {0}.
- O arquivo de configurações de ferramenta não existe para a ferramenta {0}.
+ O arquivo de configurações de ferramenta não existe para a ferramenta {0}.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
index 83164f45e91e..580dbf12ae32 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
@@ -284,7 +284,8 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.
- Файл параметров для средства {0} не существует.
+ Файл параметров для средства {0} не существует.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
index b232b54f06f3..aaaa56d59b76 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
@@ -284,7 +284,8 @@ Varsayılan değer 'false' olur. Ancak çalışma zamanı tanımlayıcısı beli
Tool settings file does not exist for the tool {0}.
- {0} aracı için araç ayarları dosyası mevcut değil.
+ {0} aracı için araç ayarları dosyası mevcut değil.
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
index 1f8ba4d24f20..2c562b4a3406 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
@@ -284,7 +284,8 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.
- 工具 {0} 的工具设置文件不存在。
+ 工具 {0} 的工具设置文件不存在。
+ Installation failed.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
index 95ebcde4d345..95b124876bc6 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
@@ -284,7 +284,8 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Tool settings file does not exist for the tool {0}.
- 工具 {0} 沒有工具設定檔案。
+ 工具 {0} 沒有工具設定檔案。
+ Installation failed.
diff --git a/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs
index c4c04e0b12bf..d3ad7edf89a2 100644
--- a/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs
@@ -97,7 +97,8 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
VersionRange versionRange = null,
string targetFramework = null,
bool isGlobalTool = false,
- bool isGlobalToolRollForward = false
+ bool isGlobalToolRollForward = false,
+ bool forceInstall = false
)
{
string rollbackDirectory = null;
From 8e2641fef8d6f4d04c525df73a2e120de45ef1f1 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 23 Jan 2024 14:36:03 -0800
Subject: [PATCH 13/39] add --force condition
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 8332f7ef0361..84cb73a892ab 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -168,6 +168,12 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
packageDirectory: toolReturnPackageDirectory,
assetsJsonParentDirectory: toolReturnJsonParentDirectory);
+
+ if(!forceInstall)
+ {
+ IsRuntimeConfigCompatible(toolPackageInstance, packageId);
+ }
+
if (isGlobalToolRollForward)
{
UpdateRuntimeConfig(toolPackageInstance);
@@ -190,7 +196,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
});
}
- private static void ReadRuntimeConfig(
+ private static void IsRuntimeConfigCompatible(
ToolPackageInstance toolPackageInstance,
PackageId packageId
)
From a1e1584f637dac076797d975ab373d99ecc128a2 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 23 Jan 2024 14:44:41 -0800
Subject: [PATCH 14/39] update the message ui
---
src/Cli/dotnet/CommonLocalizableStrings.resx | 9 +++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf | 14 ++++++++++++--
.../dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf | 14 ++++++++++++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf | 14 ++++++++++++--
.../xlf/CommonLocalizableStrings.zh-Hans.xlf | 14 ++++++++++++--
.../xlf/CommonLocalizableStrings.zh-Hant.xlf | 14 ++++++++++++--
14 files changed, 163 insertions(+), 28 deletions(-)
diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx
index ce5e17f1b23b..d9221e950c37 100644
--- a/src/Cli/dotnet/CommonLocalizableStrings.resx
+++ b/src/Cli/dotnet/CommonLocalizableStrings.resx
@@ -747,6 +747,11 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
-
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
index 661904446521..70a2f7890478 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
index da0dd2b9dfd1..70c13e93a065 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
index c6111de22067..afb6800f3cc7 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
@@ -299,7 +299,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -310,7 +315,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
index a2b88bd850cf..3dc040ca8a20 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
@@ -299,7 +299,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -310,7 +315,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
index 7f52fc3278ac..25b0940b713e 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
index f8e05f60cc56..bc4a5a62ef4f 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
index d27276119d89..b3ce50ad0985 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
@@ -299,7 +299,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -310,7 +315,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
index 2c47a4265c3c..a0cf69ad85e5 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
index 9ccc9a8372b0..651d19ae4f15 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
index 580dbf12ae32..c0e1a390690c 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
index aaaa56d59b76..9865782ff860 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
index 2c562b4a3406..f2a68040ebef 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
index 95b124876bc6..850e42606df6 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
@@ -298,7 +298,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
Installation failed.
This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
@@ -309,7 +314,12 @@ dotnet tool install {0} (-g) --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk/{1}
+
+3. Install with `--force` and manually configure the tool to run, using with the following command.
+
+dotnet tool install {0} (-g) --force
+
From 43c115c99b0ae65a2556a636d1987ce1bc8e7481 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 23 Jan 2024 14:48:50 -0800
Subject: [PATCH 15/39] adding force option
---
.../commands/dotnet-tool/install/ToolInstallCommandParser.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
index e87012ca1a0c..b130728de5ac 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
@@ -99,6 +99,7 @@ private static CliCommand ConstructCommand()
command.Options.Add(CreateManifestIfNeededOption);
command.Options.Add(AllowPackageDowngradeOption);
command.Options.Add(RollForwardOption);
+ command.Options.Add(ForceInstallOption);
command.SetAction((parseResult) => new ToolInstallCommand(parseResult).Execute());
From 89daa6f5934cf805ee70c726ba75f69cbf0654aa Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 30 Jan 2024 12:36:23 -0800
Subject: [PATCH 16/39] have -g based on command
---
src/Cli/dotnet/CommonLocalizableStrings.resx | 4 ++--
.../dotnet/ToolPackage/ToolPackageDownloader.cs | 14 ++++++++------
src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf | 8 ++++----
.../dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf | 8 ++++----
src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf | 8 ++++----
.../xlf/CommonLocalizableStrings.zh-Hans.xlf | 8 ++++----
.../xlf/CommonLocalizableStrings.zh-Hant.xlf | 8 ++++----
15 files changed, 62 insertions(+), 60 deletions(-)
diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx
index d9221e950c37..64ca655af54b 100644
--- a/src/Cli/dotnet/CommonLocalizableStrings.resx
+++ b/src/Cli/dotnet/CommonLocalizableStrings.resx
@@ -743,7 +743,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -751,7 +751,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
\ No newline at end of file
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 84cb73a892ab..f9559f954dce 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -171,7 +171,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
if(!forceInstall)
{
- IsRuntimeConfigCompatible(toolPackageInstance, packageId);
+ IsRuntimeConfigCompatible(toolPackageInstance, packageId, isGlobalTool);
}
if (isGlobalToolRollForward)
@@ -198,7 +198,8 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
private static void IsRuntimeConfigCompatible(
ToolPackageInstance toolPackageInstance,
- PackageId packageId
+ PackageId packageId,
+ bool isGlobalTool
)
{
var executableFilePath = toolPackageInstance.Commands[0].Executable;
@@ -217,12 +218,13 @@ PackageId packageId
tfmValue = tfmElement.GetString();
}
var result = NETCoreSdkResolverNativeWrapper.InitializeForRuntimeConfig(runtimeConfigFilePath);
- RuntimeConfigDetectionMessage(result, packageId, tfmValue);
+ RuntimeConfigDetectionMessage(result, packageId, tfmValue, isGlobalTool);
}
}
- private static void RuntimeConfigDetectionMessage(int result, PackageId packageId, string tfmValue = "")
+ private static void RuntimeConfigDetectionMessage(int result, PackageId packageId, string tfmValue = "", bool isGlobalTool = false)
{
+ var global = isGlobalTool ? " -g" : "";
switch(result)
{
// RuntimeConfigDetectionResult::Success
@@ -232,12 +234,12 @@ private static void RuntimeConfigDetectionMessage(int result, PackageId packageI
break;
// RuntimeConfigDetectionResult incompatible
- // TBD: if include -g in sample command; which version should be included in the install; --force?
+ // TBD: which version should be included in the install; --force?
default:
throw new GracefulException(
string.Format(
CommonLocalizableStrings.ToolPackageRuntimeConfigIncompatible,
- packageId, tfmValue));
+ packageId, tfmValue, global));
}
}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
index 70a2f7890478..8b50f02443de 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
index 70c13e93a065..00f642c3f829 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
index afb6800f3cc7..a83528a41ec0 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
@@ -295,7 +295,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -303,7 +303,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -311,7 +311,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -319,7 +319,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
index 3dc040ca8a20..8e4a0b42a54b 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
@@ -295,7 +295,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -303,7 +303,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -311,7 +311,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -319,7 +319,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
index 25b0940b713e..62d63dd1a402 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
index bc4a5a62ef4f..6d2036000ea4 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
index b3ce50ad0985..a7944bf29846 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
@@ -295,7 +295,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -303,7 +303,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -311,7 +311,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -319,7 +319,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
index a0cf69ad85e5..0d9b1d5328d5 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
index 651d19ae4f15..e494cfffc09c 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
index c0e1a390690c..54016b914db0 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
index 9865782ff860..fc6f3c5652f8 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
index f2a68040ebef..cbff6f7b8b05 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
index 850e42606df6..cc14ecc77012 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
@@ -294,7 +294,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -302,7 +302,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
Installation failed.
@@ -310,7 +310,7 @@ This app wasn't installed because it won't run on your machine. This can be reso
1. Install with the `--allow-roll-forward` flag, using with the following command.
-dotnet tool install {0} (-g) --allow-roll-forward
+dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
@@ -318,7 +318,7 @@ https://aka.ms/dotnet/download/sdk/{1}
3. Install with `--force` and manually configure the tool to run, using with the following command.
-dotnet tool install {0} (-g) --force
+dotnet tool install {0}{2} --force
From 96b01a2436673e87188c23e6bc1005b84c2c1936 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 30 Jan 2024 13:28:56 -0800
Subject: [PATCH 17/39] prompt the user to install new net versions
---
src/Cli/dotnet/CommonLocalizableStrings.resx | 2 +-
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 7 ++++---
src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf | 4 ++--
src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf | 4 ++--
15 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx
index 64ca655af54b..7d92b7797815 100644
--- a/src/Cli/dotnet/CommonLocalizableStrings.resx
+++ b/src/Cli/dotnet/CommonLocalizableStrings.resx
@@ -747,7 +747,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index f9559f954dce..00c3afe09447 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -215,14 +215,15 @@ bool isGlobalTool
if (rootElement.TryGetProperty("runtimeOptions", out JsonElement runtimeOptionsElement) &&
runtimeOptionsElement.TryGetProperty("tfm", out JsonElement tfmElement))
{
- tfmValue = tfmElement.GetString();
+ tfmValue = new string(tfmElement.GetString().Where(c => char.IsDigit(c) || c == '.').ToArray());
}
+ var tfmStr = double.TryParse(tfmValue, out double tfmDouble) ? tfmDouble.ToString() : "";
var result = NETCoreSdkResolverNativeWrapper.InitializeForRuntimeConfig(runtimeConfigFilePath);
RuntimeConfigDetectionMessage(result, packageId, tfmValue, isGlobalTool);
}
}
- private static void RuntimeConfigDetectionMessage(int result, PackageId packageId, string tfmValue = "", bool isGlobalTool = false)
+ private static void RuntimeConfigDetectionMessage(int result, PackageId packageId, string tfmStr = "", bool isGlobalTool = false)
{
var global = isGlobalTool ? " -g" : "";
switch(result)
@@ -239,7 +240,7 @@ private static void RuntimeConfigDetectionMessage(int result, PackageId packageI
throw new GracefulException(
string.Format(
CommonLocalizableStrings.ToolPackageRuntimeConfigIncompatible,
- packageId, tfmValue, global));
+ packageId, tfmStr, global));
}
}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
index 8b50f02443de..818429aa6408 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
index 00f642c3f829..0988b73c3642 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
index a83528a41ec0..ae60a2e27cde 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
@@ -299,7 +299,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -315,7 +315,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
index 8e4a0b42a54b..fd8637fd6136 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
@@ -299,7 +299,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -315,7 +315,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
index 62d63dd1a402..4d4cd6819688 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
index 6d2036000ea4..aad52761cb39 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
index a7944bf29846..35fe3151f180 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
@@ -299,7 +299,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -315,7 +315,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
index 0d9b1d5328d5..36d0105a85e5 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
index e494cfffc09c..682cf0420267 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
index 54016b914db0..73842891304b 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
index fc6f3c5652f8..9d735340f04d 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
index cbff6f7b8b05..b69f57c0f46a 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
index cc14ecc77012..4f55096d3012 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
@@ -298,7 +298,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -314,7 +314,7 @@ dotnet tool install {0}{2} --allow-roll-forward
2. Install .NET {1} with the following link
-https://aka.ms/dotnet/download/sdk/{1}
+https://aka.ms/dotnet/download/sdk
3. Install with `--force` and manually configure the tool to run, using with the following command.
From 0fdfd91b3beae4bb7e7f23bc7d64e471a44b6a3d Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 30 Jan 2024 13:49:47 -0800
Subject: [PATCH 18/39] update comment
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 00c3afe09447..43909952ac23 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -206,7 +206,6 @@ bool isGlobalTool
var runtimeConfigFilePath = Path.ChangeExtension(executableFilePath.ToString(), ".runtimeconfig.json");
// Update the runtimeconfig.json file
- // TBD: read tfm from runtimeconfig.json
string tfmValue = "";
if (File.Exists(runtimeConfigFilePath))
{
@@ -235,7 +234,7 @@ private static void RuntimeConfigDetectionMessage(int result, PackageId packageI
break;
// RuntimeConfigDetectionResult incompatible
- // TBD: which version should be included in the install; --force?
+ // TBD: ensure the latest
default:
throw new GracefulException(
string.Format(
From e57862c352af0a0b73155b01785a3c92a6d6f8f8 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Wed, 31 Jan 2024 16:17:17 -0800
Subject: [PATCH 19/39] resolve merge errors
---
.../dotnet/ToolPackage/IToolPackageDownloader.cs | 8 --------
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 13 ++++++-------
2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
index a10ccde55164..e430d55b995c 100644
--- a/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
@@ -18,13 +18,5 @@ IToolPackage InstallPackage(PackageLocation packageLocation,
bool isGlobalToolRollForward = false,
bool forceInstall = false
);
-
- NuGetVersion GetNuGetVersion(
- PackageLocation packageLocation,
- PackageId packageId,
- VerbosityOptions verbosity,
- VersionRange versionRange = null,
- bool isGlobalTool = false
- );
}
}
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 43909952ac23..eaff4fd071ba 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -111,7 +111,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
}
NuGetVersion packageVersion = nugetPackageDownloader.GetBestPackageVersionAsync(packageId, versionRange, packageSourceLocation).GetAwaiter().GetResult();
- rollbackDirectory = isGlobalTool ? toolDownloadDir.Value: Path.Combine(toolDownloadDir.Value, packageId.ToString(), packageVersion.ToString());
+ rollbackDirectory = isGlobalTool ? toolDownloadDir.Value : Path.Combine(toolDownloadDir.Value, packageId.ToString(), packageVersion.ToString());
if (isGlobalTool)
{
@@ -134,7 +134,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
{
DownloadAndExtractPackage(packageLocation, packageId, nugetPackageDownloader, toolDownloadDir.Value, _toolPackageStore, packageVersion, packageSourceLocation, includeUnlisted: givenSpecificVersion).GetAwaiter().GetResult();
}
- else if(isGlobalTool)
+ else if (isGlobalTool)
{
throw new ToolPackageException(
string.Format(
@@ -142,9 +142,9 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
packageId,
packageVersion.ToNormalizedString()));
}
-
+
CreateAssetFile(packageId, packageVersion, toolDownloadDir, assetFileDirectory, _runtimeJsonPath, targetFramework);
-
+
DirectoryPath toolReturnPackageDirectory;
DirectoryPath toolReturnJsonParentDirectory;
@@ -168,8 +168,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
packageDirectory: toolReturnPackageDirectory,
assetsJsonParentDirectory: toolReturnJsonParentDirectory);
-
- if(!forceInstall)
+ if (!forceInstall && !isGlobalToolRollForward)
{
IsRuntimeConfigCompatible(toolPackageInstance, packageId, isGlobalTool);
}
@@ -179,7 +178,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
UpdateRuntimeConfig(toolPackageInstance);
}
- return toolPackageInstance;
+ return toolPackageInstance;
},
rollback: () =>
{
From 9d2d5436433adde89ea625d63ceed9ee03aa79a7 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 1 Feb 2024 10:33:08 -0800
Subject: [PATCH 20/39] fix tests
---
.../ToolPackageDownloaderTests.cs | 25 ++++++++++++++++++-
...ToolInstallGlobalOrToolPathCommandTests.cs | 4 +--
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs
index c90f99f21609..6a3a1eac45ae 100644
--- a/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs
+++ b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs
@@ -54,6 +54,7 @@ public void GivenNugetConfigInstallSucceeds(bool testMockBehaviorIsInSync)
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -82,6 +83,7 @@ public void GivenNugetConfigInstallSucceedsInTransaction(bool testMockBehaviorIs
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
transactionScope.Complete();
@@ -108,6 +110,7 @@ public void GivenNugetConfigInstallCreatesAnAssetFile(bool testMockBehaviorIsInS
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -171,6 +174,7 @@ public void GivenAConfigFileRootDirectoryPackageInstallSucceedsViaFindingNugetCo
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -241,6 +245,7 @@ public void GivenAllButNoPackageVersionItCanInstallThePackage(bool testMockBehav
packageId: TestPackageId,
verbosity: TestVerbosity,
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -263,6 +268,7 @@ public void GivenAllButNoTargetFrameworkItCanDownloadThePackage(bool testMockBeh
packageId: TestPackageId,
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -286,6 +292,7 @@ public void GivenASourceInstallSucceeds(bool testMockBehaviorIsInSync)
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -310,6 +317,7 @@ public void GivenARelativeSourcePathInstallSucceeds(bool testMockBehaviorIsInSyn
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -333,6 +341,7 @@ public void GivenAUriSourceInstallSucceeds(bool testMockBehaviorIsInSync)
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -359,6 +368,7 @@ public void GivenAEmptySourceAndNugetConfigInstallSucceeds(bool testMockBehavior
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -390,6 +400,7 @@ public void GivenFailureAfterRestoreInstallWillRollback(bool testMockBehaviorIsI
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
FailedStepAfterSuccessRestore();
@@ -424,6 +435,7 @@ public void GivenSecondInstallInATransactionTheFirstInstallShouldRollback(bool t
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
first.Should().NotThrow();
@@ -433,6 +445,7 @@ public void GivenSecondInstallInATransactionTheFirstInstallShouldRollback(bool t
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
t.Complete();
@@ -474,7 +487,8 @@ public void GivenFailureWhenInstallLocalToolsItWillRollbackPackageVersion(bool t
packageId: TestPackageId,
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
- targetFramework: _testTargetframework);
+ targetFramework: _testTargetframework,
+ forceInstall: true);
fileSystem
.Directory
@@ -554,6 +568,7 @@ public void GivenSecondInstallWithoutATransactionTheFirstShouldNotRollback(bool
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -563,6 +578,7 @@ public void GivenSecondInstallWithoutATransactionTheFirstShouldNotRollback(bool
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
reporter.Lines.Should().BeEmpty();
@@ -606,6 +622,7 @@ public void GivenAnInstalledPackageUninstallRemovesThePackage(bool testMockBehav
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -632,6 +649,7 @@ public void GivenAnInstalledPackageUninstallRollsbackWhenTransactionFails(bool t
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -667,6 +685,7 @@ public void GivenAnInstalledPackageUninstallRemovesThePackageWhenTransactionComm
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -697,6 +716,7 @@ public void GivenAPackageNameWithDifferentCaseItCanInstallThePackage(bool testMo
packageId: new PackageId("GlObAl.TooL.coNsoLe.DemO"),
verbosity: TestVerbosity,
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -729,6 +749,7 @@ public void GivenARootWithNonAsciiCharacterInstallSucceeds()
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, store);
@@ -757,6 +778,7 @@ public void GivenAComplexVersionRangeInstallSucceeds(bool testMockBehaviorIsInSy
verbosity: TestVerbosity,
versionRange: VersionRange.Parse("1.0.0-rc*"),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
AssertPackageInstall(reporter, fileSystem, package, store, storeQuery);
@@ -809,6 +831,7 @@ public void GivenAPackageWithCasingAndenUSPOSIXInstallSucceeds(bool testMockBeha
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(packageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
action.Should().NotThrow();
diff --git a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
index 57b08815600c..66500f3c6674 100644
--- a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
+++ b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
@@ -572,7 +572,7 @@ public void WhenRunWithValidUnlistedVersionRangeItShouldSucceed()
const string nugetSourcePath = "https://api.nuget.org/v3/index.json";
var testDir = _testAssetsManager.CreateTestDirectory().Path;
- var toolInstallGlobalOrToolPathCommand = new DotnetCommand(Log, "tool", "install", "-g", UnlistedPackageId, "--version", "[0.5.0]", "--add-source", nugetSourcePath)
+ var toolInstallGlobalOrToolPathCommand = new DotnetCommand(Log, "tool", "install", "-g", UnlistedPackageId, "--version", "[0.5.0]", "--add-source", nugetSourcePath, "--force")
.WithEnvironmentVariable("DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK", "true")
.WithWorkingDirectory(testDir);
@@ -589,7 +589,7 @@ public void WhenRunWithValidBareVersionItShouldInterpretAsNuGetExactVersion()
const string nugetSourcePath = "https://api.nuget.org/v3/index.json";
var testDir = _testAssetsManager.CreateTestDirectory().Path;
- var toolInstallGlobalOrToolPathCommand = new DotnetCommand(Log, "tool", "install", "-g", UnlistedPackageId, "--version", "0.5.0", "--add-source", nugetSourcePath)
+ var toolInstallGlobalOrToolPathCommand = new DotnetCommand(Log, "tool", "install", "-g", UnlistedPackageId, "--version", "0.5.0", "--add-source", nugetSourcePath, "--force")
.WithEnvironmentVariable("DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK", "true")
.WithWorkingDirectory(testDir);
From 42e56421d141885f17492ba57d7aefd1c0af0296 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 1 Feb 2024 10:49:58 -0800
Subject: [PATCH 21/39] add test for --force
---
...ToolInstallGlobalOrToolPathCommandTests.cs | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
index 66500f3c6674..f7ba4fbe8eba 100644
--- a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
+++ b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
@@ -42,6 +42,7 @@ public class ToolInstallGlobalOrToolPathCommandTests: SdkTest
private const string LowerPackageVersion = "1.0.0";
private const string ToolCommandName = "SimulatorCommand";
private readonly string UnlistedPackageId = "elemental.sysinfotool";
+ private readonly string CompatiblePackageId = "dotnet-ef";
public ToolInstallGlobalOrToolPathCommandTests(ITestOutputHelper log): base(log)
{
@@ -572,6 +573,7 @@ public void WhenRunWithValidUnlistedVersionRangeItShouldSucceed()
const string nugetSourcePath = "https://api.nuget.org/v3/index.json";
var testDir = _testAssetsManager.CreateTestDirectory().Path;
+ // This test also validates that the tool install command can install incompatible tools with the --force option
var toolInstallGlobalOrToolPathCommand = new DotnetCommand(Log, "tool", "install", "-g", UnlistedPackageId, "--version", "[0.5.0]", "--add-source", nugetSourcePath, "--force")
.WithEnvironmentVariable("DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK", "true")
.WithWorkingDirectory(testDir);
@@ -583,6 +585,33 @@ public void WhenRunWithValidUnlistedVersionRangeItShouldSucceed()
toolUninstallCommand.Execute().Should().Pass();
}
+ [Fact]
+ public void WhenInstallIncompatibleToolWithoutForceItShouldFail()
+ {
+ const string nugetSourcePath = "https://api.nuget.org/v3/index.json";
+ var testDir = _testAssetsManager.CreateTestDirectory().Path;
+
+ var toolInstallGlobalOrToolPathCommand = new DotnetCommand(Log, "tool", "install", "-g", UnlistedPackageId, "--version", "0.5.0", "--add-source", nugetSourcePath)
+ .WithEnvironmentVariable("DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK", "true")
+ .WithWorkingDirectory(testDir);
+
+ toolInstallGlobalOrToolPathCommand.Execute().Should().Fail();
+ }
+
+ [Fact]
+ public void WhenInstallCompatibleToolWithoutForceItShouldSucceed()
+ {
+ const string nugetSourcePath = "https://api.nuget.org/v3/index.json";
+ var testDir = _testAssetsManager.CreateTestDirectory().Path;
+
+ var toolInstallGlobalOrToolPathCommand = new DotnetCommand(Log, "tool", "install", "-g", CompatiblePackageId, "--add-source", nugetSourcePath)
+ .WithEnvironmentVariable("DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK", "true")
+ .WithWorkingDirectory(testDir);
+
+ toolInstallGlobalOrToolPathCommand.Execute().Should().Pass();
+ }
+
+
[Fact]
public void WhenRunWithValidBareVersionItShouldInterpretAsNuGetExactVersion()
{
From ed062c9f7d037d0c58c425a3a2e0775e3ee658ed Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 1 Feb 2024 23:43:40 -0800
Subject: [PATCH 22/39] fix tests
---
.../ToolPackageInstallerNugetCacheTests.cs | 6 ++++--
.../ToolPackageUninstallerTests.cs | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
index 3fb9ac8addfc..7bc291423718 100644
--- a/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
+++ b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
@@ -43,7 +43,8 @@ public void GivenNugetConfigInstallSucceeds(bool testMockBehaviorIsInSync)
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
packageLocation: new PackageLocation(nugetConfig: nugetConfigPath),
- targetFramework: _testTargetframework);
+ targetFramework: _testTargetframework,
+ forceInstall: true);
var commands = toolPackage.Commands;
var expectedPackagesFolder = NuGetGlobalPackagesFolder.GetLocation();
@@ -81,7 +82,8 @@ public void GivenNugetConfigVersionRangeInstallSucceeds(bool testMockBehaviorIsI
verbosity: TestVerbosity,
versionRange: VersionRange.Parse("1.0.0-*"),
packageLocation: new PackageLocation(nugetConfig: nugetConfigPath),
- targetFramework: _testTargetframework);
+ targetFramework: _testTargetframework,
+ forceInstall: true);
var expectedPackagesFolder = NuGetGlobalPackagesFolder.GetLocation();
diff --git a/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
index e95f28b38cb3..2464360f35b6 100644
--- a/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
+++ b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
@@ -33,6 +33,7 @@ public void GivenAnInstalledPackageUninstallRemovesThePackage(bool testMockBehav
verbosity: TestVerbosity,
versionRange: VersionRange.Parse(TestPackageVersion),
targetFramework: _testTargetframework,
+ forceInstall: true,
isGlobalTool: true);
package.PackagedShims.Should().ContainSingle(f => f.Value.Contains("demo.exe") || f.Value.Contains("demo"));
From 56e36af4f23099265986fc33b579eb6ade7c59fa Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Fri, 2 Feb 2024 11:53:23 -0800
Subject: [PATCH 23/39] clean up the code
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index eaff4fd071ba..e90bf058d794 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -233,7 +233,6 @@ private static void RuntimeConfigDetectionMessage(int result, PackageId packageI
break;
// RuntimeConfigDetectionResult incompatible
- // TBD: ensure the latest
default:
throw new GracefulException(
string.Format(
From b443db751ad939311e4fdbddc62364cb5a3909b6 Mon Sep 17 00:00:00 2001
From: Mark Li
Date: Thu, 25 Jan 2024 11:56:23 -0800
Subject: [PATCH 24/39] fix verbosity
---
src/Cli/dotnet/CommonOptions.cs | 4 ++--
.../dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs
index 6525e27816d6..e09e8c357443 100644
--- a/src/Cli/dotnet/CommonOptions.cs
+++ b/src/Cli/dotnet/CommonOptions.cs
@@ -281,10 +281,10 @@ internal static CliArgument AddCompletions(this CliArgument argument, F
public enum VerbosityOptions
{
- quiet,
- q,
minimal,
m,
+ quiet,
+ q,
normal,
n,
detailed,
diff --git a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
index c8371ef865da..d9293ef9d55c 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
+++ b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
@@ -54,7 +54,7 @@ public NuGetPackageDownloader(
Func> timer = null,
bool verifySignatures = false,
bool shouldUsePackageSourceMapping = false,
- VerbosityOptions verbosityOptions = VerbosityOptions.normal)
+ VerbosityOptions verbosityOptions = VerbosityOptions.minimal)
{
_packageInstallDir = packageInstallDir;
_reporter = reporter ?? Reporter.Output;
From f1403f106840d8b86448fda7552a32588806b6f9 Mon Sep 17 00:00:00 2001
From: Mark Li
Date: Thu, 25 Jan 2024 15:15:18 -0800
Subject: [PATCH 25/39] update printing minimal verbosity
---
src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
index d9293ef9d55c..c8371ef865da 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
+++ b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
@@ -54,7 +54,7 @@ public NuGetPackageDownloader(
Func> timer = null,
bool verifySignatures = false,
bool shouldUsePackageSourceMapping = false,
- VerbosityOptions verbosityOptions = VerbosityOptions.minimal)
+ VerbosityOptions verbosityOptions = VerbosityOptions.normal)
{
_packageInstallDir = packageInstallDir;
_reporter = reporter ?? Reporter.Output;
From f91507ecd4b4d9fcdb14c2bddc781a90fde72037 Mon Sep 17 00:00:00 2001
From: Mark Li
Date: Fri, 2 Feb 2024 02:40:53 -0800
Subject: [PATCH 26/39] locally change default option in `tool install`
---
src/Cli/dotnet/CommonOptions.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs
index e09e8c357443..6525e27816d6 100644
--- a/src/Cli/dotnet/CommonOptions.cs
+++ b/src/Cli/dotnet/CommonOptions.cs
@@ -281,10 +281,10 @@ internal static CliArgument AddCompletions(this CliArgument argument, F
public enum VerbosityOptions
{
- minimal,
- m,
quiet,
q,
+ minimal,
+ m,
normal,
n,
detailed,
From d4f55b279dea0863ba75349f8315cd4274b4010d Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 8 Feb 2024 11:21:49 -0800
Subject: [PATCH 27/39] change naming
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index e90bf058d794..a9f6f5a3e805 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -170,7 +170,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
if (!forceInstall && !isGlobalToolRollForward)
{
- IsRuntimeConfigCompatible(toolPackageInstance, packageId, isGlobalTool);
+ CheckIfRequiredRuntimeIsInstalled(toolPackageInstance, packageId, isGlobalTool);
}
if (isGlobalToolRollForward)
@@ -195,7 +195,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
});
}
- private static void IsRuntimeConfigCompatible(
+ private static void CheckIfRequiredRuntimeIsInstalled(
ToolPackageInstance toolPackageInstance,
PackageId packageId,
bool isGlobalTool
From 1caa48ae561edb6d5918fae7a3cd18f0c2bb8355 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 8 Feb 2024 11:23:07 -0800
Subject: [PATCH 28/39] add explanation
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index a9f6f5a3e805..23f790401479 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -204,7 +204,7 @@ bool isGlobalTool
var executableFilePath = toolPackageInstance.Commands[0].Executable;
var runtimeConfigFilePath = Path.ChangeExtension(executableFilePath.ToString(), ".runtimeconfig.json");
- // Update the runtimeconfig.json file
+ // Check if the runtimeconfig.json file is compatible with the current runtime
string tfmValue = "";
if (File.Exists(runtimeConfigFilePath))
{
From bc7877c26066cf9c746c8ef5e2b92ac262b2a01f Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 8 Feb 2024 11:24:12 -0800
Subject: [PATCH 29/39] Change indent
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 23f790401479..e3b47c3cd1c1 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -211,7 +211,7 @@ bool isGlobalTool
JsonElement rootElement = JsonDocument.Parse(File.ReadAllText(runtimeConfigFilePath)).RootElement;
if (rootElement.TryGetProperty("runtimeOptions", out JsonElement runtimeOptionsElement) &&
- runtimeOptionsElement.TryGetProperty("tfm", out JsonElement tfmElement))
+ runtimeOptionsElement.TryGetProperty("tfm", out JsonElement tfmElement))
{
tfmValue = new string(tfmElement.GetString().Where(c => char.IsDigit(c) || c == '.').ToArray());
}
From a4f59a9f0803ec4186a52ecebddc9873112a3ff2 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Thu, 8 Feb 2024 11:31:22 -0800
Subject: [PATCH 30/39] remove hostfxr_initialize_for_runtime_config
declaration
---
.../Microsoft.DotNet.NativeWrapper/Interop.cs | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
index 38ae4bf3fb11..cc2818168b72 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs
@@ -149,12 +149,6 @@ internal static extern int hostfxr_resolve_sdk2(
hostfxr_resolve_sdk2_flags_t flags,
hostfxr_resolve_sdk2_result_fn result);
- [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF16)]
- internal delegate int hostfxr_initialize_for_runtime_config_fn(
- string runtime_config_path,
- IntPtr parameters,
- out IntPtr host_context_handle);
-
[DllImport(Constants.HostFxr, CharSet = UTF16, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int hostfxr_initialize_for_runtime_config(
string runtime_config_path,
@@ -191,12 +185,6 @@ internal static extern int hostfxr_resolve_sdk2(
hostfxr_resolve_sdk2_flags_t flags,
hostfxr_resolve_sdk2_result_fn result);
- [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = UTF8)]
- internal delegate int hostfxr_initialize_for_runtime_config_fn(
- string runtime_config_path,
- IntPtr parameters,
- out IntPtr host_context_handle);
-
[DllImport(Constants.HostFxr, CharSet = UTF8, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
internal static extern int hostfxr_initialize_for_runtime_config(
string runtime_config_path,
From fe5c737e2f6bcbeb205c002ec5a10e7a9bdab725 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 13 Feb 2024 10:36:36 -0800
Subject: [PATCH 31/39] update the scope of tfmValue
---
src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index e3b47c3cd1c1..77b702ed6d91 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -205,9 +205,9 @@ bool isGlobalTool
var runtimeConfigFilePath = Path.ChangeExtension(executableFilePath.ToString(), ".runtimeconfig.json");
// Check if the runtimeconfig.json file is compatible with the current runtime
- string tfmValue = "";
if (File.Exists(runtimeConfigFilePath))
- {
+ {
+ string tfmValue = "";
JsonElement rootElement = JsonDocument.Parse(File.ReadAllText(runtimeConfigFilePath)).RootElement;
if (rootElement.TryGetProperty("runtimeOptions", out JsonElement runtimeOptionsElement) &&
@@ -215,7 +215,6 @@ bool isGlobalTool
{
tfmValue = new string(tfmElement.GetString().Where(c => char.IsDigit(c) || c == '.').ToArray());
}
- var tfmStr = double.TryParse(tfmValue, out double tfmDouble) ? tfmDouble.ToString() : "";
var result = NETCoreSdkResolverNativeWrapper.InitializeForRuntimeConfig(runtimeConfigFilePath);
RuntimeConfigDetectionMessage(result, packageId, tfmValue, isGlobalTool);
}
From 8d8902fa088f53b68f112fccf7aeeb49aca0e5a1 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 13 Feb 2024 10:45:52 -0800
Subject: [PATCH 32/39] return enum result from the runtime API
---
.../ToolPackage/ToolPackageDownloader.cs | 19 ++++--------------
.../NETCoreSdkResolverNativeWrapper.cs | 20 +++++++++++++++++--
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index 77b702ed6d91..ab5b81144a25 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -1,14 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.CommandLine;
using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Threading.Tasks;
using Microsoft.DotNet.Cli.NuGetPackageDownloader;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ToolPackage;
@@ -28,8 +21,8 @@
using NuGet.Configuration;
using Microsoft.TemplateEngine.Utils;
using Newtonsoft.Json.Linq;
-using Microsoft.DotNet.NativeWrapper;
using System.Text.Json;
+using static Microsoft.DotNet.NativeWrapper.NETCoreSdkResolverNativeWrapper;
namespace Microsoft.DotNet.Cli.ToolPackage
{
@@ -215,23 +208,19 @@ bool isGlobalTool
{
tfmValue = new string(tfmElement.GetString().Where(c => char.IsDigit(c) || c == '.').ToArray());
}
- var result = NETCoreSdkResolverNativeWrapper.InitializeForRuntimeConfig(runtimeConfigFilePath);
+ var result = InitializeForRuntimeConfig(runtimeConfigFilePath);
RuntimeConfigDetectionMessage(result, packageId, tfmValue, isGlobalTool);
}
}
- private static void RuntimeConfigDetectionMessage(int result, PackageId packageId, string tfmStr = "", bool isGlobalTool = false)
+ private static void RuntimeConfigDetectionMessage(InitializationRuntimeConfigResult result, PackageId packageId, string tfmStr = "", bool isGlobalTool = false)
{
var global = isGlobalTool ? " -g" : "";
switch(result)
{
- // RuntimeConfigDetectionResult::Success
- case 0:
- case 1:
- case 2:
+ case InitializationRuntimeConfigResult.Success:
break;
- // RuntimeConfigDetectionResult incompatible
default:
throw new GracefulException(
string.Format(
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
index bfeab7cddbe8..ab50b251d739 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
#pragma warning disable IDE0240 // Remove redundant nullable directive
#nullable enable
@@ -57,7 +59,13 @@ internal struct hostfxr_initialize_parameters
}
- public static int InitializeForRuntimeConfig(string runtimeConfigPath)
+ public enum InitializationRuntimeConfigResult
+ {
+ Success,
+ RuntimeConfigNotFound,
+ }
+
+ public static InitializationRuntimeConfigResult InitializeForRuntimeConfig(string runtimeConfigPath)
{
var result = -1;
IntPtr hostContextHandle = default;
@@ -75,7 +83,15 @@ public static int InitializeForRuntimeConfig(string runtimeConfigPath)
}
Marshal.FreeHGlobal(parametersPtr);
- return result;
+ switch (result)
+ {
+ case 0:
+ case 1:
+ case 2:
+ return InitializationRuntimeConfigResult.Success;
+ default:
+ return InitializationRuntimeConfigResult.RuntimeConfigNotFound;
+ }
}
}
}
From ff12a1a64b7793cd59b95fb29a36b5aeec80d8df Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 13 Feb 2024 10:51:06 -0800
Subject: [PATCH 33/39] combine the functions for runtime compatibility error
message
---
.../ToolPackage/ToolPackageDownloader.cs | 27 +++++++++----------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
index ab5b81144a25..a045a8058194 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs
@@ -209,23 +209,20 @@ bool isGlobalTool
tfmValue = new string(tfmElement.GetString().Where(c => char.IsDigit(c) || c == '.').ToArray());
}
var result = InitializeForRuntimeConfig(runtimeConfigFilePath);
- RuntimeConfigDetectionMessage(result, packageId, tfmValue, isGlobalTool);
- }
- }
- private static void RuntimeConfigDetectionMessage(InitializationRuntimeConfigResult result, PackageId packageId, string tfmStr = "", bool isGlobalTool = false)
- {
- var global = isGlobalTool ? " -g" : "";
- switch(result)
- {
- case InitializationRuntimeConfigResult.Success:
- break;
+ // Error if tool is incompatible
+ var global = isGlobalTool ? " -g" : "";
+ switch (result)
+ {
+ case InitializationRuntimeConfigResult.Success:
+ break;
- default:
- throw new GracefulException(
- string.Format(
- CommonLocalizableStrings.ToolPackageRuntimeConfigIncompatible,
- packageId, tfmStr, global));
+ default:
+ throw new GracefulException(
+ string.Format(
+ CommonLocalizableStrings.ToolPackageRuntimeConfigIncompatible,
+ packageId, tfmValue, global));
+ }
}
}
From 52ca72b8f2692130e7429bf2a12e3aa5060eeb85 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 13 Feb 2024 11:01:58 -0800
Subject: [PATCH 34/39] using existing isQuiet/isMinimal method
---
.../NugetPackageDownloader/NuGetPackageDownloader.cs | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
index c8371ef865da..70346747d827 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
+++ b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
@@ -15,6 +15,7 @@
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
using NuGet.Versioning;
+using Microsoft.DotNet.Cli;
namespace Microsoft.DotNet.Cli.NuGetPackageDownloader
{
@@ -135,17 +136,11 @@ public async Task DownloadPackageAsync(PackageId packageId,
return nupkgPath;
}
- private bool verbosityGreaterThanMinimal()
- {
- return _verbosityOptions != VerbosityOptions.quiet && _verbosityOptions != VerbosityOptions.q
- && _verbosityOptions != VerbosityOptions.minimal && _verbosityOptions != VerbosityOptions.m;
- }
-
private void VerifySigning(string nupkgPath)
{
if (!_verifySignatures && !_validationMessagesDisplayed)
{
- if (verbosityGreaterThanMinimal())
+ if (!(_verbosityOptions.IsQuiet() || _verbosityOptions.IsMinimal()))
{
_reporter.WriteLine(LocalizableStrings.NuGetPackageSignatureVerificationSkipped);
}
From f1f55d61e478eda7c169ae7cc29216350823a420 Mon Sep 17 00:00:00 2001
From: annie <59816815+JL03-Yue@users.noreply.github.com>
Date: Tue, 19 Mar 2024 14:54:16 -0700
Subject: [PATCH 35/39] validate stderr for roll forward error test
---
.../CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
index f7ba4fbe8eba..216b1afac102 100644
--- a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
+++ b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs
@@ -595,7 +595,10 @@ public void WhenInstallIncompatibleToolWithoutForceItShouldFail()
.WithEnvironmentVariable("DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK", "true")
.WithWorkingDirectory(testDir);
- toolInstallGlobalOrToolPathCommand.Execute().Should().Fail();
+ toolInstallGlobalOrToolPathCommand.Execute().Should().Fail()
+ .And.HaveStdErrContaining(string.Format(
+ CommonLocalizableStrings.ToolPackageRuntimeConfigIncompatible,
+ UnlistedPackageId, "2.1", " -g").Black());
}
[Fact]
From f03033c174bf64f411342971e58d4086f4842ca2 Mon Sep 17 00:00:00 2001
From: Forgind <12969783+Forgind@users.noreply.github.com>
Date: Tue, 20 Aug 2024 12:03:37 -0400
Subject: [PATCH 36/39] Tweak string
---
src/Cli/dotnet/CommonLocalizableStrings.resx | 10 ++++----
.../xlf/CommonLocalizableStrings.cs.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.de.xlf | 24 +++++++++----------
.../xlf/CommonLocalizableStrings.es.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.fr.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.it.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.ja.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.ko.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.pl.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.pt-BR.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.ru.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.tr.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.zh-Hans.xlf | 20 ++++++++--------
.../xlf/CommonLocalizableStrings.zh-Hant.xlf | 20 ++++++++--------
14 files changed, 137 insertions(+), 137 deletions(-)
diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx
index 7d92b7797815..1f5b5e8107bc 100644
--- a/src/Cli/dotnet/CommonLocalizableStrings.resx
+++ b/src/Cli/dotnet/CommonLocalizableStrings.resx
@@ -739,15 +739,15 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
index 818429aa6408..a228e02e12ac 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
@@ -290,15 +290,15 @@ Výchozí hodnota je false, ale pokud cílíte na .NET 7 nebo nižší a je zad
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
index 0988b73c3642..dbfe340428c1 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
@@ -290,36 +290,36 @@ Der Standardwert lautet FALSE. Wenn sie jedoch auf .NET 7 oder niedriger abziele
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
dotnet tool install {0}{2} --force
-
+
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
dotnet tool install {0}{2} --force
-
+
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
index ae60a2e27cde..e2ca2a06609c 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
@@ -291,15 +291,15 @@ El valor predeterminado es "false". Sin embargo, cuando el destino es .NET 7 o i
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -307,15 +307,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
index fd8637fd6136..6ef935327ab9 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
@@ -291,15 +291,15 @@ La valeur par défaut est « false ». Toutefois, lorsque vous ciblez .NET 7 ou
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -307,15 +307,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
index 4d4cd6819688..4fa1ea1df071 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
@@ -290,15 +290,15 @@ Il valore predefinito è 'false'. Tuttavia, quando la destinazione è .NET 7 o u
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
index aad52761cb39..9f1edd4dd046 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
@@ -290,15 +290,15 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
index 35fe3151f180..b602612b915d 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
@@ -291,15 +291,15 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -307,15 +307,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
index 36d0105a85e5..c2033bc7b573 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
@@ -290,15 +290,15 @@ Wartość domyślna to „false”. Jednak w przypadku określania wartości doc
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
index 682cf0420267..ea453c0cc5c0 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
@@ -290,15 +290,15 @@ O padrão é falso.' No entanto, ao direcionar o .NET 7 ou inferior, o padrão
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
index 73842891304b..aa173c999b86 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
@@ -290,15 +290,15 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
index 9d735340f04d..0e879aac3289 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
@@ -290,15 +290,15 @@ Varsayılan değer 'false' olur. Ancak çalışma zamanı tanımlayıcısı beli
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
index b69f57c0f46a..adf25f959333 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
@@ -290,15 +290,15 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
index 4f55096d3012..4f46eb3ba6d0 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
@@ -290,15 +290,15 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
@@ -306,15 +306,15 @@ dotnet tool install {0}{2} --force
Installation failed.
-This app wasn't installed because it won't run on your machine. This can be resolved by one of the following:
+This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
-1. Install with the `--allow-roll-forward` flag, using with the following command.
+1. Install .NET {1} with the following link
-dotnet tool install {0}{2} --allow-roll-forward
+https://aka.ms/dotnet/download/sdk
-2. Install .NET {1} with the following link
+2. Install with the `--allow-roll-forward` flag, using with the following command.
-https://aka.ms/dotnet/download/sdk
+dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
From 40acd741ce4505b59ab661283c854332f5f9060d Mon Sep 17 00:00:00 2001
From: Forgind <12969783+Forgind@users.noreply.github.com>
Date: Wed, 21 Aug 2024 13:06:02 -0400
Subject: [PATCH 37/39] Fix build errors
---
src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs | 9 ++++++++-
src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf | 4 ++--
.../NETCoreSdkResolverNativeWrapper.cs | 2 --
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs b/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
index e430d55b995c..3d966a23c20c 100644
--- a/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
+++ b/src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System.Threading.Tasks;
using Microsoft.DotNet.ToolPackage;
using NuGet.Versioning;
@@ -18,5 +17,13 @@ IToolPackage InstallPackage(PackageLocation packageLocation,
bool isGlobalToolRollForward = false,
bool forceInstall = false
);
+
+ NuGetVersion GetNuGetVersion(
+ PackageLocation packageLocation,
+ PackageId packageId,
+ VerbosityOptions verbosity,
+ VersionRange versionRange = null,
+ bool isGlobalTool = false
+ );
}
}
diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
index dbfe340428c1..229490475797 100644
--- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
@@ -303,7 +303,7 @@ dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
dotnet tool install {0}{2} --force
-
+
Installation failed.
This app wasn't installed because it requires .NET {1} to run, which is not installed. This can be resolved by one of the following:
@@ -319,7 +319,7 @@ dotnet tool install {0}{2} --allow-roll-forward
3. Install with `--force` and manually configure the tool to run, using with the following command.
dotnet tool install {0}{2} --force
-
+
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
index ab50b251d739..42d12b11be0e 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/NETCoreSdkResolverNativeWrapper.cs
@@ -8,8 +8,6 @@
#nullable enable
#pragma warning restore IDE0240 // Remove redundant nullable directive
-using System.Diagnostics;
-
namespace Microsoft.DotNet.NativeWrapper
{
public static class NETCoreSdkResolverNativeWrapper
From eb84eba7a8f46d07585db686af65035d34cf4a21 Mon Sep 17 00:00:00 2001
From: Noah Gilson
Date: Thu, 17 Oct 2024 16:03:22 -0700
Subject: [PATCH 38/39] Make it so it doesn't look like the runtime is not
compatible in an err msg
Co-authored-by: Daniel Plaisted
---
.../dotnet/commands/dotnet-tool/install/LocalizableStrings.resx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
index 7e17fc910308..801a483a832c 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
@@ -248,6 +248,6 @@ If you would like to create a manifest, use the `--create-manifest-if-needed` fl
Allow package downgrade when installing a .NET tool package.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
From 825822904c74d819854c52cd5d7413d7e8a8ed34 Mon Sep 17 00:00:00 2001
From: Noah Gilson
Date: Thu, 17 Oct 2024 16:25:24 -0700
Subject: [PATCH 39/39] update xlf
---
.../commands/dotnet-tool/install/ToolInstallLocalCommand.cs | 3 +--
.../dotnet-tool/install/xlf/LocalizableStrings.cs.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.de.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.es.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.fr.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.it.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.ja.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.ko.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.pl.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.ru.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.tr.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf | 4 ++--
.../dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf | 4 ++--
14 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
index b1305a6039b0..e988af922fab 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
@@ -22,8 +22,7 @@ internal class ToolInstallLocalCommand : CommandBase
private readonly IReporter _reporter;
private readonly PackageId? _packageId;
private readonly bool _allowPackageDowngrade;
- private readonly IToolPackageDownloader _toolPackageDownloader;
- private readonly bool _forceInstall;
+ private readonly bool _forceInstall;
private readonly string _explicitManifestFile;
private readonly bool _createManifestIfNeeded;
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
index f2c445efe585..a23a2e810638 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
index d16dde642be1..d29f72d7a83f 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
index 9f6fcde9bd57..4524c85278d5 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
index aba97454e15a..3cc96cd6f742 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
index 38ee0c833f0f..835a05520af7 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
index dc298dd5fe7e..faf542824a90 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
index 106c1f9087c2..7f87329583fc 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
index b07c2c9f3204..70f9d6c0d502 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
index 9c4e54f77a83..e8939012f862 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
index 673976a2d236..1e6bc66b26da 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
index 44daf2876365..db22169c4a26 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
index 8cf9520229e8..8048a037f613 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
index f189180a1459..aefc5088519d 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
@@ -13,8 +13,8 @@
- Forces a tool to be installed even if the runtime is not compatible with your machine.
- Forces a tool to be installed even if the runtime is not compatible with your machine.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.
+ Forces a tool to be installed even if a compatible .NET runtime is not installed.