From 7570bfc2dda16ff9a37fea0cc8ad68cbc1b3da8c Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Tue, 2 Jul 2024 13:16:50 +0200 Subject: [PATCH 1/9] Use PackageDownload in torn builds --- eng/Publishing.props | 13 ------ sdk.sln | 7 +++ ...Microsoft.Net.Sdk.Compilers.Toolset.csproj | 16 +++++++ src/Tasks/Common/Resources/Strings.resx | 4 -- 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 --- .../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 --- .../Common/Resources/xlf/Strings.zh-Hans.xlf | 5 --- .../Common/Resources/xlf/Strings.zh-Hant.xlf | 5 --- .../GivenThatWeHaveErrorCodes.cs | 3 +- .../targets/Microsoft.NET.Sdk.targets | 29 +++++++------ .../GivenThatWeWantToUseFrameworkRoslyn.cs | 43 +++++++------------ .../BuildTestPackages.targets | 5 +++ 21 files changed, 61 insertions(+), 124 deletions(-) create mode 100644 src/Microsoft.Net.Sdk.Compilers.Toolset/Microsoft.Net.Sdk.Compilers.Toolset.csproj diff --git a/eng/Publishing.props b/eng/Publishing.props index 8610a87a8b79..bf36813186c0 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -88,19 +88,6 @@ - - - $(PublishDependsOnTargets);_ResolvePublishRoslynNuGetPackages - - - - - - - - - diff --git a/sdk.sln b/sdk.sln index 2ecde6639962..ec26fdf08125 100644 --- a/sdk.sln +++ b/sdk.sln @@ -509,6 +509,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.WebTools.AspireSe EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.WebTools.AspireService", "src\BuiltInTools\AspireService\Microsoft.WebTools.AspireService.shproj", "{94C8526E-DCC2-442F-9868-3DD0BA2688BE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Net.Sdk.Compilers.Toolset", "src\Microsoft.Net.Sdk.Compilers.Toolset\Microsoft.Net.Sdk.Compilers.Toolset.csproj", "{FA579C03-2EB4-4D47-88EE-BFF339E96FAF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -971,6 +973,10 @@ Global {19014C60-F87C-4CC7-AC0F-C41B6126EBCE}.Debug|Any CPU.Build.0 = Debug|Any CPU {19014C60-F87C-4CC7-AC0F-C41B6126EBCE}.Release|Any CPU.ActiveCfg = Release|Any CPU {19014C60-F87C-4CC7-AC0F-C41B6126EBCE}.Release|Any CPU.Build.0 = Release|Any CPU + {FA579C03-2EB4-4D47-88EE-BFF339E96FAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA579C03-2EB4-4D47-88EE-BFF339E96FAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA579C03-2EB4-4D47-88EE-BFF339E96FAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA579C03-2EB4-4D47-88EE-BFF339E96FAF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1150,6 +1156,7 @@ Global {149E3D40-8115-4965-9305-5A1ADBF04899} = {580D1AE7-AA8F-4912-8B76-105594E00B3B} {19014C60-F87C-4CC7-AC0F-C41B6126EBCE} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} {94C8526E-DCC2-442F-9868-3DD0BA2688BE} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} + {FA579C03-2EB4-4D47-88EE-BFF339E96FAF} = {22AB674F-ED91-4FBC-BFEE-8A1E82F9F05E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FB8F26CE-4DE6-433F-B32A-79183020BBD6} diff --git a/src/Microsoft.Net.Sdk.Compilers.Toolset/Microsoft.Net.Sdk.Compilers.Toolset.csproj b/src/Microsoft.Net.Sdk.Compilers.Toolset/Microsoft.Net.Sdk.Compilers.Toolset.csproj new file mode 100644 index 000000000000..f0f71d6e460f --- /dev/null +++ b/src/Microsoft.Net.Sdk.Compilers.Toolset/Microsoft.Net.Sdk.Compilers.Toolset.csproj @@ -0,0 +1,16 @@ + + + + $(SdkTargetFramework) + Transport package for Microsoft.Net.Compilers.Toolset.Framework assemblies. For internal use only. + true + false + true + + + + + + + + diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index ec7e8b49975c..9f3cb989090c 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -905,10 +905,6 @@ You may need to build the project on another operating system or architecture, o NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'. {StrBegin="NETSDK1204: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1206: Found version-specific or distribution-specific runtime identifier(s): {0}. Affected libraries: {1}. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details. {StrBegin="NETSDK1206: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 1f7a025c054a..2a07a177fc98 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -112,11 +112,6 @@ NETSDK1001: Je potřeba zadat alespoň jednu možnou cílovou architekturu. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: Balíček Microsoft.Net.Compilers.Toolset.Framework by neměl být nastaven přímo. Pokud ho potřebujete, nastavte vlastnost BuildWithNetFrameworkHostedCompiler na hodnotu true. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Nelze najít hostitele aplikace pro {0}. {0} může být neplatný identifikátor modulu runtime (RID). Další informace o identifikátoru RID najdete na adrese https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 065cdba1021e..8ebc21b3ce9a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -112,11 +112,6 @@ NETSDK1001: Geben Sie mindestens ein mögliches Zielframework an. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: Das Microsoft.Net.Compilers.Toolset.Framework-Paket sollte nicht direkt festgelegt werden. Legen Sie stattdessen bei Bedarf die Eigenschaft "BuildWithNetFrameworkHostedCompiler" auf "true" fest. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Der App-Host für "{0}" wurde nicht gefunden. "{0}" könnte ein ungültiger Runtimebezeichner (RID) sein. Weitere Informationen zum RID finden Sie unter https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index bd07be0df5d0..b32ecb5b130e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -112,11 +112,6 @@ NETSDK1001: Debe especificarse al menos una plataforma de destino posible. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: El paquete Microsoft.Net.Compilers.Toolset.Framework no debe establecerse directamente. Establezca la propiedad "BuildWithNetFrameworkHostedCompiler" en "true" en su lugar si la necesita. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: No se encuentra el host de la aplicación {0}. {0} puede ser un identificador de tiempo de ejecución no válido. Para obtener más información al respecto, consulte https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 320b74a1ba2c..1f8c4da17a14 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -112,11 +112,6 @@ NETSDK1001: Vous devez spécifier au moins un framework cible. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: le package Microsoft.Net.Compilers.Toolset.Framework ne doit pas être défini directement. Définissez la propriété ’BuildWithNetFrameworkHostedCompiler’ sur « true » à la place si vous en avez besoin. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: hôte d'application introuvable pour {0}. {0} est peut-être un RID (identificateur de runtime) non valide. Pour plus d'informations sur les RID, consultez https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 4d7e24ab52a0..a20f7089f34e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -112,11 +112,6 @@ NETSDK1001: è necessario specificare almeno un framework di destinazione possibile. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: il pacchetto Microsoft.Net.Compilers.Toolset.Framework non deve essere impostato direttamente. Se necessario, impostare la proprietà 'BuildWithNetFrameworkHostedCompiler' su 'true'. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: non è possibile trovare l'host delle app per {0}. {0} potrebbe essere un identificatore di runtime (RID) non valido. Per altre informazioni sul RID, vedere https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index cfa4bd7615ee..4c1be86c889b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -112,11 +112,6 @@ NETSDK1001: 可能性のあるターゲット フレームワークを少なくとも 1 つ指定する必要があります。 {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: Microsoft.Net.Compilers.Toolset.Framework パッケージを直接設定することは望ましくありません。この方法ではなく、必要に応じてプロパティ 'BuildWithNetFrameworkHostedCompiler' を 'true' に設定してください。 - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: {0} のアプリ ホストが見つかりません。{0} は無効なランタイム識別子 (RID) である可能性があります。RID の詳細については、https://aka.ms/rid-catalog をご覧ください。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 6958febaaee3..ecc59e8d62ea 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -112,11 +112,6 @@ NETSDK1001: 가능한 대상 프레임워크를 하나 이상 지정해야 합니다. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: Microsoft.Net.Compilers.Toolset.Framework 패키지를 직접 설정해서는 안 됩니다. 필요한 경우 대신 'BuildWithNetFrameworkHostedCompiler' 속성을 'true'로 설정하세요. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: {0}에 대한 앱 호스트를 찾을 수 없습니다. {0}이(가) 잘못된 RID(런타임 식별자)일 수 있습니다. RID에 대한 자세한 내용은 https://aka.ms/rid-catalog를 참조하세요. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index ff164ddf2179..fec089900e9a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -112,11 +112,6 @@ NETSDK1001: Należy określić co najmniej jedną możliwą platformę docelową. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: Pakiet Microsoft.Net.Compilers.Toolset.Framework nie powinien być ustawiany bezpośrednio. Zamiast tego ustaw właściwość „BuildWithNetFrameworkHostedCompiler” na wartość „prawda”, jeśli jest to potrzebne. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Nie można odnaleźć hosta aplikacji dla elementu {0}. {0} może być nieprawidłowym identyfikatorem środowiska uruchomieniowego. Aby uzyskać więcej informacji na temat identyfikatora środowiska uruchomieniowego, zobacz https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index b7959740af42..039f7c1b3270 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -112,11 +112,6 @@ NETSDK1001: É necessário especificar pelo menos uma estrutura de destino possível. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: o pacote Microsoft.Net.Compilers.Toolset.Framework não deve ser definido diretamente. Defina a propriedade 'BuildWithNetFrameworkHostedCompiler' como 'true' se precisar. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Não é possível encontrar o host do aplicativo para {0}. {0} poderia ser um RID (identificador de runtime inválido). Para obter mais informações sobre RID, confira https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index a6803639ec6d..70cf58c851e1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -112,11 +112,6 @@ NETSDK1001: необходимо указать хотя бы одну целевую платформу. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: пакет Microsoft.Net.Compilers.Toolset.Framework нельзя задать напрямую. Присвойте свойству "BuildWithNetFrameworkHostedCompiler" значение "true", если вам нужен этот пакет. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: не удалось найти узел приложения для {0}. Возможно, {0} является недопустимым идентификатором среды выполнения (RID). Дополнительные сведения о RID: https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 7434a3ea6292..c8e2a6324f4a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -112,11 +112,6 @@ NETSDK1001: En az bir olası hedef çerçeve belirtilmelidir. {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: Microsoft.Net.Compilers.Toolset.Framework paketi doğrudan ayarlanamaz. Gerekirse bunun yerine, 'BuildWithNetFrameworkHostedCompiler' özelliğini 'true' olarak ayarlayın. - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: {0} için uygulama konağı bulunamıyor. {0} geçersiz bir çalışma zamanı tanımlayıcısı (RID) olabilir. RID hakkında daha fazla bilgi için bkz. https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index a62821607d3c..6726e150394c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -112,11 +112,6 @@ NETSDK1001: 必须指定至少一个可能的目标框架。 {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: 不应直接设置 Microsoft.Net.Compilers.Toolset.Framework 包。如果需要,请将属性 "BuildWithNetFrameworkHostedCompiler" 设置为 "true"。 - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: 无法找到 {0} 的应用主机。{0} 可能是无效的运行时标识符(RID)。有关 RID 的详细信息,请参阅 https://aka.ms/rid-catalog。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 386fbb4ce3a9..aaa310931ffc 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -112,11 +112,6 @@ NETSDK1001: 至少必須指定一個可能的目標架構。 {StrBegin="NETSDK1001: "} - - NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. - NETSDK1205: 不應直接設定 Microsoft.Net.Compilers.Toolset.Framework 套件。而是在您需要時,將屬性 'BuildWithNetFrameworkHostedCompiler' 設為 'true'。 - {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} - NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: 找不到 {0} 的應用程式主機。{0} 可能是無效的執行階段識別碼 (RID)。如需有關 RID 的詳細資訊,請參閱 https://aka.ms/rid-catalog。 diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs index 5887e00532bd..8f28ffa99ef2 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs @@ -35,7 +35,8 @@ public class GivenThatWeHaveErrorCodes 1182, 1183, 1190, - 1192 + 1192, + 1205, // NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. }; //ILLink lives in other repos and violated the _info requirement for no error code diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index 958f1d62f075..24f01f86fcf9 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -220,24 +220,25 @@ Copyright (c) .NET Foundation. All rights reserved. - + + + true + - - + + $(NuGetPackageRoot)\Microsoft.Net.Sdk.Compilers.Toolset\$(NETCoreSdkVersion) + <_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage>true + - - - true - + + + - - + + + - + This is to reduce 'tearing'/dependency mismatch, but as always users can override this behavior by disabling the hosted compiler flag. --> true diff --git a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs index c2fef71f80c2..a5256237b248 100644 --- a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs +++ b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs @@ -10,7 +10,7 @@ public GivenThatWeWantToUseFrameworkRoslyn(ITestOutputHelper log) : base(log) } [FullMSBuildOnlyFact] - public void It_restores_Microsoft_Net_Compilers_Toolset_Framework_when_requested() + public void It_downloads_Microsoft_Net_Compilers_Toolset_Framework_when_requested() { const string testProjectName = "NetCoreApp"; var project = new TestProject @@ -36,7 +36,7 @@ public void It_restores_Microsoft_Net_Compilers_Toolset_Framework_when_requested } [FullMSBuildOnlyFact] - public void It_restores_Microsoft_Net_Compilers_Toolset_Framework_when_MSBuild_is_torn() + public void It_downloads_Microsoft_Net_Compilers_Toolset_Framework_when_MSBuild_is_torn() { const string testProjectName = "NetCoreApp"; var project = new TestProject From 9e8feb3d03418e0eb61491529569cbd8a1614ae4 Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Tue, 9 Jul 2024 19:21:57 +0200 Subject: [PATCH 3/9] Lowercase NuGet package name --- .../Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index 4f8ad87deb7a..eacef2412b62 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -227,7 +227,7 @@ Copyright (c) .NET Foundation. All rights reserved. - $(NuGetPackageRoot)\Microsoft.Net.Sdk.Compilers.Toolset\$(NETCoreSdkVersion) + $(NuGetPackageRoot)\microsoft.net.sdk.compilers.toolset\$(NETCoreSdkVersion) <_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage>true From 13beb4d30ce72c2c595572e6a771357f42673d06 Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Tue, 9 Jul 2024 19:25:31 +0200 Subject: [PATCH 4/9] Re-add the warning --- src/Tasks/Common/Resources/Strings.resx | 4 ++++ 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 +++++ .../GivenThatWeHaveErrorCodes.cs | 3 +-- .../targets/Microsoft.NET.Sdk.targets | 7 +++++++ .../GivenThatWeWantToUseFrameworkRoslyn.cs | 4 ++-- 17 files changed, 79 insertions(+), 4 deletions(-) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 9f3cb989090c..ec7e8b49975c 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -905,6 +905,10 @@ You may need to build the project on another operating system or architecture, o NETSDK1204: Ahead-of-time compilation is not supported on the current platform '{0}'. {StrBegin="NETSDK1204: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1206: Found version-specific or distribution-specific runtime identifier(s): {0}. Affected libraries: {1}. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details. {StrBegin="NETSDK1206: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 2a07a177fc98..1f7a025c054a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -112,6 +112,11 @@ NETSDK1001: Je potřeba zadat alespoň jednu možnou cílovou architekturu. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: Balíček Microsoft.Net.Compilers.Toolset.Framework by neměl být nastaven přímo. Pokud ho potřebujete, nastavte vlastnost BuildWithNetFrameworkHostedCompiler na hodnotu true. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Nelze najít hostitele aplikace pro {0}. {0} může být neplatný identifikátor modulu runtime (RID). Další informace o identifikátoru RID najdete na adrese https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 8ebc21b3ce9a..065cdba1021e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -112,6 +112,11 @@ NETSDK1001: Geben Sie mindestens ein mögliches Zielframework an. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: Das Microsoft.Net.Compilers.Toolset.Framework-Paket sollte nicht direkt festgelegt werden. Legen Sie stattdessen bei Bedarf die Eigenschaft "BuildWithNetFrameworkHostedCompiler" auf "true" fest. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Der App-Host für "{0}" wurde nicht gefunden. "{0}" könnte ein ungültiger Runtimebezeichner (RID) sein. Weitere Informationen zum RID finden Sie unter https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index b32ecb5b130e..bd07be0df5d0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -112,6 +112,11 @@ NETSDK1001: Debe especificarse al menos una plataforma de destino posible. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: El paquete Microsoft.Net.Compilers.Toolset.Framework no debe establecerse directamente. Establezca la propiedad "BuildWithNetFrameworkHostedCompiler" en "true" en su lugar si la necesita. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: No se encuentra el host de la aplicación {0}. {0} puede ser un identificador de tiempo de ejecución no válido. Para obtener más información al respecto, consulte https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 1f8c4da17a14..320b74a1ba2c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -112,6 +112,11 @@ NETSDK1001: Vous devez spécifier au moins un framework cible. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: le package Microsoft.Net.Compilers.Toolset.Framework ne doit pas être défini directement. Définissez la propriété ’BuildWithNetFrameworkHostedCompiler’ sur « true » à la place si vous en avez besoin. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: hôte d'application introuvable pour {0}. {0} est peut-être un RID (identificateur de runtime) non valide. Pour plus d'informations sur les RID, consultez https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index a20f7089f34e..4d7e24ab52a0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -112,6 +112,11 @@ NETSDK1001: è necessario specificare almeno un framework di destinazione possibile. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: il pacchetto Microsoft.Net.Compilers.Toolset.Framework non deve essere impostato direttamente. Se necessario, impostare la proprietà 'BuildWithNetFrameworkHostedCompiler' su 'true'. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: non è possibile trovare l'host delle app per {0}. {0} potrebbe essere un identificatore di runtime (RID) non valido. Per altre informazioni sul RID, vedere https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 4c1be86c889b..cfa4bd7615ee 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -112,6 +112,11 @@ NETSDK1001: 可能性のあるターゲット フレームワークを少なくとも 1 つ指定する必要があります。 {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: Microsoft.Net.Compilers.Toolset.Framework パッケージを直接設定することは望ましくありません。この方法ではなく、必要に応じてプロパティ 'BuildWithNetFrameworkHostedCompiler' を 'true' に設定してください。 + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: {0} のアプリ ホストが見つかりません。{0} は無効なランタイム識別子 (RID) である可能性があります。RID の詳細については、https://aka.ms/rid-catalog をご覧ください。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index ecc59e8d62ea..6958febaaee3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -112,6 +112,11 @@ NETSDK1001: 가능한 대상 프레임워크를 하나 이상 지정해야 합니다. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: Microsoft.Net.Compilers.Toolset.Framework 패키지를 직접 설정해서는 안 됩니다. 필요한 경우 대신 'BuildWithNetFrameworkHostedCompiler' 속성을 'true'로 설정하세요. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: {0}에 대한 앱 호스트를 찾을 수 없습니다. {0}이(가) 잘못된 RID(런타임 식별자)일 수 있습니다. RID에 대한 자세한 내용은 https://aka.ms/rid-catalog를 참조하세요. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index fec089900e9a..ff164ddf2179 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -112,6 +112,11 @@ NETSDK1001: Należy określić co najmniej jedną możliwą platformę docelową. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: Pakiet Microsoft.Net.Compilers.Toolset.Framework nie powinien być ustawiany bezpośrednio. Zamiast tego ustaw właściwość „BuildWithNetFrameworkHostedCompiler” na wartość „prawda”, jeśli jest to potrzebne. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Nie można odnaleźć hosta aplikacji dla elementu {0}. {0} może być nieprawidłowym identyfikatorem środowiska uruchomieniowego. Aby uzyskać więcej informacji na temat identyfikatora środowiska uruchomieniowego, zobacz https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 039f7c1b3270..b7959740af42 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -112,6 +112,11 @@ NETSDK1001: É necessário especificar pelo menos uma estrutura de destino possível. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: o pacote Microsoft.Net.Compilers.Toolset.Framework não deve ser definido diretamente. Defina a propriedade 'BuildWithNetFrameworkHostedCompiler' como 'true' se precisar. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: Não é possível encontrar o host do aplicativo para {0}. {0} poderia ser um RID (identificador de runtime inválido). Para obter mais informações sobre RID, confira https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 70cf58c851e1..a6803639ec6d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -112,6 +112,11 @@ NETSDK1001: необходимо указать хотя бы одну целевую платформу. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: пакет Microsoft.Net.Compilers.Toolset.Framework нельзя задать напрямую. Присвойте свойству "BuildWithNetFrameworkHostedCompiler" значение "true", если вам нужен этот пакет. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: не удалось найти узел приложения для {0}. Возможно, {0} является недопустимым идентификатором среды выполнения (RID). Дополнительные сведения о RID: https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index c8e2a6324f4a..7434a3ea6292 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -112,6 +112,11 @@ NETSDK1001: En az bir olası hedef çerçeve belirtilmelidir. {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: Microsoft.Net.Compilers.Toolset.Framework paketi doğrudan ayarlanamaz. Gerekirse bunun yerine, 'BuildWithNetFrameworkHostedCompiler' özelliğini 'true' olarak ayarlayın. + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: {0} için uygulama konağı bulunamıyor. {0} geçersiz bir çalışma zamanı tanımlayıcısı (RID) olabilir. RID hakkında daha fazla bilgi için bkz. https://aka.ms/rid-catalog. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 6726e150394c..a62821607d3c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -112,6 +112,11 @@ NETSDK1001: 必须指定至少一个可能的目标框架。 {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: 不应直接设置 Microsoft.Net.Compilers.Toolset.Framework 包。如果需要,请将属性 "BuildWithNetFrameworkHostedCompiler" 设置为 "true"。 + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: 无法找到 {0} 的应用主机。{0} 可能是无效的运行时标识符(RID)。有关 RID 的详细信息,请参阅 https://aka.ms/rid-catalog。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index aaa310931ffc..386fbb4ce3a9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -112,6 +112,11 @@ NETSDK1001: 至少必須指定一個可能的目標架構。 {StrBegin="NETSDK1001: "} + + NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + NETSDK1205: 不應直接設定 Microsoft.Net.Compilers.Toolset.Framework 套件。而是在您需要時,將屬性 'BuildWithNetFrameworkHostedCompiler' 設為 'true'。 + {StrBegin="NETSDK1205: "}{Locked="Microsoft.Net.Compilers.Toolset.Framework"}{Locked="BuildWithNetFrameworkHostedCompiler"} + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. NETSDK1065: 找不到 {0} 的應用程式主機。{0} 可能是無效的執行階段識別碼 (RID)。如需有關 RID 的詳細資訊,請參閱 https://aka.ms/rid-catalog。 diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs index 8f28ffa99ef2..5887e00532bd 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs @@ -35,8 +35,7 @@ public class GivenThatWeHaveErrorCodes 1182, 1183, 1190, - 1192, - 1205, // NETSDK1205: The Microsoft.Net.Compilers.Toolset.Framework package should not be set directly. Set the property 'BuildWithNetFrameworkHostedCompiler' to 'true' instead if you need it. + 1192 }; //ILLink lives in other repos and violated the _info requirement for no error code diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index eacef2412b62..e9dd7ad250e3 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -236,6 +236,13 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + diff --git a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs index a5256237b248..4c21bf6cb75a 100644 --- a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs +++ b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs @@ -63,7 +63,7 @@ public void It_downloads_Microsoft_Net_Compilers_Toolset_Framework_when_MSBuild_ } [FullMSBuildOnlyFact] - public void It_does_not_throw_a_warning_when_adding_the_PackageReference_directly() + public void It_throws_a_warning_when_adding_the_PackageReference_directly() { const string testProjectName = "NetCoreApp"; var project = new TestProject @@ -81,7 +81,7 @@ public void It_does_not_throw_a_warning_when_adding_the_PackageReference_directl testAsset.GetRestoreCommand(Log, relativePath: testProjectName); var result = restoreCommand.Execute(); result.Should().Pass(); - result.Should().NotHaveStdOutContaining("NETSDK"); + result.Should().HaveStdOutContaining("NETSDK1205"); } } } From 23cf26a711dc7d4a22a33af34bf15127061ae177 Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Tue, 9 Jul 2024 19:27:04 +0200 Subject: [PATCH 5/9] Move PackageDownload outside the target --- .../targets/Microsoft.NET.Sdk.targets | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index e9dd7ad250e3..fc00006b5367 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -235,17 +235,16 @@ Copyright (c) .NET Foundation. All rights reserved. - + + + + - - - - From 3824f411cb061896709aae8589d831c21586ef98 Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Wed, 10 Jul 2024 11:22:01 +0200 Subject: [PATCH 7/9] Extend build tests --- .../GivenThatWeWantToUseFrameworkRoslyn.cs | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs index 4c21bf6cb75a..df925336cad3 100644 --- a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs +++ b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs @@ -26,13 +26,22 @@ public void It_downloads_Microsoft_Net_Compilers_Toolset_Framework_when_requeste NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); - var customPackageDir = Path.Combine(testAsset.Path, "nuget-packages"); + var customPackagesDir = Path.Combine(testAsset.Path, "nuget-packages"); testAsset.GetRestoreCommand(Log, relativePath: testProjectName) - .WithEnvironmentVariable("NUGET_PACKAGES", customPackageDir) + .WithEnvironmentVariable("NUGET_PACKAGES", customPackagesDir) .Execute().Should().Pass(); - Assert.True(Directory.Exists(Path.Combine(customPackageDir, "microsoft.net.sdk.compilers.toolset"))); + var toolsetPackageDir = Path.Combine(customPackagesDir, "microsoft.net.sdk.compilers.toolset"); + + Assert.True(Directory.Exists(toolsetPackageDir)); + + var toolsetPackageVersion = Directory.EnumerateDirectories(toolsetPackageDir).Should().ContainSingle().Subject; + + new BuildCommand(testAsset) + .WithEnvironmentVariable("NUGET_PACKAGES", customPackagesDir) + .Execute().Should().Pass().And + .HaveStdOutContaining(Path.Combine(toolsetPackageDir, toolsetPackageVersion, "csc.exe") + " /noconfig"); } [FullMSBuildOnlyFact] @@ -53,13 +62,22 @@ public void It_downloads_Microsoft_Net_Compilers_Toolset_Framework_when_MSBuild_ NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); - var customPackageDir = Path.Combine(testAsset.Path, "nuget-packages"); + var customPackagesDir = Path.Combine(testAsset.Path, "nuget-packages"); testAsset.GetRestoreCommand(Log, relativePath: testProjectName) - .WithEnvironmentVariable("NUGET_PACKAGES", customPackageDir) + .WithEnvironmentVariable("NUGET_PACKAGES", customPackagesDir) .Execute().Should().Pass(); - Assert.True(Directory.Exists(Path.Combine(customPackageDir, "microsoft.net.sdk.compilers.toolset"))); + var toolsetPackageDir = Path.Combine(customPackagesDir, "microsoft.net.sdk.compilers.toolset"); + + Assert.True(Directory.Exists(toolsetPackageDir)); + + var toolsetPackageVersion = Directory.EnumerateDirectories(toolsetPackageDir).Should().ContainSingle().Subject; + + new BuildCommand(testAsset) + .WithEnvironmentVariable("NUGET_PACKAGES", customPackagesDir) + .Execute().Should().Pass().And + .HaveStdOutContaining(Path.Combine(toolsetPackageDir, toolsetPackageVersion, "csc.exe") + " /noconfig"); } [FullMSBuildOnlyFact] From 70bd6edb868d221c5904c7d56431b4a179fe32ef Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Wed, 10 Jul 2024 13:05:24 +0200 Subject: [PATCH 8/9] Fix warning condition --- .../Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index 9c923ec05f63..93094a6f6b0a 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -240,7 +240,7 @@ Copyright (c) .NET Foundation. All rights reserved. - + From b1840b4de0aa604079b74912586603fa70b5e24e Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Thu, 11 Jul 2024 16:55:55 +0200 Subject: [PATCH 9/9] Improve wording --- .../Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index 93094a6f6b0a..3080357076ac 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -231,7 +231,7 @@ Copyright (c) .NET Foundation. All rights reserved. <_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage>true - +