From 8a4cf9a39bf15cb3cef7288a6f8a6a72ad504b78 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Fri, 17 Jan 2025 00:08:15 +0000 Subject: [PATCH] Add error for incorrect aot publish --- src/Tasks/Common/Resources/Strings.resx | 7 +++++-- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 5 +++++ .../targets/Microsoft.NET.Publish.targets | 6 ++++++ 15 files changed, 76 insertions(+), 2 deletions(-) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 3bd60a9c395b..527418c3a435 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -977,10 +977,13 @@ You may need to build the project on another operating system or architecture, o NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. {StrBegins="NETSDK1223: "} - NETSDK1224: ASP.NET Core framework assets are not supported for the target framework. {StrBegins="NETSDK1224: "} - + + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index fda8d37a56e1..dab129a08c52 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: Aktuální sada .NET SDK nepodporuje .NET Framework bez použití výchozích nastavení .NET SDK. Pravděpodobně došlo k neshodě mezi vlastnostmi CLRSupport projektu C++/CLI a TargetFramework. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: Cílení na .NET 9.0 nebo vyšší se v sadě Visual Studio 2022 17.11 nepodporuje. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 6961622fd6ba..9e39c2d5bd3e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: Das aktuelle .NET SDK unterstützt das .NET Framework nur, wenn .NET SDK-Standardwerte verwendet werden. Wahrscheinlich liegt ein Konflikt zwischen der CLRSupport-Eigenschaft des C++-/CLI-Projekts und TargetFramework vor. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: Die Ausrichtung auf .NET 9.0 oder höher in Visual Studio 2022 17.11 wird nicht unterstützt. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 45143292fc41..ea92a565fb71 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: El SDK de .NET actual no admite .NET Framework sin usar los valores predeterminados de dicho SDK. Posiblemente se deba a la falta de coincidencia entre la propiedad CLRSupport del proyecto de C++/CLI y TargetFramework. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: no se admite el destino de .NET 9.0 o posterior en Visual Studio 2022 17.11. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 0d02fc82625e..2ad426ab793a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: Le SDK .NET actuel ne prend pas en charge le .NET Framework avec des valeurs du SDK .NET autres que celles par défaut. Cela est probablement dû à une incompatibilité entre la propriété CLRSupport du projet C++/CLI et TargetFramework. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: Le ciblage de .NET 9.0 ou version ultérieure dans Visual Studio 2022 17.11 n’est pas pris en charge. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index d28e78aacd2c..1319141e2c98 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: l'istanza corrente di .NET SDK non supporta .NET Framework senza usare le impostazioni predefinite di .NET SDK. Il problema dipende probabilmente da una mancata corrispondenza tra la proprietà CLRSupport del progetto C++/CLI e TargetFramework. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: la destinazione .NET 9.0 o versione successiva in Visual Studio 2022 17.11 non è supportata. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 80dce12a1fb7..2098ed8a25df 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: 現在の .NET SDK では、.NET SDK の既定値を使用せずに .NET Framework をサポートすることはできません。これは、C++/CLI プロジェクトの CLRSupport プロパティと TargetFramework の間の不一致が原因と考えられます。 {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: Visual Studio 2022 17.11 では .NET 9.0 以上をターゲットにすることはできません。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index f5c0e0c0fabb..81883f27da98 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: 현재 .NET SDK는 .NET SDK 기본값을 사용하지 않는 .NET Framework를 지원하지 않습니다. C++/CLI 프로젝트 CLRSupport 속성과 TargetFramework 사이의 불일치 때문일 수 있습니다. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: Visual Studio 2022 17.11에서 .NET 9.0 이상을 대상으로 지정하는 것은 지원되지 않습니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 610c88dc27be..60213f327eba 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: Bieżący zestaw .NET SDK nie obsługuje programu .NET Framework bez użycia wartości domyślnych zestawu .NET SDK. Prawdopodobna przyczyna to niezgodność między właściwością CLRSupport projektu C++/CLI i elementu TargetFramework. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: platforma docelowa .NET 9.0 lub nowsza w programie Visual Studio 2022 17.11 nie jest obsługiwana. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 3800d3318f43..f2f9ab663c41 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: o SDK do .NET atual não dá suporte ao .NET Framework sem o uso de Padrões do SDK do .NET. O motivo é provavelmente uma incompatibilidade entre a propriedade CLRSupport do projeto C++/CLI e a TargetFramework. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: não há suporte para o direcionamento do .NET 9.0 ou superior no Visual Studio 2022 17.11. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index ccb1f5be5440..8991f7c09817 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: The current .NET SDK does not support .NET Framework without using .NET SDK Defaults. It is likely due to a mismatch between C++/CLI project CLRSupport property and TargetFramework. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: Нацеливание на .NET 9.0 или более поздней версии в Visual Studio 2022 17.11 не поддерживается. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 03d10ce034cd..5dd830aee234 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: Geçerli .NET SDK, .NET SDK Varsayılanlarını kullanmadan .NET Framework'ü desteklemiyor. C++/CLI projesi CLRSupport özelliği ve TargetFramework arasındaki uyuşmazlık bu duruma neden olabilir. {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: Visual Studio 2022 17.11'de .NET 9.0 veya daha üst sürümünü hedefleme desteklenmiyor. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 1c839c9546b4..2fd1f72f629e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: 未使用 .NET SDK 默认设置的情况下,当前 .NET SDK 不支持 .NET Framework。很可能是因为 C++/CLI 项目的 CLRSupport 属性和 TargetFramework 之间存在不匹配情况。 {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: 不支持在 Visual Studio 2022 17.11 中以 .NET 9.0 或更高版本为目标。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index afe51f9cdf17..9085e387657e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -646,6 +646,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1115: 目前的 .NET SDK 不支援在不使用 .NET SDK 預設的情形下使用 .NET Framework。這可能是因為 C++/CLI 專案 CLRSupport 屬性與 TargetFramework 不相符所致。 {StrBegins="NETSDK1115: "} + + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish. + {StrBegins="NETSDK1225: "} + NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported. NETSDK1223: 不支援在 Visual Studio 2022 17.11 中以 .NET 9.0 或更高版本為目標。 diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets index 4166601d326a..6c484d0c4c16 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets @@ -219,6 +219,12 @@ Copyright (c) .NET Foundation. All rights reserved. ResourceName="SolutionProjectConfigurationsConflict" FormatArguments="PublishRelease;$(ProjectName)"/> + + $(PublishDir)\