diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx
index 4dac8a77d745..fca9b62eadd1 100644
--- a/src/Tasks/Common/Resources/Strings.resx
+++ b/src/Tasks/Common/Resources/Strings.resx
@@ -839,8 +839,8 @@ You may need to build the project on another operating system or architecture, o
NETSDK1182: Targeting .NET 6.0 or higher in Visual Studio 2019 is not supported.{StrBegin="NETSDK1182: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.{StrBegin="NETSDK1183: "}
@@ -916,4 +916,12 @@ You may need to build the project on another operating system or architecture, o
NETSDK1202: The workload '{0}' is out of support and will not receive security updates in the future. Please refer to {1} for more information about the support policy.{StrBegin="NETSDK1202: "}
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
index 2612cfb8c5bf..e85342256e3e 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource se dá použít jen spolu s celočíselnými typy prostředků.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Sestavení nelze optimalizovat pro kompilaci s předstihem: nebyl nalezen platný balíček modulu runtime. Buď nastavte vlastnost PublishAot na hodnotu false, nebo při publikování použijte podporovaný identifikátor modulu runtime. Při cílení na .NET 7 nebo vyšší nezapomeňte obnovit balíčky s vlastností PublishAot nastavenou na hodnotu true.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: Sada SDK nepodporuje kompilaci s předstihem. Nastavte vlastnost PublishAot na false.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: Konfigurační soubor aplikace musí obsahovat kořenový element konfigurace.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
index 559ac7156f53..0ed67532d988 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource kann nur mit ganzzahligen Ressourcentypen verwendet werden.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Assemblys für die Vorabkompilierung können nicht optimiert werden: Es wurde kein gültiges Laufzeitpaket gefunden. Legen Sie entweder die PublishAot-Eigenschaft auf FALSE fest, oder verwenden Sie bei der Veröffentlichung einen unterstützten Laufzeitbezeichner. Stellen Sie beim Festlegen von .NET 7 oder höher sicher, dass Pakete wiederhergestellt werden, bei denen die PublishAot-Eigenschaft auf TRUE festgelegt ist.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: Das SDK unterstützt keine Vorabkompilierung. Legen Sie die PublishAot-Eigenschaft auf FALSE fest.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: Die Anwendungskonfigurationsdatei muss das Stammkonfigurationselement enthalten.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
index a6bfeac0778d..d9d45b86cb3a 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource solo se puede usar con tipos de recurso de entero.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: No se pueden optimizar los ensamblados para la compilación Ahead of time: no se ha encontrado un paquete en tiempo de ejecución válido. Establezca la propiedad PublishAot en false o use un identificador de tiempo de ejecución compatible al publicar. Cuando el destino sea .NET 7 o una versión posterior, asegúrese de restaurar los paquetes con la propiedad PublishAot establecida en true.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1196: El SDK no admite la compilación por adelantado. Establezca la propiedad PublishAot en false.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: El archivo de configuración de la aplicación debe tener el elemento de configuración raíz.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
index 681d119f84a4..d3999f4802b7 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource peut uniquement être utilisé avec des ressources de type entier.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Nous n’avons pas pu optimiser les assemblys pour la compilation Ahead of time : un package d’exécution valide n’a pas été trouvé. Définissez la propriété PublishAot sur false ou utilisez un identificateur d’exécution pris en charge lors de la publication. Lorsque vous ciblez .NET 7 ou supérieur, assurez-vous de restaurer les packages avec la propriété PublishAot définie sur true.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: Le Kit de développement logiciel (SDK) ne prend pas en charge la compilation anticipée. Définissez la propriété PublishAot sur false.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: Le fichier de configuration de l'application doit avoir un élément de configuration racine.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
index 634113b368d1..976efc9b8fe2 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
@@ -7,16 +7,26 @@
NETSDK1076: è possibile usare AddResource solo con tipi di risorsa integer.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: non è possibile ottimizzare gli assembly per la compilazione Ahead Of Time perché non è stato trovato alcun pacchetto di runtime valido. Impostare la proprietà PublishAot su false oppure usare un identificatore di runtime supportato durante la pubblicazione. Quando si usa .NET 7 o versioni successive, assicurarsi di ripristinare i pacchetti con la proprietà PublishAot impostata su true.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1196: l'SDK non supporta la compilazione in anticipo. Imposta la proprietà PublishAot su false.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: il file di configurazione dell'applicazione deve avere un elemento di configurazione radice.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
index 8aeb9829bb42..41a09b3647af 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource can only be used with integer resource types.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: The application configuration file must have root configuration element.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
index 44f6d47cbb9d..34326104a49f 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource는 정수 리소스 형식에만 사용할 수 있습니다.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Ahead of Time 컴파일을 위해 어셈블리를 최적화할 수 없습니다. 유효한 런타임 패키지를 찾을 수 없습니다. PublishAot 속성을 false로 설정하거나 게시할 때 지원되는 런타임 식별자를 사용하세요. .NET 7 이상을 대상으로 하는 경우 PublishAot 속성이 true로 설정된 패키지를 복원해야 합니다.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: SDK는 Ahead of Time 컴파일을 지원하지 않습니다. PublishAot 속성을 false로 설정합니다.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: 애플리케이션 구성 파일에는 루트 구성 요소가 있어야 합니다.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
index 73ce66f1caad..b9cd384b19a4 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
@@ -7,16 +7,26 @@
NETSDK1076: Element AddResource może być używany tylko z typami zasobów o wartości całkowitej.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Nie można zoptymalizować zestawów pod kątem kompilacji z wyprzedzeniem: nie znaleziono prawidłowego pakietu środowiska uruchomieniowego. Ustaw właściwość PublishAot na wartość false lub użyj obsługiwanego identyfikatora środowiska uruchomieniowego podczas publikowania. W przypadku określania wartości docelowej platformy .NET 7 lub nowszej należy przywrócić pakiety z właściwością PublishAot ustawioną na wartość true.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: Zestaw SDK nie obsługuje kompilacji z wyprzedzeniem. Ustaw właściwość PublishAot na wartość false.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: Plik konfiguracji aplikacji musi mieć główny element konfiguracji.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
index b59ae1e4b3a5..2e0296893954 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource só pode ser usado com os tipos de recursos inteiros.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Não é possível otimizar assemblies para compilação antecipada: um pacote de tempo de execução válido não foi encontrado. Defina a propriedade PublishAot como false ou use um identificador de tempo de execução compatível ao publicar. Ao direcionar o .NET 7 ou superior, certifique-se de restaurar os pacotes com a propriedade PublishAot definida como verdadeiro.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: o SDK não oferece suporte à compilação antecipada. Defina a propriedade PublishAot como false.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: o arquivo de configuração do aplicativo deve ter um elemento de configuração raiz.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
index 935cb5d9ca25..59c7c6a8ad06 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource можно использовать только с целочисленными типами ресурсов.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: невозможно оптимизировать сборки для АОТ-компиляции: не найден допустимый пакет среды выполнения. Задайте для свойства PublishAot значение ЛОЖЬ или используйте поддерживаемый идентификатор среды выполнения при публикации. При нацеливании на .NET 7 или более позднюю версию обязательно восстанавливайте пакеты со свойством PublishAot, для которого задано значение ИСТИНА.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: пакет SDK не поддерживает АОТ-компиляцию. Задайте для свойства PublishAot значение ЛОЖЬ.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: В файле конфигурации приложения должен присутствовать корневой элемент конфигурации.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
index 3a5076720f5d..da2a29f7e380 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource yalnızca tamsayı kaynak türleri ile kullanılabilir.{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: Derlemeler, AOT derlemesi için iyileştirilemedi: geçerli bir çalışma zamanı paketi bulunamadı. PublishAot özelliğini false olarak ayarlayın veya yayımlarken desteklenen bir çalışma zamanı tanımlayıcısı kullanın. .NET 7 veya üzerini hedeflerken PublishAot özelliği true olarak ayarlanmış paketleri geri yüklediğinizden emin olun.
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: SDK önceden derlemeyi desteklemez. PublishAot özelliğini false olarak ayarlayın.{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: Uygulama yapılandırma dosyasının kök yapılandırma öğesi olmalıdır.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
index 0e04d27adf15..50fdbe87f002 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource 只能使用整数资源类型。{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: 无法优化程序集以实现提前编译: 找不到有效的运行时包。请将 PublishAot 属性设置为 false,或在发布时使用支持的运行时标识符。如果面向 .NET 7 或更高版本,请确保还原将 PublishAot 属性设置为 true 的包。
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: SDK 不支持提前编译。请将 PublishAot 属性设置为 false。{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: 应用程序配置文件必须具有根配置元素。
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
index 235a81319c75..652c683b2b0f 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
@@ -7,16 +7,26 @@
NETSDK1076: AddResource 只能與整數資源類型一起使用。{StrBegin="NETSDK1076: "}
-
- NETSDK1183: Unable to optimize assemblies for ahead-of-time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true.
- NETSDK1183: 無法為提前編譯最佳化組件: 找不到有效的執行階段套件。請將 PublishAot 屬性設為 false,或在發佈時使用支援的執行階段識別碼。以 .NET 7 或更高版本為目標時,請務必還原套件,將 PublishAot 屬性設為 true。
- {StrBegin="NETSDK1183: "}
- NETSDK1196: The SDK does not support ahead-of-time compilation. Set the PublishAot property to false.NETSDK1195: SDK 不支援提前編譯。請將 PublishAot 屬性設定為 false。{StrBegin="NETSDK1196: "}
+
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'.
+ {StrBegin="NETSDK1204: "}
+
+
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ NETSDK1183: Ahead-of-time compilation is not supported for the target framework.
+ {StrBegin="NETSDK1183: "}
+
+
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier '{0}'.
+ {StrBegin="NETSDK1203: "}
+ NETSDK1070: The application configuration file must have root configuration element.NETSDK1070: 應用程式組態檔必須有根組態元素。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs
index f6d34e3b351b..02d50f672f2f 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs
@@ -368,7 +368,7 @@ var runtimeRequiredByDeployment
if (ReadyToRunEnabled && ReadyToRunUseCrossgen2)
{
- if (!AddToolPack(ToolPackType.Crossgen2, _normalizedTargetFrameworkVersion, packagesToDownload, implicitPackageReferences))
+ if (AddToolPack(ToolPackType.Crossgen2, _normalizedTargetFrameworkVersion, packagesToDownload, implicitPackageReferences) is not ToolPackSupport.Supported)
{
Log.LogError(Strings.ReadyToRunNoValidRuntimePackageError);
return;
@@ -377,16 +377,25 @@ var runtimeRequiredByDeployment
if (AotEnabled)
{
- if (!AddToolPack(ToolPackType.ILCompiler, _normalizedTargetFrameworkVersion, packagesToDownload, implicitPackageReferences))
+ switch (AddToolPack(ToolPackType.ILCompiler, _normalizedTargetFrameworkVersion, packagesToDownload, implicitPackageReferences))
{
- Log.LogError(Strings.AotNoValidRuntimePackageError);
- return;
+ case ToolPackSupport.UnsupportedForTargetFramework:
+ Log.LogError(Strings.AotUnsupportedTargetFramework);
+ return;
+ case ToolPackSupport.UnsupportedForHostRuntimeIdentifier:
+ Log.LogError(Strings.AotUnsupportedHostRuntimeIdentifier, NETCoreSdkRuntimeIdentifier);
+ return;
+ case ToolPackSupport.UnsupportedForTargetRuntimeIdentifier:
+ Log.LogError(Strings.AotUnsupportedTargetRuntimeIdentifier, RuntimeIdentifier);
+ return;
+ case ToolPackSupport.Supported:
+ break;
}
}
if (RequiresILLinkPack)
{
- if (!AddToolPack(ToolPackType.ILLink, _normalizedTargetFrameworkVersion, packagesToDownload, implicitPackageReferences))
+ if (AddToolPack(ToolPackType.ILLink, _normalizedTargetFrameworkVersion, packagesToDownload, implicitPackageReferences) is not ToolPackSupport.Supported)
{
Log.LogError(Strings.ILLinkNoValidRuntimePackageError);
return;
@@ -610,7 +619,14 @@ private enum ToolPackType
WebAssemblySdk
}
- private bool AddToolPack(
+ enum ToolPackSupport {
+ UnsupportedForTargetFramework,
+ UnsupportedForHostRuntimeIdentifier,
+ UnsupportedForTargetRuntimeIdentifier,
+ Supported
+ }
+
+ private ToolPackSupport AddToolPack(
ToolPackType toolPackType,
Version normalizedTargetFrameworkVersion,
List packagesToDownload,
@@ -634,7 +650,7 @@ private bool AddToolPack(
if (knownPack == null)
{
- return false;
+ return ToolPackSupport.UnsupportedForTargetFramework;
}
var packName = toolPackType.ToString();
@@ -655,7 +671,7 @@ private bool AddToolPack(
var hostRuntimeIdentifier = NuGetUtils.GetBestMatchingRid(runtimeGraph, NETCoreSdkRuntimeIdentifier, packSupportedRuntimeIdentifiers, out bool wasInGraph);
if (hostRuntimeIdentifier == null)
{
- return false;
+ return ToolPackSupport.UnsupportedForHostRuntimeIdentifier;
}
var runtimePackName = packNamePattern.Replace("**RID**", hostRuntimeIdentifier);
@@ -688,7 +704,7 @@ private bool AddToolPack(
var targetRuntimeIdentifier = NuGetUtils.GetBestMatchingRid(runtimeGraph, RuntimeIdentifier, packSupportedRuntimeIdentifiers, out bool wasInGraph2);
if (targetRuntimeIdentifier == null)
{
- return false;
+ return ToolPackSupport.UnsupportedForTargetRuntimeIdentifier;
}
if (!hostRuntimeIdentifier.Equals(targetRuntimeIdentifier))
{
@@ -721,7 +737,7 @@ private bool AddToolPack(
implicitPackageReferences.Add(analyzerPackage);
}
- return true;
+ return ToolPackSupport.Supported;
}
private string GetRuntimeFrameworkVersion(
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
index 1c41495ed24f..b53e1b31bf61 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
+++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
@@ -510,6 +510,62 @@ public void NativeAot_hw_fails_with_sdk6_PackageReference_PublishAot_is_enabled(
}
}
+ [RequiresMSBuildVersionTheory("17.0.0.32901")]
+ [InlineData(ToolsetInfo.CurrentTargetFramework)]
+ public void NativeAot_hw_fails_with_unsupported_target_rid(string targetFramework)
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.OSArchitecture == System.Runtime.InteropServices.Architecture.X64)
+ {
+ var projectName = "HelloWorldUnsupportedTargetRid";
+ var rid = "linux-x64";
+ var unsupportedTargetRid = "linux-arm64";
+
+ var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true);
+ testProject.AdditionalProperties["PublishAot"] = "true";
+
+ var testAsset = _testAssetsManager.CreateTestProject(testProject)
+ .WithProjectChanges(project => OverrideKnownILCompilerPackRuntimeIdentifiers(project, $"{rid};"));
+
+ var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
+ publishCommand
+ .Execute($"/p:RuntimeIdentifier={unsupportedTargetRid}")
+ .Should().Fail()
+ .And.HaveStdOutContaining("error NETSDK1203:");
+ }
+ }
+
+ [RequiresMSBuildVersionTheory("17.0.0.32901")]
+ [InlineData(ToolsetInfo.CurrentTargetFramework)]
+ public void NativeAot_hw_fails_with_unsupported_host_rid(string targetFramework)
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.OSArchitecture == System.Runtime.InteropServices.Architecture.X64)
+ {
+ var projectName = "HelloWorldUnsupportedHostRid";
+ var supportedTargetRid = "linux-arm64";
+
+ var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true);
+ testProject.AdditionalProperties["PublishAot"] = "true";
+
+ var testAsset = _testAssetsManager.CreateTestProject(testProject)
+ .WithProjectChanges(project => OverrideKnownILCompilerPackRuntimeIdentifiers(project, $"{supportedTargetRid};"));
+
+ var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
+ publishCommand
+ .Execute($"/p:RuntimeIdentifier={supportedTargetRid}")
+ .Should().Fail()
+ .And.HaveStdOutContaining("error NETSDK1204:");
+ }
+ }
+
+ private void OverrideKnownILCompilerPackRuntimeIdentifiers(XDocument project, string runtimeIdentifiers)
+ {
+ var ns = project.Root.Name.Namespace;
+ project.Root.Add(new XElement(ns + "ItemGroup",
+ new XElement(ns + "KnownILCompilerPack",
+ new XAttribute("Update", "@(KnownILCompilerPack)"),
+ new XElement(ns + "ILCompilerRuntimeIdentifiers", runtimeIdentifiers))));
+ }
+
[RequiresMSBuildVersionTheory("17.0.0.32901")]
[InlineData(ToolsetInfo.CurrentTargetFramework)]
public void Only_Aot_warnings_are_produced_if_EnableAotAnalyzer_is_set(string targetFramework)