From 5f337e2a61318e2fa8af93f2b507d5effdd87e16 Mon Sep 17 00:00:00 2001
From: Copilot <198982749+Copilot@users.noreply.github.com>
Date: Wed, 17 Sep 2025 14:25:13 +0000
Subject: [PATCH 1/3] add PickBestRid task
---
.github/copilot-instructions.md | 3 +
src/Tasks/Common/Resources/Strings.resx | 10 +-
src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.de.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.es.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.it.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 10 +
.../Common/Resources/xlf/Strings.pt-BR.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 10 +
src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 10 +
.../Common/Resources/xlf/Strings.zh-Hans.xlf | 10 +
.../Common/Resources/xlf/Strings.zh-Hant.xlf | 10 +
.../GivenAPickBestRid.cs | 198 ++++++++++++++++++
.../Microsoft.NET.Build.Tasks/PickBestRid.cs | 57 +++++
...oft.NET.RuntimeIdentifierInference.targets | 2 +
18 files changed, 399 insertions(+), 1 deletion(-)
create mode 100644 src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAPickBestRid.cs
create mode 100644 src/Tasks/Microsoft.NET.Build.Tasks/PickBestRid.cs
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 56eddb899a16..00e3e87beec2 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -2,6 +2,9 @@ Coding Style and Changes:
- Code should match the style of the file it's in.
- Changes should be minimal to resolve a problem in a clean way.
- User-visible changes to behavior should be considered carefully before committing. They should always be flagged.
+- When generating code, run `dotnet format` to ensure uniform formatting.
+- Prefer using file-based namespaces for new code.
+- Do not allow unused `using` directives to be committed.
Testing:
- Large changes should always include test changes.
diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx
index 8bd022cc5c4b..6724e5757ca3 100644
--- a/src/Tasks/Common/Resources/Strings.resx
+++ b/src/Tasks/Common/Resources/Strings.resx
@@ -1002,5 +1002,13 @@ You may need to build the project on another operating system or architecture, o
NETSDK1230: The {0} and {1} properties cannot both be specified. Remove one or the other.{StrBegins="NETSDK1230: "}
-
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+
+
diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
index 33eefab224e0..78533478f85a 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: Nastavení RollForward je podporováno pouze pro .NET Core 3.0 nebo vyšší.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: Zadaný identifikátor RuntimeIdentifier {0} se nerozpoznal. Další informace najdete v https://aka.ms/netsdk1083.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: Poskytnutá knihovna typů {0} neexistuje.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: Nepodařilo se najít vyhodnocenou cestu pro {0}.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
index de8cd2d4dcd6..8f188828e75d 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: Die RollForward-Einstellung wird nur für .NET Core 3.0 oder höher unterstützt.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: Der angegebene RuntimeIdentifier "{0}" wird nicht erkannt. Weitere Informationen finden Sie unter https://aka.ms/netsdk1083.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: Die angegebene Typbibliothek "{0}" ist nicht vorhanden.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: Der aufgelöste Pfad für "{0}" wurde nicht gefunden.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
index 992d17ed0e87..317daa89903f 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: La configuración de RollForward solo se admite en .NET Core 3.0 o versiones posteriores.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: No se reconoce el valor de RuntimeIdentifier especificado "{0}". Consulte https://aka.ms/netsdk1083 para obtener más información.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: La biblioteca de tipos "{0}" proporcionada no existe.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: No se encuentra la ruta de acceso resuelta para "{0}".
diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
index f1fa539c671d..d0837ecf5bc6 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: le paramètre RollForward est uniquement pris en charge sur .NET Core 3.0 ou version ultérieure.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: Le RuntimeIdentifier «{0}» spécifié n’est pas reconnu. Pour plus d’informations, consultez https://aka.ms/netsdk1083.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: la bibliothèque de types «{0}» fournie n’existe pas.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: Chemin résolu introuvable pour '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
index 80df52af6e60..3829d06bd21d 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: l'impostazione RollForward è supportata solo in .NET Core 3.0 o versione successiva.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: L'elemento RuntimeIdentifier {0} specificato non è riconosciuto. Per altre informazioni, vedere https://aka.ms/netsdk1083.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: la libreria dei tipi specificata '{0}' non esiste.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: il percorso risolto per '{0}' non è stato trovato.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
index 0855513cab25..9f8af67938dd 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: ロールフォワードの設定は、.NET Core 3.0 以降でのみサポートされています。{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: 指定された RuntimeIdentifier '{0}' は認識されません。詳細については、「https://aka.ms/netsdk1083」を参照してください。
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: 指定済みのタイプ ライブラリ '{0}' は存在しません。{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: 解決された '{0}' のパスが見つかりません。
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
index 3af9fd77229c..75547bfae7a5 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: RollForward 설정은 .NET Core 3.0 이상에서만 지원됩니다.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: 지정한 '{0}' RuntimeIdentifier를 인식할 수 없습니다. 자세한 내용은 https://aka.ms/netsdk1083을 참조하세요.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: 제공된 형식 라이브러리 '{0}'이(가) 없습니다.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: '{0}'에 대해 확인된 경로를 찾을 수 없습니다.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
index 9075e67ffbdb..1c5fb6d9c040 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: Ustawienie RollForward jest obsługiwane tylko w programie .NET Core 3.0 lub nowszym.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: określony element RuntimeIdentifier „{0}” nie został rozpoznany. Aby uzyskać więcej informacji, zobacz https://aka.ms/netsdk1083.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: podana biblioteka typów "{0}" nie istnieje.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: Nie można odnaleźć rozpoznanej ścieżki dla elementu „{0}”.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
index 6018e8c57fe3..5d729b7f893d 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: só há suporte para a configuração RollForward no .NET Core 3.0 ou superior.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: O RuntimeIdentifier '{0}' especificado não é reconhecido. Consulte https://aka.ms/netsdk1083 para obter mais informações.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: a biblioteca de tipos fornecida '{0}' não existe.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: Não foi possível localizar o caminho resolvido para '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
index 200069017dc3..7e06a4103dc0 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: параметр RollForward поддерживается только в .NET Core 3.0 или более поздних версий.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: Указанный RuntimeIdentifier "{0}" не распознан. Дополнительные сведения: https://aka.ms/netsdk1083.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: предоставленная библиотека типов "{0}" не существует.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: не удается найти разрешенный путь для "{0}".
diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
index aa99e0293764..57b57358f494 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: RollForward ayarı yalnızca .NET Core 3.0 veya üzeri sürümlerde desteklenir.{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: Belirtilen RuntimeIdentifier '{0}' tanınmıyor. Daha fazla bilgi için https://aka.ms/netsdk1083 adresini ziyaret edin.
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: Sağlanan tür kitaplığı '{0}' mevcut değil.{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: '{0}' için çözümlenmiş yol bulunamıyor.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
index 5823f6b3bdbe..011ce04ee772 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: RollForward 设置仅在 .NET Core 3.0 或更高版本上受支持。{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: 无法识别指定的 RuntimeIdentifier“{0}”。有关详细信息,请参阅 https://aka.ms/netsdk1083。
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: 提供的类型库“{0}”不存在。{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: 无法找到“{0}”的已解析路径。
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
index cf81a058e906..a6ecbc51f231 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
@@ -861,6 +861,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1103: 僅於 .NET Core 3.0 或更新版本支援 RollForward 設定。{StrBegins="NETSDK1103: "}
+
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.NETSDK1083: 無法辨識指定的 RuntimeIdentifier '{0}'。如需詳細資訊,請參閱 https://aka.ms/netsdk1083。
@@ -958,6 +963,11 @@ The following are names of parameters or literal values and should not be transl
NETSDK1172: 提供的型別程式庫 '{0}' 不存在。{StrBegins="NETSDK1172: "}
+
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1016: Unable to find resolved path for '{0}'.NETSDK1016: 找不到 '{0}' 的解析路徑。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAPickBestRid.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAPickBestRid.cs
new file mode 100644
index 000000000000..b7491af5782a
--- /dev/null
+++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAPickBestRid.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using FluentAssertions;
+using Xunit;
+
+namespace Microsoft.NET.Build.Tasks.UnitTests
+{
+ public class GivenAPickBestRid
+ {
+ private const string RuntimeGraphContent = @"{
+ ""runtimes"": {
+ ""any"": {
+ ""#import"": [""base""]
+ },
+ ""base"": {
+ ""#import"": []
+ },
+ ""win"": {
+ ""#import"": [""any""]
+ },
+ ""win-x64"": {
+ ""#import"": [""win""]
+ },
+ ""win-x86"": {
+ ""#import"": [""win""]
+ },
+ ""linux"": {
+ ""#import"": [""any""]
+ },
+ ""linux-x64"": {
+ ""#import"": [""linux""]
+ },
+ ""osx"": {
+ ""#import"": [""any""]
+ },
+ ""osx-x64"": {
+ ""#import"": [""osx""]
+ }
+ }
+ }";
+
+ [Fact]
+ public void ItPicksBestMatchingRid()
+ {
+ var runtimeGraphPath = Path.GetTempFileName();
+ File.WriteAllText(runtimeGraphPath, RuntimeGraphContent);
+
+ try
+ {
+ var task = new PickBestRid
+ {
+ BuildEngine = new MockBuildEngine(),
+ RuntimeGraphPath = runtimeGraphPath,
+ TargetRid = "win-x64",
+ SupportedRids = new[] { "any", "win", "win-x64" }
+ };
+
+ task.Execute().Should().BeTrue();
+ task.MatchingRid.Should().Be("win-x64");
+ }
+ finally
+ {
+ File.Delete(runtimeGraphPath);
+ }
+ }
+
+ [Fact]
+ public void ItPicksBestMatchingRidFallback()
+ {
+ var runtimeGraphPath = Path.GetTempFileName();
+ File.WriteAllText(runtimeGraphPath, RuntimeGraphContent);
+
+ try
+ {
+ var task = new PickBestRid
+ {
+ BuildEngine = new MockBuildEngine(),
+ RuntimeGraphPath = runtimeGraphPath,
+ TargetRid = "win-x64",
+ SupportedRids = new[] { "any", "win" }
+ };
+
+ task.Execute().Should().BeTrue();
+ task.MatchingRid.Should().Be("win");
+ }
+ finally
+ {
+ File.Delete(runtimeGraphPath);
+ }
+ }
+
+ [Fact]
+ public void ItPicksBestMatchingRidAnyFallback()
+ {
+ var runtimeGraphPath = Path.GetTempFileName();
+ File.WriteAllText(runtimeGraphPath, RuntimeGraphContent);
+
+ try
+ {
+ var task = new PickBestRid
+ {
+ BuildEngine = new MockBuildEngine(),
+ RuntimeGraphPath = runtimeGraphPath,
+ TargetRid = "win-x64",
+ SupportedRids = new[] { "any" }
+ };
+
+ task.Execute().Should().BeTrue();
+ task.MatchingRid.Should().Be("any");
+ }
+ finally
+ {
+ File.Delete(runtimeGraphPath);
+ }
+ }
+
+ [Fact]
+ public void ItHandlesNonExistentRuntimeGraphFile()
+ {
+ var task = new PickBestRid
+ {
+ BuildEngine = new MockBuildEngine(),
+ RuntimeGraphPath = "non-existent-file.json",
+ TargetRid = "win-x64",
+ SupportedRids = new[] { "any" }
+ };
+
+ task.Execute().Should().BeFalse();
+ task.MatchingRid.Should().BeNull();
+
+ var buildEngine = (MockBuildEngine)task.BuildEngine;
+ buildEngine.Errors.Should().HaveCount(1);
+ buildEngine.Errors[0].Message.Should().Contain("non-existent-file.json");
+ buildEngine.Errors[0].Message.Should().Contain("does not exist");
+ }
+
+ [Fact]
+ public void ItHandlesUnknownTargetRid()
+ {
+ var runtimeGraphPath = Path.GetTempFileName();
+ File.WriteAllText(runtimeGraphPath, RuntimeGraphContent);
+
+ try
+ {
+ var task = new PickBestRid
+ {
+ BuildEngine = new MockBuildEngine(),
+ RuntimeGraphPath = runtimeGraphPath,
+ TargetRid = "unknown-rid",
+ SupportedRids = new[] { "any", "win" }
+ };
+
+ task.Execute().Should().BeFalse();
+ task.MatchingRid.Should().BeNull();
+
+ var buildEngine = (MockBuildEngine)task.BuildEngine;
+ buildEngine.Errors.Should().HaveCount(1);
+ buildEngine.Errors[0].Message.Should().Contain("unknown-rid");
+ buildEngine.Errors[0].Message.Should().Contain("Unable to find a matching RID");
+ }
+ finally
+ {
+ File.Delete(runtimeGraphPath);
+ }
+ }
+
+ [Fact]
+ public void ItHandlesNoSupportedRidsMatch()
+ {
+ var runtimeGraphPath = Path.GetTempFileName();
+ File.WriteAllText(runtimeGraphPath, RuntimeGraphContent);
+
+ try
+ {
+ var task = new PickBestRid
+ {
+ BuildEngine = new MockBuildEngine(),
+ RuntimeGraphPath = runtimeGraphPath,
+ TargetRid = "win-x64",
+ SupportedRids = new[] { "linux", "osx" }
+ };
+
+ task.Execute().Should().BeFalse();
+ task.MatchingRid.Should().BeNull();
+
+ var buildEngine = (MockBuildEngine)task.BuildEngine;
+ buildEngine.Errors.Should().HaveCount(1);
+ buildEngine.Errors[0].Message.Should().Contain("win-x64");
+ buildEngine.Errors[0].Message.Should().Contain("Unable to find a matching RID");
+ }
+ finally
+ {
+ File.Delete(runtimeGraphPath);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/PickBestRid.cs b/src/Tasks/Microsoft.NET.Build.Tasks/PickBestRid.cs
new file mode 100644
index 000000000000..c0e02ef0b30b
--- /dev/null
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/PickBestRid.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Microsoft.Build.Framework;
+using NuGet.RuntimeModel;
+
+namespace Microsoft.NET.Build.Tasks;
+
+///
+/// This task uses the given RID graph in a given SDK to pick the best match from among a set of supported RIDs for the current RID
+///
+public sealed class PickBestRid : TaskBase
+{
+ ///
+ /// The path to the RID graph to read
+ ///
+ [Required]
+ public string RuntimeGraphPath { get; set; } = "";
+
+ ///
+ /// The RID to find the best fit for
+ ///
+ [Required]
+ public string TargetRid { get; set; } = "";
+
+ ///
+ /// All of the RIDs that are allowed to match against the
+ ///
+ [Required]
+ public string[] SupportedRids { get; set; } = Array.Empty();
+
+ ///
+ /// The RID from among that best matches the , if any.
+ ///
+ [Output]
+ public string? MatchingRid { get; set; }
+
+ protected override void ExecuteCore()
+ {
+ if (!File.Exists(RuntimeGraphPath))
+ {
+ Log.LogError(Strings.RuntimeGraphFileDoesNotExist, RuntimeGraphPath);
+ return;
+ }
+
+ RuntimeGraph graph = new RuntimeGraphCache(this).GetRuntimeGraph(RuntimeGraphPath);
+ var bestRidForPlatform = NuGetUtils.GetBestMatchingRid(graph, TargetRid, SupportedRids, out bool wasInGraph);
+
+ if (!wasInGraph || bestRidForPlatform == null)
+ {
+ Log.LogError(Strings.UnableToFindMatchingRid, TargetRid, string.Join(",", SupportedRids), RuntimeGraphPath);
+ return;
+ }
+
+ MatchingRid = bestRidForPlatform;
+ }
+}
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
index a36f2b8e7534..b2551a1c7251 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
@@ -372,6 +372,8 @@ Copyright (c) .NET Foundation. All rights reserved.
+
From 4dd298c28e9aa70b661b4ce3f2e90e3aff399a7e Mon Sep 17 00:00:00 2001
From: --get
Date: Wed, 17 Sep 2025 13:06:05 -0500
Subject: [PATCH 2/3] fix duplicated numbers
---
src/Tasks/Common/Resources/Strings.resx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx
index 6724e5757ca3..0ce5aebf5b99 100644
--- a/src/Tasks/Common/Resources/Strings.resx
+++ b/src/Tasks/Common/Resources/Strings.resx
@@ -1003,12 +1003,12 @@ You may need to build the project on another operating system or architecture, o
{StrBegins="NETSDK1230: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
From 9fc3f74325fc85fc539fb1fd581d521ee6dfffa0 Mon Sep 17 00:00:00 2001
From: --get
Date: Wed, 17 Sep 2025 13:20:14 -0500
Subject: [PATCH 3/3] update loc
---
src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.de.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.es.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.it.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 12 ++++++------
src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 12 ++++++------
13 files changed, 78 insertions(+), 78 deletions(-)
diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
index 78533478f85a..bd159c631b08 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
index 8f188828e75d..531c0faa0052 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
index 317daa89903f..511a72b3c3a6 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
index d0837ecf5bc6..9c62ece01900 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
index 3829d06bd21d..de06e93873ab 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
index 9f8af67938dd..babd059b78b5 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
index 75547bfae7a5..36b7099e3bdf 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
index 1c5fb6d9c040..dc4aba1f2e5e 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
index 5d729b7f893d..906080a716bd 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
index 7e06a4103dc0..135d04e004a0 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
index 57b57358f494..ddf897db38c3 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
index 011ce04ee772..3ab48490f99b 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
index a6ecbc51f231..10ec0f90c63c 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
@@ -862,9 +862,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1103: "}
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- NETSDK1229: File '{0}' does not exist. Please ensure the runtime graph path exists.
- {StrBegins="NETSDK1229: "}{Locked="{0}"}
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ NETSDK1231: File '{0}' does not exist. Please ensure the runtime graph path exists.
+ {StrBegins="NETSDK1231: "}{Locked="{0}"}NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. See https://aka.ms/netsdk1083 for more information.
@@ -964,9 +964,9 @@ The following are names of parameters or literal values and should not be transl
{StrBegins="NETSDK1172: "}
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- NETSDK1230: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
- {StrBegins="NETSDK1230: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ NETSDK1232: Unable to find a matching RID for '{0}' from among [{1}] in graph '{2}'.
+ {StrBegins="NETSDK1232: "}{Locked="{0}"}{Locked="{1}"}{Locked="{2}"}NETSDK1016: Unable to find resolved path for '{0}'.