diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 3fdd6bd6ce4b..7e6e31f629cd 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -17,6 +17,7 @@ using NuGet.Common; using System.Text.Json; using System.Runtime.InteropServices; +using Microsoft.DotNet.Cli; namespace Microsoft.DotNet.Workloads.Workload.Install { @@ -138,7 +139,7 @@ public static void AdvertiseWorkloadUpdates() { try { - var backgroundUpdatesDisabled = bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE"), out var disableEnvVar) && disableEnvVar; + var backgroundUpdatesDisabled = bool.TryParse(Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_UPDATE_NOTIFY_DISABLE), out var disableEnvVar) && disableEnvVar; var adUpdatesFile = GetAdvertisingWorkloadsFilePath(CliFolderPathCalculator.DotnetHomePath); if (!backgroundUpdatesDisabled && File.Exists(adUpdatesFile)) { @@ -387,7 +388,7 @@ private bool AdManifestSentinalIsDueForUpdate() { var sentinalPath = GetAdvertisingManifestSentinalPath(); int updateIntervalHours; - if (!int.TryParse(_getEnvironmentVariable("DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS"), out updateIntervalHours)) + if (!int.TryParse(_getEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS), out updateIntervalHours)) { updateIntervalHours = 24; } @@ -438,7 +439,7 @@ private async Task NewerManifestPackageExists(ManifestId manifest) } private bool BackgroundUpdatesAreDisabled() => - bool.TryParse(_getEnvironmentVariable("DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE"), out var disableEnvVar) && disableEnvVar; + bool.TryParse(_getEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_UPDATE_NOTIFY_DISABLE), out var disableEnvVar) && disableEnvVar; private string GetAdvertisingManifestSentinalPath() => Path.Combine(_userHome, ".dotnet", ".workloadAdvertisingManifestSentinal"); diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index 566cc00191c7..b5fa2fbfb058 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Common/EnvironmentVariableNames.cs b/src/Common/EnvironmentVariableNames.cs new file mode 100644 index 000000000000..b7972b55aff7 --- /dev/null +++ b/src/Common/EnvironmentVariableNames.cs @@ -0,0 +1,13 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.DotNet.Cli +{ + static class EnvironmentVariableNames + { + public static readonly string WORKLOAD_PACK_ROOTS = "DOTNETSDK_WORKLOAD_PACK_ROOTS"; + public static readonly string WORKLOAD_MANIFEST_ROOTS = "DOTNETSDK_WORKLOAD_MANIFEST_ROOTS"; + public static readonly string WORKLOAD_UPDATE_NOTIFY_DISABLE = "DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE"; + public static readonly string WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS = "DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS"; + } +} diff --git a/src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj b/src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj index bfa57f8bfd96..9a22d5c9456e 100644 --- a/src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj +++ b/src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj @@ -49,6 +49,7 @@ + diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj index 7de319c27c0f..52571225e855 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj @@ -68,6 +68,8 @@ + + diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Microsoft.NET.Sdk.WorkloadManifestReader.csproj b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Microsoft.NET.Sdk.WorkloadManifestReader.csproj index e4b6e59d46a8..3998497c7d7c 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Microsoft.NET.Sdk.WorkloadManifestReader.csproj +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Microsoft.NET.Sdk.WorkloadManifestReader.csproj @@ -18,6 +18,7 @@ + diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs index cb657650f3dd..09dcd9324cdc 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using Microsoft.DotNet.Cli; namespace Microsoft.NET.Sdk.WorkloadManifestReader { @@ -53,7 +54,7 @@ static int Last2DigitsTo0(int versionBuild) var manifestDirectory = Path.Combine(_sdkRootPath, "sdk-manifests", _sdkVersionBand); - var manifestDirectoryEnvironmentVariable = getEnvironmentVariable("DOTNETSDK_WORKLOAD_MANIFEST_ROOTS"); + var manifestDirectoryEnvironmentVariable = getEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_MANIFEST_ROOTS); if (manifestDirectoryEnvironmentVariable != null) { // Append the SDK version band to each manifest root specified via the environment variable. This allows the same diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs index 1a36d65b5a1f..7a2f6b916435 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; - +using Microsoft.DotNet.Cli; using Microsoft.NET.Sdk.Localization; using FXVersion = Microsoft.DotNet.MSBuildSdkResolver.FXVersion; @@ -34,7 +34,7 @@ public static WorkloadResolver Create(IWorkloadManifestProvider manifestProvider File.ReadAllLines(runtimeIdentifierChainPath).Where(l => !string.IsNullOrEmpty(l)).ToArray() : new string[] { }; - var packRootEnvironmentVariable = Environment.GetEnvironmentVariable("DOTNETSDK_WORKLOAD_PACK_ROOTS"); + var packRootEnvironmentVariable = Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS); string[] dotnetRootPaths; if (!string.IsNullOrEmpty(packRootEnvironmentVariable)) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 6355d762c5c0..d9617f9a9387 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -828,4 +828,8 @@ You may need to build the project on another operating system or architecture, o NETSDK1180: Specified runtime identifier '{0}'' implies Windows 7 compatibility. Single File publishing is not compatible with Windows 7. {StrBegin="NETSDK1180: "} + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 0fc8a328fce3..78a78a08adee 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -264,6 +264,11 @@ Vítěze nebylo možné určit, protože {0} není sestavení. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: Ze souboru {0} nebylo možné načíst manifest platformy, protože neexistoval. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index cd2051ee8965..25b83cad82cb 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -264,6 +264,11 @@ Der Gewinner konnte nicht bestimmt werden, weil es sich bei "{0}" nicht um eine Assembly handelt. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: PlatformManifest konnte nicht von "{0}" geladen werden, weil es nicht vorhanden ist. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index fe46f5fb0bfa..cabadb056095 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -264,6 +264,11 @@ Could not determine a winner because '{0}' is not an assembly. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 795a458bfd01..9029412bb5ab 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -264,6 +264,11 @@ Impossible de déterminer un gagnant, car '{0}' n'est pas un assembly. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: Impossible de charger PlatformManifest à partir de '{0}', car il n'existe pas. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index e83ccfb012aa..9a6974abacfa 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -264,6 +264,11 @@ Non è stato possibile determinare la versione da usare perché '{0}' non è un assembly. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: non è stato possibile caricare PlatformManifest da '{0}' perché non esiste. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 5cd434b2bb3a..7d5829078efd 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -264,6 +264,11 @@ '{0}' がアセンブリでないため勝者を判別できませんでした。 + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: 存在しなかったため、'{0}' から PlatformManifest を読み込めませんでした。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf~RF1ea49cc.TMP b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf~RF1ea49cc.TMP new file mode 100644 index 000000000000..5cd434b2bb3a --- /dev/null +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf~RF1ea49cc.TMP @@ -0,0 +1,914 @@ + + + + + + NETSDK1076: AddResource can only be used with integer resource types. + NETSDK1076: AddResource は、整数のリソースの種類でのみ使用できます。 + {StrBegin="NETSDK1076: "} + + + NETSDK1070: The application configuration file must have root configuration element. + NETSDK1070: アプリケーション構成ファイルには、ルート構成要素が必要です。 + {StrBegin="NETSDK1070: "} + + + NETSDK1113: Failed to create apphost (attempt {0} out of {1}): {2} + NETSDK1113: apphost を作成できませんでした ({1} 回中 {0} 回目の試行): {2} + {StrBegin="NETSDK1113: "} + + + NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows (excluding Nano Server). + NETSDK1074: リソースの追加ではビルドが Windows 上で実行される必要があるため、アプリケーション ホストの実行可能ファイルはカスタマイズされません (Nano Server を除く)。 + {StrBegin="NETSDK1074: "} + + + NETSDK1029: Unable to use '{0}' as application host executable as it does not contain the expected placeholder byte sequence '{1}' that would mark where the application name would be written. + NETSDK1029: '{0}' は、本来アプリケーション名が書き込まれる場所を示す、必要なプレースホルダー バイト シーケンス '{1}' が含まれていないため、実行可能アプリケーション ホストとして使用できません。 + {StrBegin="NETSDK1029: "} + + + NETSDK1078: Unable to use '{0}' as application host executable because it's not a Windows PE file. + NETSDK1078: Windows PE ファイルではないため、'{0}' をアプリケーション ホストの実行可能ファイルとして使用することはできません。 + {StrBegin="NETSDK1078: "} + + + NETSDK1072: Unable to use '{0}' as application host executable because it's not a Windows executable for the CUI (Console) subsystem. + NETSDK1072: CUI (コンソール) サブシステム用の Windows 実行可能ファイルではないため、'{0}' をアプリケーション ホストの実行可能ファイルとして使用することはできません。 + {StrBegin="NETSDK1072: "} + + + NETSDK1177: Failed to sign apphost with error code {1}: {0} + NETSDK1177: Failed to sign apphost with error code {1}: {0} + {StrBegin="NETSDK1177: "} + + + NETSDK1079: The Microsoft.AspNetCore.All package is not supported when targeting .NET Core 3.0 or higher. A FrameworkReference to Microsoft.AspNetCore.App should be used instead, and will be implicitly included by Microsoft.NET.Sdk.Web. + NETSDK1079: .NET Core 3.0 以上がターゲットの場合、Microsoft.AspNetCore.All パッケージはサポートされていません。代わりに Microsoft.AspNetCore.App への FrameworkReference を使用する必要があり、これは Microsoft.NET.Sdk.Web によって暗黙的に含まれます。 + {StrBegin="NETSDK1079: "} + + + NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically. Otherwise, the PackageReference should be replaced with a FrameworkReference. + NETSDK1080: .NET Core 3.0 以上がターゲットの場合、Microsoft.AspNetCore.App への PackageReference は必要ありません。Microsoft.NET.Sdk.Web が使用される場合、この共有フレームワークは自動的に参照されます。そうでない場合、PackageReference を FrameworkReference で置き換える必要があります。 + {StrBegin="NETSDK1080: "} + + + NETSDK1017: Asset preprocessor must be configured before assets are processed. + NETSDK1017: 資産を処理する前に、資産プリプロセッサを構成する必要があります。 + {StrBegin="NETSDK1017: "} + + + NETSDK1047: Assets file '{0}' doesn't have a target for '{1}'. Ensure that restore has run and that you have included '{2}' in the TargetFrameworks for your project. You may also need to include '{3}' in your project's RuntimeIdentifiers. + NETSDK1047: 資産ファイル '{0}' に '{1}' のターゲットがありません。復元が実行されたこと、および '{2}' がプロジェクトの TargetFrameworks に含まれていることを確認してください。プロジェクトの RuntimeIdentifiers に '{3}' を組み込む必要が生じる可能性もあります。 + {StrBegin="NETSDK1047: "} + + + NETSDK1005: Assets file '{0}' doesn't have a target for '{1}'. Ensure that restore has run and that you have included '{2}' in the TargetFrameworks for your project. + NETSDK1005: 資産ファイル '{0}' に '{1}' のターゲットがありません。復元が実行されたことと、'{2}' がプロジェクトの TargetFrameworks に含まれていることを確認してください。 + {StrBegin="NETSDK1005: "} + + + NETSDK1004: Assets file '{0}' not found. Run a NuGet package restore to generate this file. + NETSDK1004: 資産ファイル '{0}' が見つかりません。NuGet パッケージの復元を実行して、このファイルを生成してください。 + {StrBegin="NETSDK1004: "} + + + NETSDK1063: The path to the project assets file was not set. Run a NuGet package restore to generate this file. + NETSDK1063: プロジェクト資産ファイルのパスが設定されていません。NuGet パッケージの復元を実行して、このファイルを生成してください。 + {StrBegin="NETSDK1063: "} + + + NETSDK1006: Assets file path '{0}' is not rooted. Only full paths are supported. + NETSDK1006: 資産ファイル パス '{0}' にルートが指定されていません。完全パスのみがサポートされます。 + {StrBegin="NETSDK1006: "} + + + NETSDK1001: At least one possible target framework must be specified. + NETSDK1001: 可能性のあるターゲット フレームワークを少なくとも 1 つ指定する必要があります。 + {StrBegin="NETSDK1001: "} + + + NETSDK1092: The CLSIDMap cannot be embedded on the COM host because adding resources requires that the build be performed on Windows (excluding Nano Server). + NETSDK1092: リソースの追加にはビルドが Windows 上で実行されることが要求されるため、CLSIDMap を COM ホストに埋め込むことはできません (Nano Server を除く)。 + {StrBegin="NETSDK1092: "} + + + 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 をご覧ください。 + {StrBegin="NETSDK1065: "} + + + NETSDK1091: Unable to find a .NET Core COM host. The .NET Core COM host is only available on .NET Core 3.0 or higher when targeting Windows. + NETSDK1091: .NET Core COM ホストが見つかりません。Windows がターゲットの場合、.NET Core COM ホストを利用できるのは .NET Core 3.0 以上の場合のみです。 + {StrBegin="NETSDK1091: "} + + + NETSDK1114: Unable to find a .NET Core IJW host. The .NET Core IJW host is only available on .NET Core 3.1 or higher when targeting Windows. + NETSDK1114: .NET Core IJW ホストが見つかりません。Windows がターゲットの場合、.NET Core IJW ホストを利用できるのは .NET Core 3.1 以上の場合のみです。 + {StrBegin="NETSDK1114: "} + + + NETSDK1007: Cannot find project info for '{0}'. This can indicate a missing project reference. + NETSDK1007: '{0}' のプロジェクト情報が見つかりません。これは、プロジェクト参照がないことを示している可能性があります。 + {StrBegin="NETSDK1007: "} + + + NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. + NETSDK1032: RuntimeIdentifier プラットフォーム '{0}' と PlatformTarget '{1}' には互換性が必要です。 + {StrBegin="NETSDK1032: "} + + + NETSDK1031: It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set SelfContained to false. + NETSDK1031: RuntimeIdentifier を指定せずに自己完結型アプリケーションをビルドおよび公開することはサポートされていません。RuntimeIdentifier を指定するか SelfContained を false に設定する必要があります。 + {StrBegin="NETSDK1031: "} + + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: RuntimeIdentifier を指定せずにアプリケーションを単一ファイルに公開することはサポートされていません。RuntimeIdentifier を指定するか、PublishSingleFile を false に設定する必要があります。 + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. You must either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: 単一ファイルに公開されたアプリケーションでは、アプリケーション ホストを使用する必要があります。PublishSingleFile を false に設定するか、UseAppHost を true に設定する必要があります。 + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: 単一ファイルへの公開は実行可能アプリケーションに対してのみサポートされています。 + {StrBegin="NETSDK1099: "} + + + NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. + NETSDK1134: 特定の RuntimeIdentifier を使用したソリューションのビルドはサポートされていません。単一の RID に対して発行する場合は、個々のプロジェクト レベルで RID を指定してください。 + {StrBegin="NETSDK1134: "} + + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} を TargetPlatformVersion {1} より大きくすることはできません。 + {StrBegin="NETSDK1135: "} + + + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. + NETSDK1143: 単一のファイル バンドルにすべてのコンテンツを含めると、ネイティブ ライブラリも含まれます。IncludeAllContentForSelfExtract が true の場合、IncludeNativeLibrariesForSelfExtract を false にすることはできません。 + {StrBegin="NETSDK1143: "} + + + NETSDK1142: Including symbols in a single file bundle is not supported when publishing for .NET5 or higher. + NETSDK1142: .NET5 以降に対してパブリッシュする場合、単一のファイル バンドルにシンボルを含めることはサポートされていません。 + {StrBegin="NETSDK1142: "} + + + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. + NETSDK1013: TargetFramework 値 '{0}' が認識されませんでした。つづりが間違っている可能性があります。間違っていない場合は、TargetFrameworkIdentifier または TargetFrameworkVersion プロパティ (あるいはその両方) を明示的に指定する必要があります。 + {StrBegin="NETSDK1013: "} + + + NETSDK1067: Self-contained applications are required to use the application host. Either set SelfContained to false or set UseAppHost to true. + NETSDK1067: アプリケーション ホストを使用するには、自己完結型のアプリケーションが必要です。SelfContained を false に設定するか、UseAppHost を true に設定してください。 + {StrBegin="NETSDK1067: "} + + + NETSDK1125: Publishing to a single-file is only supported for netcoreapp target. + NETSDK1125: 1 つのファイルへの発行は netcoreapp ターゲットでのみサポートされています。 + {StrBegin="NETSDK1125: "} + + + Choosing '{0}' because AssemblyVersion '{1}' is greater than '{2}'. + AssemblyVersion '{1}' が '{2}' より大きいため、'{0}' を選択しています。 + + + + Choosing '{0}' arbitrarily as both items are copy-local and have equal file and assembly versions. + 両方の項目がローカル コピーであり、ファイルとアセンブリのバージョンが等しいため、'{0}' を任意に選択しています。 + + + + Choosing '{0}' because file version '{1}' is greater than '{2}'. + ファイルのバージョン '{1}' が '{2}' より大きいため、'{0}' を選択しています。 + + + + Choosing '{0}' because it is a platform item. + '{0}' はプラットフォーム項目であるため、これを選択しています。 + + + + Choosing '{0}' because it comes from a package that is preferred. + '{0}' は優先されるパッケージからのものであるため、これを選択しています。 + + + + NETSDK1089: The '{0}' and '{1}' types have the same CLSID '{2}' set in their GuidAttribute. Each COMVisible class needs to have a distinct guid for their CLSID. + NETSDK1089: 型 '{0}' および '{1}' では、GuidAttribute で同じ CLSID '{2}' が設定されています。各 COMVisible クラスでは、CLSID に異なる guid が設定されている必要があります。 + {StrBegin="NETSDK1089: "} +{0} - The first type with the conflicting guid. +{1} - The second type with the conflicting guid. +{2} - The guid the two types have. + + + NETSDK1088: The COMVisible class '{0}' must have a GuidAttribute with the CLSID of the class to be made visible to COM in .NET Core. + NETSDK1088: COMVisible クラス '{0}' を .NET Core 内の COM に対して参照可能にするには、クラスの CLSID を持つ GuidAttribute を含める必要があります。 + {StrBegin="NETSDK1088: "} +{0} - The ComVisible class that doesn't have a GuidAttribute on it. + + + NETSDK1090: The supplied assembly '{0}' is not valid. Cannot generate a CLSIDMap from it. + NETSDK1090: 指定されたアセンブリ '{0}' が無効です。CLSIDMap を生成できません。 + {StrBegin="NETSDK1090: "} +{0} - The path to the invalid assembly. + + + NETSDK1167: Compression in a single file bundle is only supported when publishing for .NET6 or higher. + NETSDK1167: Compression in a single file bundle is only supported when publishing for .NET6 or higher. + {StrBegin="NETSDK1167: "} + + + NETSDK1174: Compression in a single file bundle is only supported when publishing a self-contained application. + NETSDK1174: Compression in a single file bundle is only supported when publishing a self-contained application. + {StrBegin="NETSDK1174: "} + + + NETSDK1133: There was conflicting information about runtime packs available for {0}: +{1} + NETSDK1133: {0} で使用可能なランタイム パックの情報が競合しています: +{1} + {StrBegin="NETSDK1133: "} + + + NETSDK1014: Content item for '{0}' sets '{1}', but does not provide '{2}' or '{3}'. + NETSDK1014: '{0}' のコンテンツ項目で '{1}' が設定されていますが、'{2}' または '{3}' は指定されていません。 + {StrBegin="NETSDK1014: "} + + + NETSDK1010: The '{0}' task must be given a value for parameter '{1}' in order to consume preprocessed content. + NETSDK1010: 前処理されたコンテンツを使用するためには、パラメーター '{1}' の値を '{0}' タスクに指定する必要があります。 + {StrBegin="NETSDK1010: "} + + + Could not determine winner because '{0}' does not exist. + '{0}' が存在しないため勝者を判別できませんでした。 + + + + Could not determine winner due to equal file and assembly versions. + ファイルとアセンブリのバージョンが等しいため、勝者を判別できませんでした。 + + + + Could not determine a winner because '{0}' has no file version. + '{0}' にファイルのバージョンがないため勝者を判別できませんでした。 + + + + Could not determine a winner because '{0}' is not an assembly. + '{0}' がアセンブリでないため勝者を判別できませんでした。 + + + + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. + NETSDK1042: 存在しなかったため、'{0}' から PlatformManifest を読み込めませんでした。 + {StrBegin="NETSDK1042: "} + + + NETSDK1120: C++/CLI projects targeting .NET Core require a target framework of at least 'netcoreapp3.1'. + NETSDK1120: .NET Core をターゲットとする C++/CLI プロジェクトには、少なくとも 'netcoreapp 3.1' のターゲット フレームワークが必要です。 + {StrBegin="NETSDK1120: "} + + + NETSDK1158: Required '{0}' metadata missing on Crossgen2Tool item. + NETSDK1158: Required '{0}' metadata missing on Crossgen2Tool item. + {StrBegin="NETSDK1158: "} + + + NETSDK1126: Publishing ReadyToRun using Crossgen2 is only supported for self-contained applications. + NETSDK1126: Crossgen2 を使用した ReadyToRun の公開は、自己完結型アプリケーションでのみサポートされています。 + {StrBegin="NETSDK1126: "} + + + NETSDK1155: Crossgen2Tool executable '{0}' not found. + NETSDK1155: Crossgen2Tool executable '{0}' not found. + {StrBegin="NETSDK1155: "} + + + NETSDK1154: Crossgen2Tool must be specified when UseCrossgen2 is set to true. + NETSDK1154: Crossgen2Tool must be specified when UseCrossgen2 is set to true. + {StrBegin="NETSDK1154: "} + + + NETSDK1166: Cannot emit symbols when publishing for .NET 5 with Crossgen2 using composite mode. + NETSDK1166: Cannot emit symbols when publishing for .NET 5 with Crossgen2 using composite mode. + {StrBegin="NETSDK1166: "} + + + NETSDK1160: CrossgenTool executable '{0}' not found. + NETSDK1160: CrossgenTool executable '{0}' not found. + {StrBegin="NETSDK1160: "} + + + NETSDK1153: CrossgenTool not specified in PDB compilation mode. + NETSDK1153: CrossgenTool not specified in PDB compilation mode. + {StrBegin="NETSDK1153: "} + + + NETSDK1159: CrossgenTool must be specified when UseCrossgen2 is set to false. + NETSDK1159: CrossgenTool must be specified when UseCrossgen2 is set to false. + {StrBegin="NETSDK1159: "} + + + NETSDK1161: DiaSymReader library '{0}' not found. + NETSDK1161: DiaSymReader library '{0}' not found. + {StrBegin="NETSDK1161: "} + + + NETSDK1156: .NET host executable '{0}' not found. + NETSDK1156: .NET host executable '{0}' not found. + {StrBegin="NETSDK1156: "} + + + NETSDK1055: DotnetTool does not support target framework lower than netcoreapp2.1. + NETSDK1055: DotnetTool は、netcoreapp2.1 未満のターゲット フレームワークをサポートしていません。 + {StrBegin="NETSDK1055: "} + + + NETSDK1054: only supports .NET Core. + NETSDK1054: .NET Core のみがサポートされています。 + {StrBegin="NETSDK1054: "} + + + NETSDK1022: Duplicate '{0}' items were included. The .NET SDK includes '{0}' items from your project directory by default. You can either remove these items from your project file, or set the '{1}' property to '{2}' if you want to explicitly include them in your project file. For more information, see {4}. The duplicate items were: {3} + NETSDK1022: 重複する '{0}' 個のアイテムが含められました。.NET SDK には、既定でプロジェクト ディレクトリからのアイテムが '{0}' 個含まれています。これらのアイテムをプロジェクト ファイルから削除するか、'{1}' プロパティを '{2}' に設定してプロジェクト ファイルに明示的に含めることができます。詳細については、{4} をご覧ください。重複するアイテムは、{3} でした。 + {StrBegin="NETSDK1022: "} + + + NETSDK1015: The preprocessor token '{0}' has been given more than one value. Choosing '{1}' as the value. + NETSDK1015: プリプロセッサ トークン '{0}' に複数の値が指定されています。値として '{1}' を選択します。 + {StrBegin="NETSDK1015: "} + + + NETSDK1152: Found multiple publish output files with the same relative path: {0}. + NETSDK1148: 同じ相対パスの発行出力ファイルが複数見つかりました: {0}。 + {StrBegin="NETSDK1152: "} + + + NETSDK1110: More than one asset in the runtime pack has the same destination sub-path of '{0}'. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue. + NETSDK1110: ランタイム パック内の複数のアセットに同じターゲット サブパス '{0}' が指定されています。https://aka.ms/dotnet-sdk-issue で、このエラーを .NET チームに報告してください。 + {StrBegin="NETSDK1110: "} + + + NETSDK1169: The same resource ID {0} was specified for two type libraries '{1}' and '{2}'. Duplicate type library IDs are not allowed. + NETSDK1169: The same resource ID {0} was specified for two type libraries '{1}' and '{2}'. Duplicate type library IDs are not allowed. + {StrBegin="NETSDK1169: "} + + + Encountered conflict between '{0}' and '{1}'. + '{0}' と '{1}' の間で競合が発生しました。 + + + + NETSDK1051: Error parsing FrameworkList from '{0}'. {1} '{2}' was invalid. + NETSDK1051: '{0}' からの FrameworkList の解析でエラーが発生しました。{1} '{2}' が無効でした。 + {StrBegin="NETSDK1051: "} + + + NETSDK1043: Error parsing PlatformManifest from '{0}' line {1}. Lines must have the format {2}. + NETSDK1043: '{0}' 行 {1} からの PlatformManifest の解析でエラーが発生しました。行の形式は {2} である必要があります。 + {StrBegin="NETSDK1043: "} + + + NETSDK1044: Error parsing PlatformManifest from '{0}' line {1}. {2} '{3}' was invalid. + NETSDK1044: '{0}' 行 {1} からの PlatformManifest の解析でエラーが発生しました。{2} '{3}' は無効でした。 + {StrBegin="NETSDK1044: "} + + + NETSDK1060: Error reading assets file: {0} + NETSDK1060: アセット ファイルの読み取りでエラーが発生しました: {0} + {StrBegin="NETSDK1060: "} + + + NETSDK1111: Failed to delete output apphost: {0} + NETSDK1111: 出力 apphost を削除できませんでした: {0} + {StrBegin="NETSDK1111: "} + + + NETSDK1077: Failed to lock resource. + NETSDK1077: リソースをロックできませんでした。 + {StrBegin="NETSDK1077: "} + + + NETSDK1030: Given file name '{0}' is longer than 1024 bytes + NETSDK1030: 指定されたファイル名 '{0}' の長さが 1024 バイトを超えています。 + {StrBegin="NETSDK1030: "} + + + NETSDK1024: Folder '{0}' already exists either delete it or provide a different ComposeWorkingDir + NETSDK1024: フォルダー '{0}' が既に存在します。そのフォルダーを削除するか、別の ComposeWorkingDir を指定してください。 + {StrBegin="NETSDK1024: "} + + + NETSDK1068: The framework-dependent application host requires a target framework of at least 'netcoreapp2.1'. + NETSDK1068: フレームワークに依存するアプリケーション ホストには、最低でも 'netcoreapp2.1' のターゲット フレームワークが必要です。 + {StrBegin="NETSDK1068: "} + + + NETSDK1052: Framework list file path '{0}' is not rooted. Only full paths are supported. + NETSDK1052: フレームワーク リスト ファイル パス '{0}' にルートが指定されていません。完全パスのみがサポートされています。 + {StrBegin="NETSDK1052: "} + + + NETSDK1087: Multiple FrameworkReference items for '{0}' were included in the project. + NETSDK1087: '{0}' に対する複数の FrameworkReference 項目がプロジェクトに含められました。 + {StrBegin="NETSDK1087: "} + + + NETSDK1086: A FrameworkReference for '{0}' was included in the project. This is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see {1} + NETSDK1086: '{0}' の FrameworkReference がプロジェクトに含められました。これは .NET SDK によって暗黙的に参照されるため、通常はプロジェクトから参照する必要はありません。詳細については、{1} をご覧ください + {StrBegin="NETSDK1086: "} + + + NETSDK1049: Resolved file has a bad image, no metadata, or is otherwise inaccessible. {0} {1} + NETSDK1049: 解決されたファイルは、無効なイメージが含まれているか、メタデータが存在しないか、またはアクセスできません。{0} {1} + {StrBegin="NETSDK1049: "} + + + NETSDK1141: Unable to resolve the .NET SDK version as specified in the global.json located at {0}. + NETSDK1141: {0} にある global.json で指定されている .NET SDK のバージョンを解決できません。 + {StrBegin="NETSDK1141: "} + + + NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false. + NETSDK1144: アセンブリのサイズを最適化できませんでした。PublishTrimmed プロパティを false に設定することにより、最適化を無効にすることができます。 + {StrBegin="NETSDK1144: "} + + + NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration. Please ensure that you are publishing a self-contained app. + NETSDK1102: アセンブリのサイズの最適化は、選択された公開構成に対してはサポートされていません。自己完結型のアプリを公開していることをご確認ください。 + {StrBegin="NETSDK1102: "} + + + Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + アセンブリのサイズを最適化しています。これにより、アプリの動作が変更される可能性があります。公開した後にテストしてください。https://aka.ms/dotnet-illink を参照してください + + + + NETSDK1020: Package Root {0} was incorrectly given for Resolved library {1} + NETSDK1020: 解決されたライブラリ {1} に対して指定されたパッケージ ルート {0} が正しくありません。 + {StrBegin="NETSDK1020: "} + + + NETSDK1025: The target manifest {0} provided is of not the correct format + NETSDK1025: 指定されたターゲット マニフェスト {0} の形式が正しくありません + {StrBegin="NETSDK1025: "} + + + NETSDK1163: Input assembly '{0}' not found. + NETSDK1163: Input assembly '{0}' not found. + {StrBegin="NETSDK1163: "} + + + NETSDK1003: Invalid framework name: '{0}'. + NETSDK1003: 無効なフレームワーク名: '{0}'。 + {StrBegin="NETSDK1003: "} + + + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' + NETSDK1058: ItemSpecToUse パラメーターの値が無効です: '{0}'。このプロパティは空白にするか、'Left' または 'Right' に設定する必要があります + {StrBegin="NETSDK1058: "} +The following are names of parameters or literal values and should not be translated: ItemSpecToUse, Left, Right + + + NETSDK1018: Invalid NuGet version string: '{0}'. + NETSDK1018: 無効な NuGet バージョン文字列: '{0}'。 + {StrBegin="NETSDK1018: "} + + + NETSDK1075: Update handle is invalid. This instance may not be used for further updates. + NETSDK1075: 更新ハンドルが無効です。このインスタンスは、今後の更新には使用できない可能性があります。 + {StrBegin="NETSDK1075: "} + + + NETSDK1104: RollForward value '{0}' is invalid. Allowed values are {1}. + NETSDK1104: ロールフォワード値 '{0}' が無効です。許可されている値は {1} です。 + {StrBegin="NETSDK1104: "} + + + NETSDK1140: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1140: {0} は {1} に対して有効な TargetPlatformVersion ではありません。有効なバージョン: +{2} + {StrBegin="NETSDK1140: "} + + + NETSDK1173: The provided type library '{0}' is in an invalid format. + NETSDK1173: The provided type library '{0}' is in an invalid format. + {StrBegin="NETSDK1173: "} + + + NETSDK1170: The provided type library ID '{0}' for type libary '{1}' is invalid. The ID must be a positive integer less than 65536. + NETSDK1170: The provided type library ID '{0}' for type libary '{1}' is invalid. The ID must be a positive integer less than 65536. + {StrBegin="NETSDK1170: "} + + + NETSDK1157: JIT library '{0}' not found. + NETSDK1157: JIT library '{0}' not found. + {StrBegin="NETSDK1157: "} + + + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. + NETSDK1061: プロジェクトは {0} バージョン {1} を使用して復元されましたが、現在の設定では、バージョン {2} が代わりに使用されます。この問題を解決するには、復元およびこれ以降の操作 (ビルドや公開など) で同じ設定を使用していることをご確認ください。通常この問題は、ビルドや公開の実行時に RuntimeIdentifier プロパティを設定したが、復元時には設定していない場合に発生することがあります。詳しくは、https://aka.ms/dotnet-runtime-patch-selection を参照してください。 + {StrBegin="NETSDK1061: "} +{0} - Package Identifier for platform package +{1} - Restored version of platform package +{2} - Current version of platform package + + + NETSDK1008: Missing '{0}' metadata on '{1}' item '{2}'. + NETSDK1008: '{1}' 項目 '{2}' の '{0}' メタデータがありません。 + {StrBegin="NETSDK1008: "} + + + NETSDK1164: Missing output PDB path in PDB generation mode (OutputPDBImage metadata). + NETSDK1164: Missing output PDB path in PDB generation mode (OutputPDBImage metadata). + {StrBegin="NETSDK1164: "} + + + NETSDK1165: Missing output R2R image path (OutputR2RImage metadata). + NETSDK1165: Missing output R2R image path (OutputR2RImage metadata). + {StrBegin="NETSDK1165: "} + + + NETSDK1171: An integer ID less than 65536 must be provided for type library '{0}' because more than one type library is specified. + NETSDK1171: An integer ID less than 65536 must be provided for type library '{0}' because more than one type library is specified. + {StrBegin="NETSDK1171: "} + + + NETSDK1021: More than one file found for {0} + NETSDK1021: {0} で複数のファイルが見つかりました。 + {StrBegin="NETSDK1021: "} + + + NETSDK1069: This project uses a library that targets .NET Standard 1.5 or higher, and the project targets a version of .NET Framework that doesn't have built-in support for that version of .NET Standard. Visit https://aka.ms/net-standard-known-issues for a set of known issues. Consider retargeting to .NET Framework 4.7.2. + NETSDK1069: このプロジェクトは .NET Standard 1.5 以上をターゲットとするライブラリを使用します。また、このプロジェクトは、そのバージョンの .NET Standard に対するサポートが組み込まれていない .NET Framework のバージョンをターゲットとしています。一連の既知の問題について、https://aka.ms/net-standard-known-issues をご覧ください。.NET Framework 4.7.2 への再ターゲットを検討してください。 + {StrBegin="NETSDK1069: "} + + + 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. + NETSDK1115: 現在の .NET SDK では、.NET SDK の既定値を使用せずに .NET Framework をサポートすることはできません。これは、C++/CLI プロジェクトの CLRSupport プロパティと TargetFramework の間の不一致が原因と考えられます。 + {StrBegin="NETSDK1115: "} + + + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. + NETSDK1084: 指定された RuntimeIdentifier '{0}' で利用できるアプリケーション ホストはありません。 + {StrBegin="NETSDK1084: "} + + + NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked. + NETSDK1085: 'NoBuild' プロパティが true に設定されていますが、'Build' ターゲットが呼び出されました。 + {StrBegin="NETSDK1085: "} + + + NETSDK1002: Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'. + NETSDK1002: プロジェクト '{0}' は、'{2}' を対象としています。'{1}' を対象とするプロジェクトは、これを参照できません。 + {StrBegin="NETSDK1002: "} + + + NETSDK1082: There was no runtime pack for {0} available for the specified RuntimeIdentifier '{1}'. + NETSDK1082: 指定された RuntimeIdentifier '{1}' で利用できる {0} のランタイム パックがありませんでした。 + {StrBegin="NETSDK1082: "} + + + NETSDK1132: No runtime pack information was available for {0}. + NETSDK1132: {0} で使用可能なランタイム パックの情報がありません。 + {StrBegin="NETSDK1132: "} + + + NETSDK1128: COM hosting does not support self-contained deployments. + NETSDK1128: COM ホスティングは自己完結型の配置をサポートしていません。 + {StrBegin="NETSDK1128: "} + + + NETSDK1119: C++/CLI projects targeting .NET Core cannot use EnableComHosting=true. + NETSDK1119: .NET Core をターゲットとする C++/CLI プロジェクトでは EnableComHosting=true を使用できません。 + {StrBegin="NETSDK1119: "} + + + NETSDK1116: C++/CLI projects targeting .NET Core must be dynamic libraries. + NETSDK1116: .NET Core をターゲットとする C++/CLI プロジェクトは、ダイナミック ライブラリである必要があります。 + {StrBegin="NETSDK1116: "} + + + NETSDK1118: C++/CLI projects targeting .NET Core cannot be packed. + NETSDK1118: .NET Core をターゲットとする C++/CLI プロジェクトはパックできません。 + {StrBegin="NETSDK1118: "} + + + NETSDK1117: Does not support publish of C++/CLI project targeting dotnet core. + NETSDK1117: .NET Core をターゲットとする C++/CLI プロジェクトの発行をサポートしていません。 + {StrBegin="NETSDK1117: "} + + + NETSDK1121: C++/CLI projects targeting .NET Core cannot use SelfContained=true. + NETSDK1121: .NET Core をターゲットとする C++/CLI プロジェクトでは SelfContained=true を使用できません。 + {StrBegin="NETSDK1121: "} + + + NETSDK1151: The referenced project '{0}' is a self-contained executable. A self-contained executable cannot be referenced by a non self-contained executable. For more information, see https://aka.ms/netsdk1151 + NETSDK1151: 参照先プロジェクト '{0}' は自己完結型実行可能ファイルです。 自己完結型の実行可能ファイルは、自己完結型以外の実行可能ファイルでは参照できません。 + {StrBegin="NETSDK1151: "} + + + NETSDK1162: PDB generation: R2R executable '{0}' not found. + NETSDK1162: PDB generation: R2R executable '{0}' not found. + {StrBegin="NETSDK1162: "} + + + NETSDK1053: Pack as tool does not support self contained. + NETSDK1053: Pack As ツールは自己完結型をサポートしていません。 + {StrBegin="NETSDK1053: "} + + + NETSDK1146: PackAsTool does not support TargetPlatformIdentifier being set. For example, TargetFramework cannot be net5.0-windows, only net5.0. PackAsTool also does not support UseWPF or UseWindowsForms when targeting .NET 5 and higher. + NETSDK1146: PackAsTool は、設定されている TargetPlatformIdentifier をサポートしていません。たとえば、TargetFramework には net5.0-windows は指定できず、net 5.0 のみ使用できます。また PackAsTool は、.NET 5 以降を対象としている場合には、UseWPF や UseWindowsForms もサポートしていません。 + {StrBegin="NETSDK1146: "} + + + NETSDK1064: Package {0}, version {1} was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. + NETSDK1064: パッケージ {0}、バージョン {1} が見つかりませんでした。NuGet の復元により、削除された可能性があります。それ以外の場合、NuGet の復元が最大パス長の制限のために一部分しか完了していない可能性があります。 + {StrBegin="NETSDK1064: "} + + + NETSDK1023: A PackageReference for '{0}' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see {1} + NETSDK1023: '{0}' の PackageReference がプロジェクトに含められました。このパッケージは .NET SDK によって暗黙的に参照されるため、通常はプロジェクトから参照する必要がありません。詳細については、{1} をご覧ください。 + {StrBegin="NETSDK1023: "} + + + NETSDK1071: A PackageReference to '{0}' specified a Version of `{1}`. Specifying the version of this package is not recommended. For more information, see https://aka.ms/sdkimplicitrefs + NETSDK1071: '{0}' への PackageReference は '{1}' のバージョンを指定しました。このパッケージのバージョンを指定することは推奨されません。詳細については、https://aka.ms/sdkimplicitrefs を参照してください + {StrBegin="NETSDK1071: "} + + + NETSDK1176: Placeholder + NETSDK1176: Placeholder + {StrBegin="NETSDK1176: "} - This string is not used here, but is a placeholder for the error code, which is used by the "dotnet run" command. + + + NETSDK1011: Assets are consumed from project '{0}', but no corresponding MSBuild project path was found in '{1}'. + NETSDK1011: プロジェクト '{0}' の資産が使用されますが、対応する MSBuild プロジェクト パスが '{1}' で見つかりませんでした。 + {StrBegin="NETSDK1011: "} + + + NETSDK1059: The tool '{0}' is now included in the .NET SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). + NETSDK1059: ツール '{0}' は .NET SDK に含まれるようになりました。この警告の解決に関する情報は、(https://aka.ms/dotnetclitools-in-box) で入手できます。 + {StrBegin="NETSDK1059: "} + + + NETSDK1093: Project tools (DotnetCliTool) only support targeting .NET Core 2.2 and lower. + NETSDK1093: プロジェクト ツール (DotnetCliTool) は、ターゲットが .NET Core 2.2 以下の場合のみサポートされます。 + {StrBegin="NETSDK1093: "} + + + NETSDK1122: ReadyToRun compilation will be skipped because it is only supported for .NET Core 3.0 or higher. + NETSDK1122: ReadyToRun コンパイルは、.NET Core 3.0 以降でのみサポートされているため、スキップされます。 + {StrBegin="NETSDK1122: "} + + + NETSDK1123: Publishing an application to a single-file requires .NET Core 3.0 or higher. + NETSDK1123: アプリケーションを 1 つのファイルに発行するには、.NET Core 3.0 以降が必要です。 + {StrBegin="NETSDK1123: "} + + + NETSDK1124: Trimming assemblies requires .NET Core 3.0 or higher. + NETSDK1124: アセンブリをトリミングするには、.NET Core 3.0 以降が必要です。 + {StrBegin="NETSDK1124: "} + + + NETSDK1129: The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify the framework for the published application. + NETSDK1129: ターゲット フレームワークを指定しないと、'Publish' ターゲットはサポートされません。現在のプロジェクトは複数のフレームワークを対象としています。発行するアプリケーションのフレームワークを指定する必要があります。 + {StrBegin="NETSDK1129: "} + + + NETSDK1096: Optimizing assemblies for performance failed. You can either exclude the failing assemblies from being optimized, or set the PublishReadyToRun property to false. + NETSDK1096: アセンブリのパフォーマンスの最適化が失敗しました。失敗したアセンブリを最適化の対象から除外するか、PublishReadyToRun プロパティを false に設定してください。 + {StrBegin="NETSDK1096: "} + + + Some ReadyToRun compilations emitted warnings, indicating potential missing dependencies. Missing dependencies could potentially cause runtime failures. To show the warnings, set the PublishReadyToRunShowWarnings property to true. + 一部の ReadyToRun コンパイルで警告が発生しました。これは、依存関係が見つからないことを示している可能性があります。依存関係が見つからないと、ランタイム エラーが発生する場合があります。警告を表示するには、PublishReadyToRunShowWarnings プロパティを true に設定します。 + + + + NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. + NETSDK1094: アセンブリのパフォーマンスを最適化できません。有効なランタイム パッケージが見つかりませんでした。PublishReadyToRun プロパティを false に設定するか、公開するときに、サポートされているランタイム識別子を使用してください。 + {StrBegin="NETSDK1094: "} + + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: アセンブリのパフォーマンスの最適化は、選択されたターゲット プラットフォームまたはアーキテクチャに対してはサポートされていません。サポートされているランタイム識別子を使用していることを確認するか、PublishReadyToRun プロパティを false に設定してください。 + {StrBegin="NETSDK1095: "} + + + NETSDK1103: RollForward setting is only supported on .NET Core 3.0 or higher. + NETSDK1103: ロールフォワードの設定は、.NET Core 3.0 以降でのみサポートされています。 + {StrBegin="NETSDK1103: "} + + + NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. + NETSDK1083: 指定された RuntimeIdentifier '{0}' は認識されていません。 + {StrBegin="NETSDK1083: "} + + + NETSDK1028: Specify a RuntimeIdentifier + NETSDK1028: RuntimeIdentifier の指定 + {StrBegin="NETSDK1028: "} + + + NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue. + NETSDK1109: ランタイム リスト ファイル '{0}' が見つかりませんでした。https://aka.ms/dotnet-sdk-issue で、このエラーを .NET チームに報告してください。 + {StrBegin="NETSDK1109: "} + + + NETSDK1112: The runtime pack for {0} was not downloaded. Try running a NuGet restore with the RuntimeIdentifier '{1}'. + NETSDK1112: {0} のランタイム パックがダウンロードされませんでした。RuntimeIdentifier '{1}' で NuGet 復元を実行してみてください。 + {StrBegin="NETSDK1112: "} + + + NETSDK1150: The referenced project '{0}' is a non self-contained executable. A non self-contained executable cannot be referenced by a self-contained executable. For more information, see https://aka.ms/netsdk1150 + NETSDK1150: 参照先プロジェクト'{0}'は、自己完結型以外の実行可能ファイルです。は、自己完結型以外の実行可能ファイルは自己完結型の実行可能ファイルでは参照できません。 + {StrBegin="NETSDK1150: "} + + + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} + + + NETSDK1180: Specified runtime identifier '{0}'' implies Windows 7 compatibility. Single File publishing is not compatible with Windows 7. + NETSDK1180: Specified runtime identifier '{0}'' implies Windows 7 compatibility. Single File publishing is not compatible with Windows 7. + {StrBegin="NETSDK1180: "} + + + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. + NETSDK1048: 'AdditionalProbingPaths' が GenerateRuntimeConfigurationFiles に指定されましたが、'RuntimeConfigDevPath' が空であるためスキップされます。 + {StrBegin="NETSDK1048: "} + + + NETSDK1138: The target framework '{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. + NETSDK1138: ターゲット フレームワーク '{0}' はサポートされていません。今後、セキュリティ更新プログラムを受け取ることはありません。サポート ポリシーの詳細については、{1} をご覧ください。 + {StrBegin="NETSDK1138: "} + + + NETSDK1046: The TargetFramework value '{0}' is not valid. To multi-target, use the 'TargetFrameworks' property instead. + NETSDK1046: TargetFramework 値 '{0}' が無効です。複数をターゲットとするには、代わりに 'TargetFrameworks' プロパティを使用してください。 + {StrBegin="NETSDK1046: "} + + + NETSDK1145: The {0} pack is not installed and NuGet package restore is not supported. Upgrade Visual Studio, remove global.json if it specifies a certain SDK version, and uninstall the newer SDK. For more options visit https://aka.ms/targeting-apphost-pack-missing Pack Type:{0}, Pack directory: {1}, targetframework: {2}, Pack PackageId: {3}, Pack Package Version: {4} + NETSDK1145: {0} パックはインストールされておらず、NuGet パッケージの復元はサポートされていません。Visual Studio をアップグレードして、global.json を削除し (特定の SDK バージョンがそれに指定されている場合)、より新しい SDK をアンインストールします。その他のオプションについては、https://aka.ms/targeting-apphost-pack-missing にアクセスしてください。パックの種類: {0}、パック ディレクトリ: {1}、targetframework: {2}、パックの PackageId: {3}、パック パッケージ バージョン: {4} + {StrBegin="NETSDK1145: "} + + + NETSDK1127: The targeting pack {0} is not installed. Please restore and try again. + NETSDK1127: ターゲット パック {0} がインストールされていません。復元して、もう一度お試しください。 + {StrBegin="NETSDK1127: "} + + + NETSDK1175: Windows Forms is not supported or recommended with trimming enabled. Please go to https://aka.ms/dotnet-illink/windows-forms for more details. + NETSDK1175: Windows Forms is not supported or recommended with trimming enabled. Please go to https://aka.ms/dotnet-illink/windows-forms for more details. + {StrBegin="NETSDK1175: "} + + + NETSDK1168: WPF is not supported or recommended with trimming enabled. Please go to https://aka.ms/dotnet-illink/wpf for more details. + NETSDK1168: WPF is not supported or recommended with trimming enabled. Please go to https://aka.ms/dotnet-illink/wpf for more details. + {StrBegin="NETSDK1168: "} + + + NETSDK1172: The provided type library '{0}' does not exist. + NETSDK1172: The provided type library '{0}' does not exist. + {StrBegin="NETSDK1172: "} + + + NETSDK1016: Unable to find resolved path for '{0}'. + NETSDK1016: 解決された '{0}' のパスが見つかりません。 + {StrBegin="NETSDK1016: "} + + + Unable to use package assets cache due to I/O error. This can occur when the same project is built more than once in parallel. Performance may be degraded, but the build result will not be impacted. + I/O エラーのため、パッケージ資産のキャッシュを使用できません。これは、同じプロジェクトが同時に複数回ビルドされるときに発生することがあります。パフォーマンスが低下する可能性がありますが、ビルドの結果には影響はありません。 + + + + NETSDK1012: Unexpected file type for '{0}'. Type is both '{1}' and '{2}'. + NETSDK1012: '{0}' のファイルの種類が正しくありません。種類は '{1}' と '{2}' の両方です。 + {StrBegin="NETSDK1012: "} + + + NETSDK1073: The FrameworkReference '{0}' was not recognized + NETSDK1073: FrameworkReference '{0}' は認識されませんでした + {StrBegin="NETSDK1073: "} + + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'. + NETSDK1137: Microsoft.NET.Sdk.WindowsDesktop SDK を使用する必要はなくなりました。ルート プロジェクト要素の SDK 属性を 'Microsoft.NET.Sdk' に変更することをご検討ください。 + {StrBegin="NETSDK1137: "} + + + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. + NETSDK1009: 認識されないプリプロセッサ トークン '{0}' が '{1}' に存在します。 + {StrBegin="NETSDK1009: "} + + + NETSDK1081: The targeting pack for {0} was not found. You may be able to resolve this by running a NuGet restore on the project. + NETSDK1081: {0} の Targeting Pack が見つかりませんでした。プロジェクトで NuGet の復元を実行することにより、この問題を解決できる場合があります。 + {StrBegin="NETSDK1081: "} + + + NETSDK1019: {0} is an unsupported framework. + NETSDK1019: {0} は、サポートされていないフレームワークです。 + {StrBegin="NETSDK1019: "} + + + NETSDK1056: Project is targeting runtime '{0}' but did not resolve any runtime-specific packages. This runtime may not be supported by the target framework. + NETSDK1056: プロジェクトはランタイム '{0}' をターゲットとしていますが、ランタイム固有のパッケージを解決しませんでした。このランタイムはターゲットのフレームワークでサポートされていない可能性があります。 + {StrBegin="NETSDK1056: "} + + + NETSDK1050: The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher. Please install version 2.0 or higher of the .NET Core SDK. + NETSDK1050: このプロジェクトで使用される Microsoft.NET.Sdk のバージョンは、.NET Standard 1.5 以上を対象とするライブラリへの参照をサポートするには不十分です。.NET Core SDK のバージョン 2.0 以上をインストールしてください。 + {StrBegin="NETSDK1050: "} + + + NETSDK1045: The current .NET SDK does not support targeting {0} {1}. Either target {0} {2} or lower, or use a version of the .NET SDK that supports {0} {1}. + NETSDK1045: 現在の .NET SDK は、ターゲットとする {0} {1} をサポートしていません。{0} {2} 以下をターゲットとするか、{0} {1} をサポートする .NET SDK のバージョンを使用してください。 + {StrBegin="NETSDK1045: "} + + + NETSDK1139: The target platform identifier {0} was not recognized. + NETSDK1139: ターゲット プラットフォーム識別子 {0} は認識されませんでした。 + {StrBegin="NETSDK1139: "} + + + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. + NETSDK1107: Windows デスクトップ アプリケーションを作成するには、Microsoft.NET.Sdk.WindowsDesktop が必要です。現在の SDK では、'UseWpf' と 'UseWindowsForms' はサポートされていません。 + {StrBegin="NETSDK1107: "} + + + You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview + プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください + + + + NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. + NETSDK1131: {0} をターゲットにする場合、WinMDExp を使用したマネージド Windows メタデータ コンポーネント生成はサポートされていません。 + {StrBegin="NETSDK1131: "} + + + NETSDK1130: {1} cannot be referenced. Referencing a Windows Metadata component directly when targeting .NET 5 or higher is not supported. For more information, see https://aka.ms/netsdk1130 + NETSDK1130: {1} 参照できません。.NET 5 以上のターゲットを設定する場合、Windows Metadata コンポーネントを直接参照することはできません。詳細については、 「https://aka.ms/netsdk1130」をご参照ください。 + {StrBegin="NETSDK1130: "} + + + NETSDK1149: {0} cannot be referenced because it uses built-in support for WinRT, which is no longer supported in .NET 5 and higher. An updated version of the component supporting .NET 5 is needed. For more information, see https://aka.ms/netsdk1149 + NETSDK1149: NET 5 以上でサポートされなくなった WinRT に組み込みのサポートが使用されている可能性があり、{0}は参照できません。.NET 5 をサポートしているコンポーネントの更新バージョンが必要です。詳細については、「 https://aka.ms/netsdk1149」をご参照ください。 + {StrBegin="NETSDK1149: "} + + + NETSDK1106: Microsoft.NET.Sdk.WindowsDesktop requires 'UseWpf' or 'UseWindowsForms' to be set to 'true' + NETSDK1106: Microsoft.NET.Sdk.WindowsDesktop では、'UseWpf' または 'UseWindowsForms' を 'true' に設定する必要があります + {StrBegin="NETSDK1106: "} + + + NETSDK1105: Windows desktop applications are only supported on .NET Core 3.0 or higher. + NETSDK1105: Windows デスクトップ アプリケーションは、.NET Core 3.0 以降でのみサポートされています。 + {StrBegin="NETSDK1105: "} + + + NETSDK1100: Windows is required to build Windows desktop applications. + NETSDK1100: Windows デスクトップ アプリケーションを構築するには Windows が必要です。 + {StrBegin="NETSDK1100: "} + + + NETSDK1136: The target platform must be set to Windows (usually by including '-windows' in the TargetFramework property) when using Windows Forms or WPF, or referencing projects or packages that do so. + NETSDK1136: Windows フォームまたは WPF を使用しているとき、またはそのようなプロジェクトまたはパッケージを参照しているときには、ターゲット プラットフォームを Windows に設定する必要があります (通常は TargetFramework プロパティに '-windows' を含めることによる)。 + {StrBegin="NETSDK1136: "} + + + NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly. + NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly. + {StrBegin="NETSDK1148: "} + + + NETSDK1178: The project depends on the following workload packs that do not exist in any of the workloads available in this installation: {0} +You may need to build the project on another operating system or architecture, or update the .NET SDK. + NETSDK1178: The project depends on the following workload packs that do not exist in any of the workloads available in this installation: {0} +You may need to build the project on another operating system or architecture, or update the .NET SDK. + {StrBegin="NETSDK1178: "} + + + NETSDK1147: To build this project, the following workloads must be installed: {0} +To install these workloads, run the following command: {1} + NETSDK1147: To build this project, the following workloads must be installed: {0} +To install these workloads, run the following command: {1} + {StrBegin="NETSDK1147: "} + + + + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 7b6269449f43..8ee56d6c2755 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -264,6 +264,11 @@ '{0}'이(가) 어셈블리가 아니기 때문에 적용되는 내용을 확인할 수 없습니다. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: PlatformManifest가 존재하지 않기 때문에 '{0}'에서 로드할 수 없습니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 0e9ac9a6c486..c9d573b1c62d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -264,6 +264,11 @@ Nie można określić wyniku, ponieważ element „{0}” nie jest zestawem. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: Nie można załadować elementu PlatformManifest z lokalizacji „{0}”, ponieważ ta lokalizacja nie istnieje. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index fbeef238adc2..209f1ff030d5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -264,6 +264,11 @@ Não foi possível determinar um vencedor porque '{0}' não é um assembly. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: Não foi possível carregar PlatformManifest de '{0}' porque ele não existia. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 40c43147a2cd..731621782bc5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -264,6 +264,11 @@ Не удалось определить победителя, так как "{0}" не является сборкой. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: не удалось загрузить манифест PlatformManifest из "{0}", так как его не существует. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index d2c48ffa730f..458337af3712 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -264,6 +264,11 @@ '{0}' bütünleştirilmiş kod olmadığından kazanan belirlenemedi. + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: '{0}' mevcut olmadığından buradan PlatformManifest yüklenemedi. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index e068428b3680..f0adcbfc3b64 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -264,6 +264,11 @@ “{0}”不是程序集,因此无法确定优胜者。 + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: 无法从“{0}”中加载 PlatformManifest,因为它不存在。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index b86470afdc75..8fcc09644352 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -264,6 +264,11 @@ 因為 '{0}' 並非組件,所以無法判斷成功者。 + + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + NETSDK1181: Error getting pack version: Pack '{0}' was not present in workload manifests. + {StrBegin="NETSDK1181: "} + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. NETSDK1042: 無法從 '{0}' 載入 PlatformManifest,因為它並不存在。 diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj index 74a2a3b64582..17797211dfbd 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj +++ b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj @@ -77,6 +77,7 @@ + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs index e8b48a506cfb..6de9e34c8bf2 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs @@ -9,6 +9,8 @@ using System.Text.RegularExpressions; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; +using Microsoft.DotNet.Cli; +using Microsoft.NET.Sdk.WorkloadManifestReader; using Newtonsoft.Json; using NuGet.Frameworks; @@ -65,6 +67,12 @@ public class ProcessFrameworkReferences : TaskBase [Required] public string NETCoreSdkRuntimeIdentifier { get; set; } + [Required] + public string NetCoreRoot { get; set; } + + [Required] + public string NETCoreSdkVersion { get; set; } + [Output] public ITaskItem[] PackagesToDownload { get; set; } @@ -181,6 +189,10 @@ protected override void ExecuteCore() { targetingPackVersion = knownFrameworkReference.TargetingPackVersion; } + + // Look up targeting pack version from workload manifests if necessary + targetingPackVersion = GetResolvedPackVersion(knownFrameworkReference.TargetingPackName, targetingPackVersion); + targetingPack.SetMetadata(MetadataKeys.NuGetPackageVersion, targetingPackVersion); targetingPack.SetMetadata("TargetingPackFormat", knownFrameworkReference.TargetingPackFormat); targetingPack.SetMetadata("TargetFramework", knownFrameworkReference.TargetFramework.GetShortFolderName()); @@ -196,12 +208,8 @@ protected override void ExecuteCore() } // Get the path of the targeting pack in the targeting pack root (e.g. dotnet/packs) - string targetingPackPath = null; - if (!string.IsNullOrEmpty(TargetingPackRoot)) - { - targetingPackPath = Path.Combine(TargetingPackRoot, knownFrameworkReference.TargetingPackName, targetingPackVersion); - } - if (targetingPackPath != null && Directory.Exists(targetingPackPath)) + string targetingPackPath = GetPackPath(knownFrameworkReference.TargetingPackName, targetingPackVersion); + if (targetingPackPath != null) { // Use targeting pack from packs folder targetingPack.SetMetadata(MetadataKeys.PackageDirectory, targetingPackPath); @@ -238,26 +246,26 @@ protected override void ExecuteCore() isTrimmable = selectedRuntimePack?.IsTrimmable; } - bool includeInPackageDownload; + bool useRuntimePackAndDownloadIfNecessary; KnownRuntimePack runtimePackForRuntimeIDProcessing; if (knownFrameworkReference.Name.Equals(knownFrameworkReference.RuntimeFrameworkName, StringComparison.OrdinalIgnoreCase)) { // Only add runtime packs where the framework reference name matches the RuntimeFrameworkName // Framework references for "profiles" will use the runtime pack from the corresponding non-profile framework runtimePackForRuntimeIDProcessing = selectedRuntimePack.Value; - includeInPackageDownload = true; + useRuntimePackAndDownloadIfNecessary = true; } else if (!knownFrameworkReference.RuntimePackRuntimeIdentifiers.Equals(selectedRuntimePack?.RuntimePackRuntimeIdentifiers)) { // If the profile has a different set of runtime identifiers than the runtime pack, use the profile. runtimePackForRuntimeIDProcessing = knownFrameworkReference.ToKnownRuntimePack(); - includeInPackageDownload = true; + useRuntimePackAndDownloadIfNecessary = true; } else { // For the remaining profiles, don't include them in package download but add them to unavailable if necessary. runtimePackForRuntimeIDProcessing = knownFrameworkReference.ToKnownRuntimePack(); - includeInPackageDownload = false; + useRuntimePackAndDownloadIfNecessary = false; } bool processedPrimaryRuntimeIdentifier = false; @@ -288,7 +296,7 @@ var runtimeRequiredByDeployment } ProcessRuntimeIdentifier(hasRuntimePackAlwaysCopyLocal ? "any" : RuntimeIdentifier, runtimePackForRuntimeIDProcessing, runtimePackVersion, additionalFrameworkReferencesForRuntimePack, - unrecognizedRuntimeIdentifiers, unavailableRuntimePacks, runtimePacks, packagesToDownload, isTrimmable, EnableRuntimePackDownload && includeInPackageDownload); + unrecognizedRuntimeIdentifiers, unavailableRuntimePacks, runtimePacks, packagesToDownload, isTrimmable, EnableRuntimePackDownload && useRuntimePackAndDownloadIfNecessary); processedPrimaryRuntimeIdentifier = true; } @@ -306,7 +314,7 @@ var runtimeRequiredByDeployment // Pass in null for the runtimePacks list, as for these runtime identifiers we only want to // download the runtime packs, but not use the assets from them ProcessRuntimeIdentifier(runtimeIdentifier, runtimePackForRuntimeIDProcessing, runtimePackVersion, additionalFrameworkReferencesForRuntimePack: null, - unrecognizedRuntimeIdentifiers, unavailableRuntimePacks, runtimePacks: null, packagesToDownload, isTrimmable, includeInPackageDownload); + unrecognizedRuntimeIdentifiers, unavailableRuntimePacks, runtimePacks: null, packagesToDownload, isTrimmable, useRuntimePackAndDownloadIfNecessary); } } @@ -442,7 +450,7 @@ private void ProcessRuntimeIdentifier( List runtimePacks, List packagesToDownload, string isTrimmable, - bool addToPackageDownload) + bool addRuntimePackAndDownloadIfNecessary) { var runtimeGraph = new RuntimeGraphCache(this).GetRuntimeGraph(RuntimeGraphPath); var knownFrameworkReferenceRuntimePackRuntimeIdentifiers = selectedRuntimePack.RuntimePackRuntimeIdentifiers.Split(';'); @@ -473,17 +481,22 @@ private void ProcessRuntimeIdentifier( unrecognizedRuntimeIdentifiers.Add(runtimeIdentifier); } } - else if (addToPackageDownload) + else if (addRuntimePackAndDownloadIfNecessary) { foreach (var runtimePackNamePattern in selectedRuntimePack.RuntimePackNamePatterns.Split(';')) { string runtimePackName = runtimePackNamePattern.Replace("**RID**", runtimePackRuntimeIdentifier); + // Look up runtimePackVersion from workload manifests if necessary + string resolvedRuntimePackVersion = GetResolvedPackVersion(runtimePackName, runtimePackVersion); + + string runtimePackPath = GetPackPath(runtimePackName, resolvedRuntimePackVersion); + if (runtimePacks != null) { TaskItem runtimePackItem = new TaskItem(runtimePackName); runtimePackItem.SetMetadata(MetadataKeys.NuGetPackageId, runtimePackName); - runtimePackItem.SetMetadata(MetadataKeys.NuGetPackageVersion, runtimePackVersion); + runtimePackItem.SetMetadata(MetadataKeys.NuGetPackageVersion, resolvedRuntimePackVersion); runtimePackItem.SetMetadata(MetadataKeys.FrameworkName, selectedRuntimePack.Name); runtimePackItem.SetMetadata(MetadataKeys.RuntimeIdentifier, runtimePackRuntimeIdentifier); runtimePackItem.SetMetadata(MetadataKeys.IsTrimmable, isTrimmable); @@ -498,13 +511,21 @@ private void ProcessRuntimeIdentifier( runtimePackItem.SetMetadata(MetadataKeys.AdditionalFrameworkReferences, string.Join(";", additionalFrameworkReferencesForRuntimePack)); } + if (runtimePackPath != null) + { + runtimePackItem.SetMetadata(MetadataKeys.PackageDirectory, runtimePackPath); + } + runtimePacks.Add(runtimePackItem); } - TaskItem packageToDownload = new TaskItem(runtimePackName); - packageToDownload.SetMetadata(MetadataKeys.Version, runtimePackVersion); + if (runtimePackPath == null) + { + TaskItem packageToDownload = new TaskItem(runtimePackName); + packageToDownload.SetMetadata(MetadataKeys.Version, resolvedRuntimePackVersion); - packagesToDownload.Add(packageToDownload); + packagesToDownload.Add(packageToDownload); + } } } } @@ -609,6 +630,61 @@ private string GetRuntimeFrameworkVersion( } } + private string GetPackPath(string packName, string packVersion) + { + IEnumerable GetPackFolders() + { + if (!string.IsNullOrEmpty(TargetingPackRoot)) + { + yield return TargetingPackRoot; + } + var packRootEnvironmentVariable = Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS); + if (!string.IsNullOrEmpty(packRootEnvironmentVariable)) + { + foreach (var packRoot in packRootEnvironmentVariable.Split(Path.PathSeparator)) + { + yield return Path.Combine(packRoot, "packs"); + } + } + } + + foreach (var packFolder in GetPackFolders()) + { + string packPath = Path.Combine(packFolder, packName, packVersion); + if (Directory.Exists(packPath)) + { + return packPath; + } + } + + return null; + } + + SdkDirectoryWorkloadManifestProvider _workloadManifestProvider; + WorkloadResolver _workloadResolver; + + private string GetResolvedPackVersion(string packID, string packVersion) + { + if (!packVersion.Equals("**FromWorkload**", StringComparison.OrdinalIgnoreCase)) + { + return packVersion; + } + + if (_workloadManifestProvider == null) + { + _workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(NetCoreRoot, NETCoreSdkVersion); + _workloadResolver = WorkloadResolver.Create(_workloadManifestProvider, NetCoreRoot, NETCoreSdkVersion); + } + + var packInfo = _workloadResolver.TryGetPackInfo(new WorkloadPackId(packID)); + if (packInfo == null) + { + Log.LogError("NETSDKZZZZ: Error getting pack version: Pack '{0}' was not present in workload manifests.", packID); + return packVersion; + } + return packInfo.Version; + } + private enum RuntimePatchRequest { UseDefaultVersionWithLatestRuntimePack, diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets index 743869a5f8e8..06cc5fb20596 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets @@ -107,7 +107,9 @@ Copyright (c) .NET Foundation. All rights reserved. EnableTargetingPackDownload="$(EnableTargetingPackDownload)" EnableRuntimePackDownload="$(EnableRuntimePackDownload)" KnownCrossgen2Packs="@(KnownCrossgen2Pack)" - NETCoreSdkRuntimeIdentifier="$(NETCoreSdkRuntimeIdentifier)"> + NETCoreSdkRuntimeIdentifier="$(NETCoreSdkRuntimeIdentifier)" + NetCoreRoot="$(NetCoreRoot)" + NETCoreSdkVersion="$(NETCoreSdkVersion)"> diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs index 6cc7d493f77b..6c3b79c9e04c 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs @@ -2,11 +2,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; +using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.Utils; using Microsoft.NET.Build.Tasks; using Microsoft.NET.TestFramework; using Microsoft.NET.TestFramework.Assertions; using Microsoft.NET.TestFramework.Commands; +using Microsoft.NET.TestFramework.ProjectConstruction; using System.IO; using System.Linq; using System.Xml.Linq; @@ -152,5 +154,197 @@ public void It_succeeds_when_RuntimeIdentifier_and_PlatformTarget_mismatch_but_P .And .HaveStdOutContaining("Hello World!"); } + + [RequiresMSBuildVersionFact("17.0.0.32901")] + public void It_resolves_runtimepack_from_packs_folder() + { + var testProject = new TestProject() + { + IsExe = true, + TargetFrameworks = "net6.0", + RuntimeIdentifier = EnvironmentInfo.GetCompatibleRid() + }; + + // Use separate packages download folder for this project so that we can verify whether it had to download runtime packs + testProject.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages"; + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var getValuesCommand = new GetValuesCommand(testAsset, "RuntimePack", GetValuesCommand.ValueType.Item); + getValuesCommand.MetadataNames = new List() { "NuGetPackageId", "NuGetPackageVersion" }; + getValuesCommand.DependsOnTargets = "ProcessFrameworkReferences"; + getValuesCommand.ShouldRestore = false; + + getValuesCommand.Execute() + .Should() + .Pass(); + + var runtimePacks = getValuesCommand.GetValuesWithMetadata(); + + var packageDownloadProject = new TestProject() + { + Name = "PackageDownloadProject", + TargetFrameworks = testProject.TargetFrameworks + }; + + // Add PackageDownload items for runtime packs which will be needed + foreach (var runtimePack in runtimePacks) + { + packageDownloadProject.AddItem("PackageDownload", + new Dictionary() + { + {"Include", runtimePack.metadata["NuGetPackageId"] }, + {"Version", "[" + runtimePack.metadata["NuGetPackageVersion"] + "]" } + }); + } + + // Download runtime packs into separate folder under test assets + packageDownloadProject.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packs"; + + var packageDownloadAsset = _testAssetsManager.CreateTestProject(packageDownloadProject); + + new RestoreCommand(packageDownloadAsset) + .Execute() + .Should() + .Pass(); + + // Package download folders use lowercased package names, but pack folders use mixed case + // So change casing of the downloaded runtime pack folders to match what is expected + // for packs folders + foreach (var runtimePack in runtimePacks) + { + string oldCasing = Path.Combine(packageDownloadAsset.TestRoot, packageDownloadProject.Name, "packs", runtimePack.metadata["NuGetPackageId"].ToLowerInvariant()); + string newCasing = Path.Combine(packageDownloadAsset.TestRoot, packageDownloadProject.Name, "packs", runtimePack.metadata["NuGetPackageId"]); + Directory.Move(oldCasing, newCasing); + } + + // Now build the original test project with the packs folder with the runtime packs we just downloaded + var buildCommand = new BuildCommand(testAsset) + .WithEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS, Path.Combine(packageDownloadAsset.TestRoot, packageDownloadProject.Name)); + + buildCommand + .Execute() + .Should() + .Pass(); + + // Verify that runtime packs weren't downloaded to test project's packages folder + var packagesFolder = Path.Combine(testAsset.TestRoot, testProject.Name, "packages"); + foreach (var runtimePack in runtimePacks) + { + var path = Path.Combine(packagesFolder, runtimePack.metadata["NuGetPackageId"].ToLowerInvariant()); + new DirectoryInfo(path).Should().NotExist("Runtime Pack should have been resolved from packs folder"); + } + } + + [RequiresMSBuildVersionFact("17.0.0.32901")] + public void It_resolves_pack_versions_from_workload_manifest() + { + string GetVersionBand(string sdkVersion) + { + if (!Version.TryParse(sdkVersion.Split('-')[0], out var sdkVersionParsed)) + { + throw new ArgumentException($"'{nameof(sdkVersion)}' should be a version, but get {sdkVersion}"); + } + + static int Last2DigitsTo0(int versionBuild) + { + return (versionBuild / 100) * 100; + } + + return $"{sdkVersionParsed.Major}.{sdkVersionParsed.Minor}.{Last2DigitsTo0(sdkVersionParsed.Build)}"; + } + + var testProject = new TestProject() + { + IsExe = true, + TargetFrameworks = "net6.0", + RuntimeIdentifier = EnvironmentInfo.GetCompatibleRid() + }; + + // Set up test FrameworkReference that will use workload manifest to resolve versions + testProject.ProjectChanges.Add(project => + { + var itemGroup = XElement.Parse(@" + + + + + "); + project.Root.Add(itemGroup); + }); + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + // Set up test workload manifest that will suply targeting and runtime pack versions + string sdkVersionBand = GetVersionBand(TestContext.Current.ToolsetUnderTest.SdkVersion); + string manifestRoot = Path.Combine(testAsset.TestRoot, "manifests"); + string manifestFolder = Path.Combine(manifestRoot, sdkVersionBand, "RuntimePackVersionTestWorkload"); + Directory.CreateDirectory(manifestFolder); + string manifestPath = Path.Combine(manifestFolder, "WorkloadManifest.json"); + File.WriteAllText(manifestPath, @" +{ + ""version"": ""6.0.0-test"", + ""workloads"": { + ""testruntimepackworkload"": { + ""packs"": [ + ""Microsoft.NETCore.App.Test.RuntimePack"", + ""Microsoft.NETCore.App.Test.Ref"" + ] + } + }, + ""packs"": { + ""Microsoft.NETCore.App.Test.RuntimePack"": { + ""kind"": ""framework"", + ""version"": ""1.0.42-abc"" + }, + ""Microsoft.NETCore.App.Test.Ref"": { + ""kind"": ""framework"", + ""version"": ""1.0.42-xyz"" + } + } +} +"); + + // Verify correct targeting pack version is resolved + var getValuesCommand = (GetValuesCommand) new GetValuesCommand(testAsset, "TargetingPack", GetValuesCommand.ValueType.Item) + .WithEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_MANIFEST_ROOTS, manifestRoot); + getValuesCommand.MetadataNames = new List() { "NuGetPackageId", "NuGetPackageVersion" }; + getValuesCommand.DependsOnTargets = "ProcessFrameworkReferences"; + getValuesCommand.ShouldRestore = false; + + getValuesCommand.Execute() + .Should() + .Pass(); + + var targetingPacks = getValuesCommand.GetValuesWithMetadata(); + var testTargetingPack = targetingPacks.Single(p => p.value == "Microsoft.NETCore.App.Test"); + testTargetingPack.metadata["NuGetPackageId"].Should().Be("Microsoft.NETCore.App.Test.Ref"); + testTargetingPack.metadata["NuGetPackageVersion"].Should().Be("1.0.42-xyz"); + + // Verify correct runtime pack version is resolved + getValuesCommand = (GetValuesCommand)new GetValuesCommand(testAsset, "RuntimePack", GetValuesCommand.ValueType.Item) + .WithEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_MANIFEST_ROOTS, manifestRoot); + getValuesCommand.MetadataNames = new List() { "NuGetPackageId", "NuGetPackageVersion" }; + getValuesCommand.DependsOnTargets = "ProcessFrameworkReferences"; + getValuesCommand.ShouldRestore = false; + + getValuesCommand.Execute() + .Should() + .Pass(); + + var runtimePacks = getValuesCommand.GetValuesWithMetadata(); + var testRuntimePack = runtimePacks.Single(p => p.value == "Microsoft.NETCore.App.Test.RuntimePack"); + testRuntimePack.metadata["NuGetPackageId"].Should().Be("Microsoft.NETCore.App.Test.RuntimePack"); + testRuntimePack.metadata["NuGetPackageVersion"].Should().Be("1.0.42-abc"); + } } } diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_DotNet.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_DotNet.cs index f78bfe0a7e40..8e8441d4881a 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_DotNet.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_DotNet.cs @@ -72,7 +72,7 @@ public void It_can_remove_specific_imports_in_project_file() { var tfm = "net6.0"; var testProject = CreateTestProject(tfm); - testProject.AdditionalItems["Import"] = new Dictionary { ["Remove"] = "System.IO" }; + testProject.AddItem("Import", "Remove", "System.IO"); var testAsset = _testAssetsManager.CreateTestProject(testProject); var importFileName = $"{testAsset.TestProject.Name}.ImplicitNamespaceImports.cs"; @@ -104,7 +104,7 @@ public void It_can_generate_custom_imports() var tfm = "net6.0"; var testProject = CreateTestProject(tfm); testProject.AdditionalProperties["DisableImplicitNamespaceImports_DotNet"] = "true"; - testProject.AdditionalItems["Import"] = new Dictionary { ["Include"] = "CustomNamespace" }; + testProject.AddItem("Import", "Include", "CustomNamespace"); var testAsset = _testAssetsManager.CreateTestProject(testProject); var importFileName = $"{testAsset.TestProject.Name}.ImplicitNamespaceImports.cs"; @@ -130,7 +130,7 @@ public void It_ignores_duplicate_imports() var tfm = "net6.0"; var testProject = CreateTestProject(tfm); testProject.AdditionalProperties["DisableImplicitNamespaceImports_DotNet"] = "true"; - testProject.AdditionalItems["Import"] = new Dictionary { ["Include"] = "CustomNamespace;CustomNamespace" }; + testProject.AddItem("Import", "Include", "CustomNamespace;CustomNamespace"); var testAsset = _testAssetsManager.CreateTestProject(testProject); var importFileName = $"{testAsset.TestProject.Name}.ImplicitNamespaceImports.cs"; diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_Worker.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_Worker.cs index 32d8a0df297e..76e06db55551 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_Worker.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateImplicitNamespaceImports_Worker.cs @@ -90,10 +90,8 @@ private TestProject CreateTestProject(string tfm) TargetFrameworks = tfm, ProjectSdk = "Microsoft.NET.Sdk.Worker" }; - testProject.AdditionalItems["PackageReference"] = new Dictionary { - ["Include"] = "Microsoft.Extensions.Hosting", - ["Version"] = "6.0.0-preview.5.21301.5" - }; + testProject.PackageReferences.Add(new TestPackageReference("Microsoft.Extensions.Hosting", "6.0.0-preview.5.21301.5")); + testProject.SourceFiles["Program.cs"] = @" namespace WorkerApp { diff --git a/src/Tests/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj b/src/Tests/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj index 44393ac200fe..b536cb66226c 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj +++ b/src/Tests/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj @@ -39,6 +39,8 @@ + + diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs index 4f39656933dc..df817879f976 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs @@ -65,7 +65,7 @@ public void It_creates_readytorun_images_for_all_assemblies_except_excluded_ones "ClassLib"); testProject.AdditionalProperties["PublishReadyToRun"] = "True"; - testProject.AdditionalItems["PublishReadyToRunExclude"] = new Dictionary { ["Include"] = "Classlib.dll" }; + testProject.AddItem("PublishReadyToRunExclude", "Include", "Classlib.dll"); var testProjectInstance = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs index 3ccecdeab27c..34c084ed95ad 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs @@ -252,7 +252,7 @@ public void ILLink_respects_TrimmableAssembly(string targetFramework) var rid = EnvironmentInfo.GetCompatibleRid(targetFramework); var testProject = CreateTestProjectForILLinkTesting(targetFramework, projectName, referenceProjectName); - testProject.AdditionalItems["TrimmableAssembly"] = new Dictionary { ["Include"] = referenceProjectName }; + testProject.AddItem("TrimmableAssembly", "Include", referenceProjectName); var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); @@ -1492,11 +1492,11 @@ private void AddFeatureDefinition(TestProject testProject, string assemblyName) "; - - testProject.AdditionalItems["EmbeddedResource"] = new Dictionary { + + testProject.AddItem("EmbeddedResource", new Dictionary { ["Include"] = substitutionsFilename, ["LogicalName"] = substitutionsFilename - }; + }); } private void AddRuntimeConfigOption(XDocument project, bool trim) diff --git a/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs b/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs index 9ed324fb802e..aee64247adb1 100644 --- a/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs +++ b/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs @@ -9,7 +9,7 @@ using System.Runtime.CompilerServices; using FluentAssertions; - +using Microsoft.DotNet.Cli; using Microsoft.NET.Sdk.WorkloadManifestReader; using Microsoft.NET.TestFramework; @@ -114,7 +114,7 @@ public void ItShouldReturnManifestsFromTestHook() Directory.CreateDirectory(additionalManifestDirectory); var environmentMock = new EnvironmentMock(); - environmentMock.Add("DOTNETSDK_WORKLOAD_MANIFEST_ROOTS", additionalManifestDirectory); + environmentMock.Add(EnvironmentVariableNames.WORKLOAD_MANIFEST_ROOTS, additionalManifestDirectory); // Manifest in test hook directory Directory.CreateDirectory(Path.Combine(additionalManifestDirectory, sdkVersion, "Android")); @@ -144,7 +144,7 @@ public void ManifestFromTestHookShouldOverrideDefault() Directory.CreateDirectory(additionalManifestDirectory); var environmentMock = new EnvironmentMock(); - environmentMock.Add("DOTNETSDK_WORKLOAD_MANIFEST_ROOTS", additionalManifestDirectory); + environmentMock.Add(EnvironmentVariableNames.WORKLOAD_MANIFEST_ROOTS, additionalManifestDirectory); // Manifest in test hook directory Directory.CreateDirectory(Path.Combine(additionalManifestDirectory, sdkVersion, "Android")); @@ -176,7 +176,7 @@ public void ItSupportsMultipleTestHookFolders() Directory.CreateDirectory(additionalManifestDirectory2); var environmentMock = new EnvironmentMock(); - environmentMock.Add("DOTNETSDK_WORKLOAD_MANIFEST_ROOTS", additionalManifestDirectory1 + Path.PathSeparator + additionalManifestDirectory2); + environmentMock.Add(EnvironmentVariableNames.WORKLOAD_MANIFEST_ROOTS, additionalManifestDirectory1 + Path.PathSeparator + additionalManifestDirectory2); // Manifests in default directory @@ -214,7 +214,7 @@ public void IfTestHookFolderDoesNotExistItShouldBeIgnored() var additionalManifestDirectory = Path.Combine(_testDirectory, "AdditionalManifests"); var environmentMock = new EnvironmentMock(); - environmentMock.Add("DOTNETSDK_WORKLOAD_MANIFEST_ROOTS", additionalManifestDirectory); + environmentMock.Add(EnvironmentVariableNames.WORKLOAD_MANIFEST_ROOTS, additionalManifestDirectory); // Manifest in default directory Directory.CreateDirectory(Path.Combine(_manifestDirectory, "Android")); diff --git a/src/Tests/Microsoft.NET.TestFramework/ProjectConstruction/TestProject.cs b/src/Tests/Microsoft.NET.TestFramework/ProjectConstruction/TestProject.cs index 8b7d0f80b08c..0eae381a66e1 100644 --- a/src/Tests/Microsoft.NET.TestFramework/ProjectConstruction/TestProject.cs +++ b/src/Tests/Microsoft.NET.TestFramework/ProjectConstruction/TestProject.cs @@ -59,7 +59,7 @@ public TestProject([CallerMemberName] string name = null) public Dictionary AdditionalProperties { get; } = new Dictionary(); - public Dictionary> AdditionalItems { get; } = new Dictionary>(); + public List>> AdditionalItems { get; } = new (); public List> ProjectChanges { get; } = new List>(); @@ -391,6 +391,16 @@ public class {this.Name}Class } } + public void AddItem(string itemName, string attributeName, string attributeValue) + { + AddItem(itemName, new Dictionary() { { attributeName, attributeValue } } ); + } + + public void AddItem(string itemName, Dictionary attributes) + { + AdditionalItems.Add(new(itemName, attributes)); + } + public static bool ReferenceAssembliesAreInstalled(TargetDotNetFrameworkVersion targetFrameworkVersion) { var referenceAssemblies = ToolLocationHelper.GetPathToDotNetFrameworkReferenceAssemblies(targetFrameworkVersion); diff --git a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs index 55a7596098a9..0b371dc4daa8 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs @@ -63,7 +63,7 @@ public void GivenAdvertisingManifestUpdateItUpdatesWhenNoSentinalExists() [Fact] public void GivenAdvertisingManifestUpdateItUpdatesWhenDue() { - Func getEnvironmentVariable = (envVar) => envVar.Equals("DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS") ? "0" : string.Empty; + Func getEnvironmentVariable = (envVar) => envVar.Equals(EnvironmentVariableNames.WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS) ? "0" : string.Empty; (var manifestUpdater, var nugetDownloader, var testDir) = GetTestUpdater(getEnvironmentVariable: getEnvironmentVariable); var sentinalPath = Path.Combine(testDir, ".dotnet", _manifestSentinalFileName); @@ -96,7 +96,7 @@ public void GivenAdvertisingManifestUpdateItDoesNotUpdateWhenNotDue() [Fact] public void GivenAdvertisingManifestUpdateItHonorsDisablingEnvVar() { - Func getEnvironmentVariable = (envVar) => envVar.Equals("DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE") ? "true" : string.Empty; + Func getEnvironmentVariable = (envVar) => envVar.Equals(EnvironmentVariableNames.WORKLOAD_UPDATE_NOTIFY_DISABLE) ? "true" : string.Empty; (var manifestUpdater, var nugetDownloader, _) = GetTestUpdater(getEnvironmentVariable: getEnvironmentVariable); manifestUpdater.BackgroundUpdateAdvertisingManifestsWhenRequiredAsync().Wait(); diff --git a/src/Tests/dotnet.Tests/GivenThatICareAboutVBApps.cs b/src/Tests/dotnet.Tests/GivenThatICareAboutVBApps.cs index a4fa613c9403..c2eb11355b0f 100644 --- a/src/Tests/dotnet.Tests/GivenThatICareAboutVBApps.cs +++ b/src/Tests/dotnet.Tests/GivenThatICareAboutVBApps.cs @@ -36,7 +36,7 @@ Sub Main(args As String()) End Sub End Module "; - testProject.AdditionalItems["Import"] = new Dictionary { ["Remove"] = "System" }; + testProject.AddItem("Import", "Remove", "System"); var testInstance = _testAssetsManager.CreateTestProject(testProject); new BuildCommand(testInstance) diff --git a/src/Tests/dotnet.Tests/dotnet.Tests.csproj b/src/Tests/dotnet.Tests/dotnet.Tests.csproj index ab71536ca689..ce9183cb8dd7 100644 --- a/src/Tests/dotnet.Tests/dotnet.Tests.csproj +++ b/src/Tests/dotnet.Tests/dotnet.Tests.csproj @@ -52,7 +52,6 @@ - PreserveNewest