diff --git a/src/Assets/TestProjects/VSTestMSBuildParameters/Tests.cs b/src/Assets/TestProjects/VSTestMSBuildParameters/Tests.cs new file mode 100644 index 000000000000..d44bdcef33f3 --- /dev/null +++ b/src/Assets/TestProjects/VSTestMSBuildParameters/Tests.cs @@ -0,0 +1,21 @@ +// 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. + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections; +using System.Reflection; + +namespace TestNamespace +{ + [TestClass] + public class Tests + { + [TestMethod] + public void TestMSBuildParameters() + { + var assemblyInfoVersion = Assembly.GetExecutingAssembly().GetCustomAttribute().InformationalVersion; + Assert.AreEqual("1.2.3", assemblyInfoVersion); + } + } +} diff --git a/src/Assets/TestProjects/VSTestMSBuildParameters/VSTestMSBuildParameters.csproj b/src/Assets/TestProjects/VSTestMSBuildParameters/VSTestMSBuildParameters.csproj new file mode 100644 index 000000000000..b407ba549aa2 --- /dev/null +++ b/src/Assets/TestProjects/VSTestMSBuildParameters/VSTestMSBuildParameters.csproj @@ -0,0 +1,20 @@ + + + + + Exe + $(CurrentTargetFramework) + + + + + + + + + + + + + + diff --git a/src/Assets/TestProjects/WatchApp60/Program.cs b/src/Assets/TestProjects/WatchApp60/Program.cs new file mode 100644 index 000000000000..f3da51ab089b --- /dev/null +++ b/src/Assets/TestProjects/WatchApp60/Program.cs @@ -0,0 +1,24 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Diagnostics; +using System.Threading; + +namespace ConsoleApplication +{ + public class Program + { + public static void Main(string[] args) + { + Console.WriteLine("Started"); + // Process ID is insufficient because PID's may be reused. + Console.WriteLine($"Process identifier = {Process.GetCurrentProcess().Id}, {Process.GetCurrentProcess().StartTime:hh:mm:ss.FF}"); + if (args.Length > 0 && args[0] == "--no-exit") + { + Thread.Sleep(Timeout.Infinite); + } + Console.WriteLine("Exiting"); + } + } +} diff --git a/src/Assets/TestProjects/WatchApp60/WatchApp60.csproj b/src/Assets/TestProjects/WatchApp60/WatchApp60.csproj new file mode 100644 index 000000000000..841d5ad95c8d --- /dev/null +++ b/src/Assets/TestProjects/WatchApp60/WatchApp60.csproj @@ -0,0 +1,8 @@ + + + + net60 + exe + + + diff --git a/src/Assets/TestReleases/TestRelease/releases-index.json b/src/Assets/TestReleases/TestRelease/releases-index.json index d2441275d272..ded849e78bde 100644 --- a/src/Assets/TestReleases/TestRelease/releases-index.json +++ b/src/Assets/TestReleases/TestRelease/releases-index.json @@ -20,7 +20,7 @@ "latest-sdk": "3.1.404", "product": ".NET Core", "support-phase": "lts", - "eol-date": "2022-12-03", + "eol-date": null, "releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json" }, { @@ -96,4 +96,4 @@ "releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/1.0/releases.json" } ] -} \ No newline at end of file +} diff --git a/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs b/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs index eeab5275d5cc..0959abeed6ea 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs +++ b/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs @@ -4,27 +4,53 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Reflection; -using System.Reflection.Metadata; namespace Microsoft.Extensions.HotReload { internal sealed class HotReloadAgent : IDisposable { + private delegate void ApplyUpdateDelegate(Assembly assembly, ReadOnlySpan metadataDelta, ReadOnlySpan ilDelta, ReadOnlySpan pdbDelta); + private readonly Action _log; private readonly AssemblyLoadEventHandler _assemblyLoad; private readonly ConcurrentDictionary> _deltas = new(); private readonly ConcurrentDictionary _appliedAssemblies = new(); + private readonly ApplyUpdateDelegate? _applyUpdate; + private readonly string? _capabilities; private volatile UpdateHandlerActions? _handlerActions; public HotReloadAgent(Action log) { + var metadataUpdater = Type.GetType("System.Reflection.Metadata.MetadataUpdater, System.Runtime.Loader", throwOnError: false); + + if (metadataUpdater != null) + { + _applyUpdate = (ApplyUpdateDelegate?)metadataUpdater.GetMethod("ApplyUpdate", BindingFlags.Public | BindingFlags.Static, binder: null, + new[] { typeof(Assembly), typeof(ReadOnlySpan), typeof(ReadOnlySpan), typeof(ReadOnlySpan) }, modifiers: null)?.CreateDelegate(typeof(ApplyUpdateDelegate)); + + if (_applyUpdate != null) + { + try + { + _capabilities = metadataUpdater.GetMethod("GetCapabilities", BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null)?. + Invoke(obj: null, parameters: null) as string; + } + catch + { + } + } + } + _log = log; _assemblyLoad = OnAssemblyLoad; AppDomain.CurrentDomain.AssemblyLoad += _assemblyLoad; } + public string Capabilities => _capabilities ?? string.Empty; + private void OnAssemblyLoad(object? _, AssemblyLoadEventArgs eventArgs) { _handlerActions = null; @@ -107,7 +133,7 @@ internal void GetHandlerActions(UpdateHandlerActions handlerActions, Type handle Action CreateAction(MethodInfo update) { - Action action = update.CreateDelegate>(); + var action = (Action)update.CreateDelegate(typeof(Action)); return types => { try @@ -123,7 +149,7 @@ internal void GetHandlerActions(UpdateHandlerActions handlerActions, Type handle MethodInfo? GetUpdateMethod(Type handlerType, string name) { - if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, new[] { typeof(Type[]) }) is MethodInfo updateMethod && + if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, binder: null, new[] { typeof(Type[]) }, modifiers: null) is MethodInfo updateMethod && updateMethod.ReturnType == typeof(void)) { return updateMethod; @@ -178,6 +204,9 @@ static void Visit(Assembly[] assemblies, Assembly assembly, List sorte public void ApplyDeltas(IReadOnlyList deltas) { + Debug.Assert(Capabilities.Length > 0); + Debug.Assert(_applyUpdate != null); + for (var i = 0; i < deltas.Count; i++) { var item = deltas[i]; @@ -185,7 +214,7 @@ public void ApplyDeltas(IReadOnlyList deltas) { if (TryGetModuleId(assembly) is Guid moduleId && moduleId == item.ModuleId) { - MetadataUpdater.ApplyUpdate(assembly, item.MetadataDelta, item.ILDelta, ReadOnlySpan.Empty); + _applyUpdate(assembly, item.MetadataDelta, item.ILDelta, ReadOnlySpan.Empty); } } @@ -244,11 +273,13 @@ private Type[] GetMetadataUpdateTypes(IReadOnlyList deltas) public void ApplyDeltas(Assembly assembly, IReadOnlyList deltas) { + Debug.Assert(_applyUpdate != null); + try { foreach (var item in deltas) { - MetadataUpdater.ApplyUpdate(assembly, item.MetadataDelta, item.ILDelta, ReadOnlySpan.Empty); + _applyUpdate(assembly, item.MetadataDelta, item.ILDelta, ReadOnlySpan.Empty); } _log("Deltas applied."); diff --git a/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj b/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj index 3c2236e38d14..edb6aea1d2c0 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj +++ b/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj @@ -1,7 +1,10 @@  - - net7.0 + + netstandard2.1 MicrosoftAspNetCore false diff --git a/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs b/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs index d0bfb940826f..a944275f4b12 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs +++ b/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs @@ -13,6 +13,9 @@ internal sealed class StartupHook { private static readonly bool LogDeltaClientMessages = Environment.GetEnvironmentVariable("HOTRELOAD_DELTA_CLIENT_LOG_MESSAGES") == "1"; + /// + /// Invoked by the runtime when the containing assembly is listed in DOTNET_STARTUP_HOOKS. + /// public static void Initialize() { ClearHotReloadEnvironmentVariables(Environment.GetEnvironmentVariable, Environment.SetEnvironmentVariable); @@ -77,7 +80,7 @@ public static async Task ReceiveDeltas(HotReloadAgent hotReloadAgent) return; } - var initPayload = new ClientInitializationPayload { Capabilities = GetApplyUpdateCapabilities() }; + var initPayload = new ClientInitializationPayload(hotReloadAgent.Capabilities); Log("Writing capabilities: " + initPayload.Capabilities); initPayload.Write(pipeClient); @@ -88,19 +91,9 @@ public static async Task ReceiveDeltas(HotReloadAgent hotReloadAgent) hotReloadAgent.ApplyDeltas(update.Deltas); pipeClient.WriteByte((byte)ApplyResult.Success); - } - Log("Stopped received delta updates. Server is no longer connected."); - } - private static string GetApplyUpdateCapabilities() - { - var method = typeof(System.Reflection.Metadata.MetadataUpdater).GetMethod("GetCapabilities", BindingFlags.NonPublic | BindingFlags.Static, Type.EmptyTypes); - if (method is null) - { - return string.Empty; - } - return (string)method.Invoke(obj: null, parameters: null)!; + Log("Stopped received delta updates. Server is no longer connected."); } private static void Log(string message) diff --git a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs index f463f9840ebf..cbbc451738a4 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs @@ -74,16 +74,11 @@ public async ValueTask Apply(DotNetWatchContext context, ImmutableArray new UpdateDelta - { - ModuleId = c.ModuleId, - ILDelta = c.ILDelta.ToArray(), - MetadataDelta = c.MetadataDelta.ToArray(), - UpdatedTypes = c.UpdatedTypes.ToArray(), - }), - }; + var payload = new UpdatePayload(ImmutableArray.CreateRange(solutionUpdate, c => new UpdateDelta( + c.ModuleId, + metadataDelta: c.MetadataDelta.ToArray(), + ilDelta: c.ILDelta.ToArray(), + c.UpdatedTypes.ToArray()))); await payload.WriteAsync(_pipe, cancellationToken); await _pipe.FlushAsync(cancellationToken); diff --git a/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs b/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs index f4bcf66f4589..c114a7129005 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -14,8 +15,16 @@ internal readonly struct UpdatePayload { private static readonly byte Version = 1; - public IReadOnlyList Deltas { get; init; } + public IReadOnlyList Deltas { get; } + public UpdatePayload(IReadOnlyList deltas) + { + Deltas = deltas; + } + + /// + /// Called by the dotnet-watch. + /// public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) { await using var binaryWriter = new BinaryWriter(stream, Encoding.UTF8, leaveOpen: true); @@ -54,6 +63,9 @@ static void WriteIntArray(BinaryWriter binaryWriter, int[] values) } } + /// + /// Called by delta applier. + /// public static async ValueTask ReadAsync(Stream stream, CancellationToken cancellationToken) { using var binaryReader = new BinaryReader(stream, Encoding.UTF8, leaveOpen: true); @@ -68,21 +80,15 @@ public static async ValueTask ReadAsync(Stream stream, Cancellati var deltas = new UpdateDelta[count]; for (var i = 0; i < count; i++) { - var delta = new UpdateDelta - { - ModuleId = Guid.Parse(binaryReader.ReadString()), - MetadataDelta = await ReadBytesAsync(binaryReader, cancellationToken), - ILDelta = await ReadBytesAsync(binaryReader, cancellationToken), - UpdatedTypes = ReadIntArray(binaryReader), - }; + var moduleId = Guid.Parse(binaryReader.ReadString()); + var metadataDelta = await ReadBytesAsync(binaryReader, cancellationToken); + var ilDelta = await ReadBytesAsync(binaryReader, cancellationToken); + var updatedTypes = ReadIntArray(binaryReader); - deltas[i] = delta; + deltas[i] = new UpdateDelta(moduleId, metadataDelta: metadataDelta, ilDelta: ilDelta, updatedTypes); } - return new UpdatePayload - { - Deltas = deltas, - }; + return new UpdatePayload(deltas); static async ValueTask ReadBytesAsync(BinaryReader binaryReader, CancellationToken cancellationToken) { @@ -121,10 +127,18 @@ static int[] ReadIntArray(BinaryReader binaryReader) internal readonly struct UpdateDelta { - public Guid ModuleId { get; init; } - public byte[] MetadataDelta { get; init; } - public byte[] ILDelta { get; init; } - public int[] UpdatedTypes { get; init; } + public Guid ModuleId { get; } + public byte[] MetadataDelta { get; } + public byte[] ILDelta { get; } + public int[] UpdatedTypes { get; } + + public UpdateDelta(Guid moduleId, byte[] metadataDelta, byte[] ilDelta, int[] updatedTypes) + { + ModuleId = moduleId; + MetadataDelta = metadataDelta; + ILDelta = ilDelta; + UpdatedTypes = updatedTypes; + } } internal enum ApplyResult @@ -137,8 +151,16 @@ internal readonly struct ClientInitializationPayload { private const byte Version = 0; - public string Capabilities { get; init; } + public string Capabilities { get; } + + public ClientInitializationPayload(string capabilities) + { + Capabilities = capabilities; + } + /// + /// Called by delta applier. + /// public void Write(Stream stream) { using var binaryWriter = new BinaryWriter(stream, Encoding.UTF8, leaveOpen: true); @@ -147,6 +169,9 @@ public void Write(Stream stream) binaryWriter.Flush(); } + /// + /// Called by dotnet-watch. + /// public static ClientInitializationPayload Read(Stream stream) { using var binaryReader = new BinaryReader(stream, Encoding.UTF8, leaveOpen: true); @@ -157,7 +182,7 @@ public static ClientInitializationPayload Read(Stream stream) } var capabilities = binaryReader.ReadString(); - return new ClientInitializationPayload { Capabilities = capabilities }; + return new ClientInitializationPayload(capabilities); } } } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf index fdfe676aecee..abb285217aa7 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Povinné: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf index d5acdb2555af..029ebf633a67 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Erforderlich: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf index 48db6ab29a24..885f2fbb8b82 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Requerido: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf index f23cf75237c4..5ab0d5c68f6d 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Obligatoire : *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf index 157848b515cc..ae855c24ee02 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Obbligatorio: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf index 57d447556ad3..fee9177ac5af 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + 必須: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf index b224f784b147..ccb238823024 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + 필수: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf index aeb75b336357..f2b04af8e60d 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Wymagane: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf index 51f4ba4eaf2e..febfb2d500ff 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Necessário: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf index 617fd595b284..84cf82417a5e 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Обязательно: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf index a55b69bc9ad1..afd97e9f6f27 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + Gerekli: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf index b89d970d1f1b..3ad9ed6edf74 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + 必需: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf index 75c7dd0c0e91..817577bfb94b 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf @@ -89,7 +89,7 @@ Required: *true* - Required: *true* + 必要: *true* Indication that parameter is always required, do not translate "true". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf index 78db7f6e300f..d3f69364c600 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - U šablony {1} chybí povinná možnost {0}. + Pro šablonu {1} chybí povinné možnosti: {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + Operace se zrušila. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + Generování šablony skončilo s neočekávaným výsledkem: {0}. Podrobnosti: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf index 16d054dfd64e..1e6192268d65 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - Die obligatorische Option „{0}“ fehlt für die Vorlage „{1}“. + Für die Vorlage "{1}" fehlen obligatorische Optionen: {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + Der Vorgang wurde abgebrochen. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + Die Vorlagengenerierung wurde mit einem unerwarteten Ergebnis beendet: "{0}". Details: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf index cf2ebb4d7d44..42d81e382d88 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - Falta la opción obligatoria '{0}' para la plantilla '{1}'. + Faltan opciones obligatorias para la plantilla “{1}”: {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + Se canceló la operación. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + La generación de plantillas finalizó con un resultado inesperado: “{0}”. Detalles: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf index a1a5e2d8baf5..dc25d60ad690 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - L’option obligatoire '{0}' est manquante pour le modèle '{1}'. + Option(s) obligatoire(s) manquante(s) pour le modèle '{1}' : {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + L'opération a été annulée. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + La génération du modèle s’est terminée avec un résultat inattendu : '{0}'. Détails : {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf index 4937ac27c9c1..ef4461fb36e0 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - Manca '{0}' l'opzione obbligatoria per il modello '{1}'. + Opzioni obbligatorie mancanti per il modello '{1}': {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + Operazione annullata. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + La generazione del modello è terminata con un risultato imprevisto: '{0}'. Dettagli: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf index 6fbd183c9e24..74c93878da65 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - テンプレート '{1}' の必須パラメーター '{0}' がありません。 + テンプレート '{1}' の必須オプションがありません: {0}。 {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + 処理が取り消されました。 @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + テンプレートの生成が予期しない結果で終了しました: '{0} '。詳細: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf index 4405554d2b7b..d790c078d771 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - '{1}' 템플릿에 대한 '{0}' 필수 옵션이 없습니다. + 템플릿 '{1}'에 누락된 필수 옵션: {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + 작업이 취소되었습니다. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + 템플릿 생성이 예기치 않은 결과 '{0}'과(와) 함께 종료되었습니다. 세부 정보: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf index 733f933f916f..41472329ac45 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - W przypadku szablonu „{1}” brakuje opcji obowiązkowej „{0}”. + Brak obowiązkowych opcji dla szablonu „{1}”: {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + Operacja została anulowana. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + Generowanie szablonu zakończyło się z nieoczekiwanym wynikiem: „{0}”. Szczegóły: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf index 91e3b38dc217..4aa0bcd06c07 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - A opção obrigatória '{0}' está faltando para o modelo '{1}'. + Opções obrigatórias ausentes para o modelo '{1}': {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + A operação foi cancelada. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + Geração de modelo encerrada com resultado inesperado: '{0}'. Detalhes: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf index 2809c1a37a4e..f366e1191f2a 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - Отсутствует обязательный параметр "{0}" для шаблона "{1}". + Отсутствуют обязательные параметры для шаблона "{1}": {0}. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + Операция отменена. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + Создание шаблона завершилось с непредвиденным результатом: "{0}". Сведения: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf index c25725fb476d..da23b0994bf9 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - '{1}' şablonunda zorunlu '{0}' seçeneği eksik. + '{1}' şablonunda {0} zorunlu seçeneği eksik. {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + İşlem iptal edildi. @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + Şablon oluşturma beklenmeyen bir sonuçla sona erdi: '{0}'. Ayrıntılar: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf index 7c7d7b6c0080..7c746fdaea97 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - 模板“{1}”缺少必备选项“{0}”。 + 缺少模板“{1}”的必需选项: {0}。 {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + 操作被取消。 @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + 模板生成以意外结果结束:“{0}”。详细信息: {1} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf index ad9f8228a49a..ba5dfd26a5d6 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve Missing mandatory option(s) for the template '{1}': {0}. - 範本 '{1}'缺少強制選項 '{0}'。 + 遺漏範本 '{1}' 的強制選項: {0}。 {0} - comma-separated list of missing options, each option is quoted. @@ -550,7 +550,7 @@ The header is followed by the list of parameters and their errors (might be seve The operation was cancelled. - The operation was cancelled. + 作業已取消。 @@ -1064,7 +1064,7 @@ The header is followed by the list of parameters and their errors (might be seve Template generation ended with unexpected result: '{0}'. Details: {1} - Template generation ended with unexpected result: '{0}'. Details: {1} + 範本產生已結束,發生非預期的結果: '{0}'。詳細資料: {1} diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.cs.xlf index bf0d79c067f2..7303b851a2b4 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.cs.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Určuje typ výstupního formátu pro příkaz list packages. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.de.xlf index 7dfe774ae7cb..b5d113afc8f5 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.de.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Gibt den Ausgabeformattyp für den Befehl "list packages" an. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.es.xlf index 346843860d4b..9bd095cb036d 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.es.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Especifica el tipo de formato de salida para el comando Enumerar paquetes. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.fr.xlf index 489ed361570a..9e45bd64bf47 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.fr.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Spécifie le type de format de sortie pour la commande list packages. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.it.xlf index 5ffb32d36fb0..dd895a0631f8 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.it.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Specificare il tipo di formato di output per il comando list packages. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ja.xlf index 182362d95f84..dcf1127f0808 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ja.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + list packages コマンドの出力形式の種類を指定します。 diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ko.xlf index 94b652f59880..ea69d408da02 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ko.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + 목록 패키지 명령의 출력 형식 유형을 지정합니다. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pl.xlf index c4fdf4a6c726..7f459b7c4912 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pl.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Określa typ formatu wyjściowego polecenia pakietów listy. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pt-BR.xlf index 455995367633..b5504134935a 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.pt-BR.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Especifica o tipo de formato de saída para o comando list packages. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ru.xlf index 9a60981c49e6..3a90d68e7a14 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.ru.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Указывает тип формата вывода для команды перечисления пакетов. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.tr.xlf index ca7e9232baa2..be431156ea0e 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.tr.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + Liste paketleri komutunun çıkış biçimi türünü belirtir. diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hans.xlf index a0e6176f5497..eb7441db025c 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hans.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + 指定列表包命令的输出格式类型。 diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hant.xlf index dd90672e66c9..fa36048263e8 100644 --- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.zh-Hant.xlf @@ -14,7 +14,7 @@ Specifies the output format type for the list packages command. - Specifies the output format type for the list packages command. + 指定清單套件命令的輸出格式類型。 diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf index 8dad65910995..9be124eabca8 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Existuje několik spouštěcích profilů s názvy rozlišujícími malá a velká písmena, což není povoleno: {0} -Make the profile names distinct. +Nastavte odlišné názvy profilů. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + Profil spuštění s názvem {0} neexistuje. @@ -79,10 +79,8 @@ Make the profile names distinct. Unable to run your project Your project targets multiple frameworks. Specify which framework to run using '{0}'. - - Projekt nelze spustit. - Cílem projektu je více architektur. Pomocí parametru {0} určete, která architektura se má spustit. - + Projekt nelze spustit. +Cílem projektu je více architektur. Pomocí parametru {0} určete, která architektura se má spustit. @@ -90,12 +88,10 @@ Your project targets multiple frameworks. Specify which framework to run using ' Ensure you have a runnable project type and ensure '{0}' supports this project. A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. The current {1} is '{2}'. - - Projekt se nedá spustit. - Ověřte prosím, že máte spustitelný typ projektu, a zajistěte, aby tento projekt podporoval {0}. - Cílem spustitelného projektu by mělo být TFM (například net5.0) a jeho OutputType by měl být Exe. - Aktuální {1} je {2}. - + Projekt se nedá spustit. +Ověřte prosím, že máte spustitelný typ projektu, a zajistěte, aby tento projekt podporoval {0}. +Cílem spustitelného projektu by mělo být TFM (například net5.0) a jeho OutputType by měl být Exe. +Aktuální {1} je {2}. @@ -120,16 +116,14 @@ The current {1} is '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + Zadaný profil spuštění {0} se nenašel. The launch profile "{0}" could not be applied. {1} - - Profil spuštění {0} se nedá použít. - {1} - + Profil spuštění {0} se nedá použít. +{1} @@ -149,7 +143,7 @@ The current {1} is '{2}'. A profile with the specified name isn't a valid JSON object. - Profil se zadaným názvem se nenašel nebo nepředstavuje platný objekt JSON. + Profil se zadaným názvem není platný objekt JSON. @@ -165,10 +159,8 @@ The current {1} is '{2}'. An unexpected exception occurred while processing launch settings: {0} - - Při zpracování nastavení spuštění došlo k neočekávané výjimce: - {0} - + Při zpracování nastavení spuštění došlo k neočekávané výjimce: +{0} @@ -179,10 +171,8 @@ The current {1} is '{2}'. An error was encountered when reading launchSettings.json. {0} - - Při načítání launchSettings.json došlo k chybě. - {0} - + Při načítání launchSettings.json došlo k chybě. +{0} diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf index a99a4667fcd5..fd19fb256f8c 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Es gibt mehrere Startprofile mit Namen, bei denen die Groß-/Kleinschreibung beachtet wird. Dies ist nicht zulässig: {0} -Make the profile names distinct. +Erstellen Sie eindeutige Profilnamen. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + Es ist kein Startprofil mit dem Namen "{0}" vorhanden. @@ -116,7 +116,7 @@ Ein ausführbares Projekt muss ein ausführbares TFM (z. B. net5.0) und den Outp The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + Das angegebene Startprofil "{0}" wurde nicht gefunden. @@ -143,7 +143,7 @@ Ein ausführbares Projekt muss ein ausführbares TFM (z. B. net5.0) und den Outp A profile with the specified name isn't a valid JSON object. - Ein Profil mit dem angegebenen Namen wurde nicht gefunden oder ist kein gültiges JSON-Objekt. + Ein Profil mit dem angegebenen Namen ist kein gültiges JSON-Objekt. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf index 545ff41bf372..759be0339d91 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Hay varios perfiles de inicio con nombres que distinguen mayúsculas de minúsculas, lo que no está permitido: {0} -Make the profile names distinct. +Defina nombres de perfiles distintos. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + No existe ningún perfil de inicio con el nombre "{0}". @@ -116,7 +116,7 @@ El valor actual de {1} es "{2}". The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + No se ha podido encontrar el perfil de inicio especificado "{0}". @@ -143,7 +143,7 @@ El valor actual de {1} es "{2}". A profile with the specified name isn't a valid JSON object. - No se ha encontrado ningún perfil con el nombre especificado o el que se ha encontrado no es un objeto JSON válido. + Un perfil con el nombre especificado no es un objeto JSON válido. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf index c962d2c1947c..b6ff34f042b1 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Il existe plusieurs profils de lancement avec des noms sensibles à la casse, ce qui n'est pas autorisé : {0} -Make the profile names distinct. +faites en sorte que les noms de profil soient distincts. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + Un profil de lancement avec le nom '{0}' n'existe pas. @@ -116,7 +116,7 @@ Le {1} actuel est '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + Le profil de lancement spécifié '{0}' n'a pas pu être localisé. @@ -143,7 +143,7 @@ Le {1} actuel est '{2}'. A profile with the specified name isn't a valid JSON object. - Un profil avec le nom spécifié est introuvable ou n'est pas un objet JSON valide. + Un profil avec le nom spécifié n'est pas un objet JSON valide. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf index 76c3efd19a8a..b5c04a30dbc5 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Esistono diversi profili di avvio con nomi con distinzione tra maiuscole e minuscole, che non sono consentiti: {0} -Make the profile names distinct. +Rendi distinti i nomi dei profili. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + Non esiste un profilo di avvio con il nome '{0}'. @@ -116,7 +116,7 @@ Il valore corrente di {1} è '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + Il profilo di avvio specificato '{0}' non è stato trovato. @@ -143,7 +143,7 @@ Il valore corrente di {1} è '{2}'. A profile with the specified name isn't a valid JSON object. - Non è stato possibile trovare alcun profilo con il nome specificato oppure il profilo non è un oggetto JSON valido. + Un profilo con il nome specificato non è un oggetto JSON valido. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf index 71fefa31af8c..d26b85fa446e 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + 大文字と小文字が区別される名前の起動プロファイルがいくつかありますが、これは許可されていません。 {0} -Make the profile names distinct. +プロファイル名を区別できるようにします。 A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + '{0} ' という名前の起動プロファイルは存在しません。 @@ -116,7 +116,7 @@ The current {1} is '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + 指定された起動プロファイル '{0}' が見つかりませんでした。 @@ -143,7 +143,7 @@ The current {1} is '{2}'. A profile with the specified name isn't a valid JSON object. - 指定された名前のプロファイルは見つからないか、有効な JSON オブジェクトではありません。 + 指定された名前のプロファイルは、有効な JSON オブジェクトではありません。 diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf index eeea8ca15712..57230ef70d99 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + 대/소문자를 구분하는 이름을 가진 여러 시작 프로필이 있으며 이는 허용되지 않습니다. {0} -Make the profile names distinct. +고유한 프로필 이름을 사용하세요. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + 이름이 '{0}'인 시작 프로필이 없습니다. @@ -116,7 +116,7 @@ The current {1} is '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + 지정한 '{0}' 시작 프로필을 찾을 수 없습니다. @@ -143,7 +143,7 @@ The current {1} is '{2}'. A profile with the specified name isn't a valid JSON object. - 지정된 이름을 가진 프로필을 찾을 수 없거나 유효한 JSON 개체가 아닙니다. + 지정된 이름의 프로필은 유효한 JSON 개체가 아닙니다. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf index cdc509b1071c..ea58524fd62f 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Istnieje kilka profilów uruchamiania z nazwami z uwzględnieniem wielkości liter, co jest niedozwolone: {0} -Make the profile names distinct. +Rozróżnij nazwy profilów. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + Profil uruchamiania o nazwie „{0}” nie istnieje. @@ -116,7 +116,7 @@ Bieżący element {1}: „{2}”. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + Nie można odnaleźć określonego profilu uruchamiania „{0}”. @@ -143,7 +143,7 @@ Bieżący element {1}: „{2}”. A profile with the specified name isn't a valid JSON object. - Nie można znaleźć profilu o określonej nazwie lub nie jest to prawidłowy obiekt JSON. + Profil o określonej nazwie nie jest prawidłowym obiektem JSON. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf index a6c646f08a02..f7e3b44d8181 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Existem vários perfis de inicialização com nomes que diferenciam maiúsculas de minúsculas, o que não é permitido: {0} -Make the profile names distinct. +Diferencie os nomes dos perfis. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + Um perfil de lançamento com o nome '{0}' não existe. @@ -116,7 +116,7 @@ O {1} atual é '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + O perfil de inicialização especificado '{0}' não pôde ser localizado. @@ -143,7 +143,7 @@ O {1} atual é '{2}'. A profile with the specified name isn't a valid JSON object. - Um perfil com o nome especificado não pôde ser encontrado ou não é um objeto JSON válido. + Um perfil com o nome especificado não é um objeto JSON válido. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf index cf5078ea458f..2b4e88e396ae 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Существует несколько профилей, именах которых различаются только регистром. Это запрещено: {0} -Make the profile names distinct. +Сделайте имена профилей разными. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + Профиль запуска с именем "{0}" не существует. @@ -116,7 +116,7 @@ The current {1} is '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + Не удалось найти указанный профиль запуска "{0}". @@ -143,7 +143,7 @@ The current {1} is '{2}'. A profile with the specified name isn't a valid JSON object. - Не удается найти профиль с указанным именем, или он не является допустимым объектом JSON. + Профиль с указанным именем не является допустимым объектом JSON. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf index 149811f5fdd2..410c1e797735 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + Adı büyük/küçük harfe duyarlı olan birkaç başlatma profili var ama bu duruma izin verilmiyor: {0} -Make the profile names distinct. + Lütfen profil adlarını değiştirin. A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + '{0}' adlı bir başlatma profili yok. @@ -116,7 +116,7 @@ Geçerli {1}: '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + Belirtilen başlatma profili '{0}' bulunamadı. @@ -143,7 +143,7 @@ Geçerli {1}: '{2}'. A profile with the specified name isn't a valid JSON object. - Belirtilen isme sahip profil bulunamadı veya geçerli bir JSON nesnesi değil. + Belirtilen adla bir profil, geçerli bir JSON nesnesi değil. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf index 6c58723bbbfb..b00dd4b9c942 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + 有多个启动配置文件具有区分大小写的名称,这是不允许的: {0} -Make the profile names distinct. +使配置文件具有不同的名称。 A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + 名为“{0}”的启动配置文件不存在。 @@ -116,7 +116,7 @@ The current {1} is '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + 找不到指定的启动配置文件“{0}”。 @@ -143,7 +143,7 @@ The current {1} is '{2}'. A profile with the specified name isn't a valid JSON object. - 找不到具有指定名称的配置文件或该配置文件不是有效的 JSON 对象。 + 具有指定名称的配置文件不是有效的 JSON 对象。 diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf index 9296fef1c4c6..f35caf6eb791 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf @@ -36,14 +36,14 @@ There are several launch profiles with case-sensitive names, which isn't permitted: {0} Make the profile names distinct. - There are several launch profiles with case-sensitive names, which isn't permitted: + 數個啟動設定檔具有區分大小寫的名稱,這並不受允許: {0} -Make the profile names distinct. +請讓設定檔名稱相異。 A launch profile with the name '{0}' doesn't exist. - A launch profile with the name '{0}' doesn't exist. + 名稱為 '{0}' 的啟動設定檔不存在。 @@ -116,7 +116,7 @@ The current {1} is '{2}'. The specified launch profile '{0}' could not be located. - The specified launch profile '{0}' could not be located. + 找不到指定的啟動設定檔 '{0}'。 @@ -143,7 +143,7 @@ The current {1} is '{2}'. A profile with the specified name isn't a valid JSON object. - 找不到具有指定名稱的設定檔,或不是有效的 JSON 物件。 + 具有指定名稱的設定檔不是有效的 JSON 物件。 diff --git a/src/Cli/dotnet/commands/dotnet-test/Program.cs b/src/Cli/dotnet/commands/dotnet-test/Program.cs index 6396cf246302..ca6a565d478f 100644 --- a/src/Cli/dotnet/commands/dotnet-test/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-test/Program.cs @@ -7,6 +7,7 @@ using System.CommandLine.Parsing; using System.IO; using System.Linq; + using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.Utils; @@ -51,7 +52,7 @@ public static int Run(ParseResult parseResult) // Fix for https://github.com/Microsoft/vstest/issues/1453 // Run dll/exe directly using the VSTestForwardingApp - if (ContainsBuiltTestSources(parseResult)) + if (ContainsBuiltTestSources(args)) { return ForwardToVSTestConsole(parseResult, args, settings, testSessionCorrelationId); } @@ -118,29 +119,29 @@ private static TestCommand FromParseResult(ParseResult result, string[] settings "-nologo" }; - msbuildArgs.AddRange(result.OptionValuesToBeForwarded(TestCommandParser.GetCommand())); + // Extra msbuild properties won't be parsed and so end up in the UnmatchedTokens list. In addition to those + // properties, all the test settings properties are also considered as unmatched but we don't want to forward + // these as-is to msbuild. So we filter out the test settings properties from the unmatched tokens, + // by only taking values until the first item after `--`. (`--` is not present in the UnmatchedTokens). + var unMatchedNonSettingsArgs = settings.Length > 1 + ? result.UnmatchedTokens.TakeWhile(x => x != settings[1]) + : result.UnmatchedTokens; + + var parsedArgs = + result.OptionValuesToBeForwarded(TestCommandParser.GetCommand()) // all msbuild-recognized tokens + .Concat(unMatchedNonSettingsArgs); // all tokens that the test-parser doesn't explicitly track (minus the settings tokens) + + VSTestTrace.SafeWriteTrace(() => $"MSBuild args from forwarded options: {String.Join(", ", parsedArgs)}"); + msbuildArgs.AddRange(parsedArgs); if (settings.Any()) { - //workaround for correct -- logic - var commandArgument = result.GetValue(TestCommandParser.SlnOrProjectArgument); - if(!string.IsNullOrWhiteSpace(commandArgument) && !settings.Contains(commandArgument)) - { - msbuildArgs.Add(result.GetValue(TestCommandParser.SlnOrProjectArgument)); - } - // skip '--' and escape every \ to be \\ and every " to be \" to survive the next hop string[] escaped = settings.Skip(1).Select(s => s.Replace("\\", "\\\\").Replace("\"", "\\\"")).ToArray(); string runSettingsArg = string.Join(";", escaped); msbuildArgs.Add($"-property:VSTestCLIRunSettings=\"{runSettingsArg}\""); } - else - { - var argument = result.GetValue(TestCommandParser.SlnOrProjectArgument); - if(!string.IsNullOrWhiteSpace(argument)) - msbuildArgs.Add(argument); - } string verbosityArg = result.ForwardedOptionValues>(TestCommandParser.GetCommand(), "--verbosity")?.SingleOrDefault() ?? null; if (verbosityArg != null) @@ -227,13 +228,15 @@ internal static int RunArtifactPostProcessingIfNeeded(string testSessionCorrelat } } - private static bool ContainsBuiltTestSources(ParseResult parseResult) + private static bool ContainsBuiltTestSources(string[] args) { - string commandArgument = parseResult.GetValue(TestCommandParser.SlnOrProjectArgument); - - if (commandArgument is not null && (commandArgument.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || commandArgument.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))) + foreach (string arg in args) { - return true; + if (!arg.StartsWith("-") && + (arg.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || arg.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))) + { + return true; + } } return false; diff --git a/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs b/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs index fb155938e9cb..03b02284dac8 100644 --- a/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs @@ -17,12 +17,6 @@ internal static class TestCommandParser { public static readonly string DocsLink = "https://aka.ms/dotnet-test"; - public static readonly Argument SlnOrProjectArgument = new Argument(CommonLocalizableStrings.SolutionOrProjectArgumentName) - { - Description = CommonLocalizableStrings.SolutionOrProjectArgumentDescription, - Arity = ArgumentArity.ZeroOrOne - }; - public static readonly Option SettingsOption = new ForwardedOption(new string[] { "-s", "--settings" }, LocalizableStrings.CmdSettingsDescription) { ArgumentHelpName = LocalizableStrings.CmdSettingsFile @@ -135,7 +129,9 @@ private static Command ConstructCommand() { var command = new DocumentedCommand("test", DocsLink, LocalizableStrings.AppFullName); command.TreatUnmatchedTokensAsErrors = false; - command.AddArgument(SlnOrProjectArgument); + + // We are on purpose not capturing the solution, project or directory here. We want to pass it to the + // MSBuild command so we are letting it flow. command.AddOption(SettingsOption); command.AddOption(ListTestsOption); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index 13a687aaba72..c91858a2af4f 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -364,7 +364,7 @@ Workload updates are available. Run `dotnet workload list` for more information. - Доступны обновления рабочей нагрузки. Для получения дополнительных сведений запустите "список рабочих нагрузок DotNet". + Доступны обновления рабочей нагрузки. Для получения дополнительных сведений запустите `dotnet workload list`. diff --git a/src/Layout/redist/targets/OverlaySdkOnLKG.targets b/src/Layout/redist/targets/OverlaySdkOnLKG.targets index 8fa7471fd02f..e6295a720a6c 100644 --- a/src/Layout/redist/targets/OverlaySdkOnLKG.targets +++ b/src/Layout/redist/targets/OverlaySdkOnLKG.targets @@ -48,8 +48,7 @@ DestinationFiles="@(OverlaySDK->'$(RedistLayoutPath)\%(RecursiveDir)%(Filename)%(Extension)')" /> - $(RedistLayoutPath)/sdk/$(Version) - $(SdkOutputDirectory)\DotnetTools\dotnet-watch\$(Version)\tools\$(SdkTargetFramework)\any\ + $(RedistLayoutPath)sdk\$(Version) - - - - - - - - - $(ArtifactsDir)bin\redist\$(Configuration)\dotnet\sdk\$(Version)\DotnetTools\dotnet-watch\$(Version)\tools\$(SdkTargetFramework)\any\ - <_DotnetWatchInputFile Include="$(ArtifactsDir)bin\dotnet-watch\$(Configuration)\$(SdkTargetFramework)\**"/> + <_DotnetWatchBuildOutput Include="$(ArtifactsDir)bin\dotnet-watch\$(Configuration)\$(SdkTargetFramework)\**"/> + + + <_DotnetWatchInputFile Include="@(_DotnetWatchBuildOutput)" + Condition="'%(Filename)' != 'Microsoft.CodeAnalysis' and + '%(Filename)' != 'Microsoft.CodeAnalysis.resources' and + '%(Filename)' != 'Microsoft.CodeAnalysis.CSharp' and + '%(Filename)' != 'Microsoft.CodeAnalysis.CSharp.resources'"/> diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs index b7c932cc860d..6a45beb7ab51 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs @@ -17,7 +17,7 @@ public class SdkDirectoryWorkloadManifestProvider : IWorkloadManifestProvider private readonly SdkFeatureBand _sdkVersionBand; private readonly string [] _manifestDirectories; private static HashSet _outdatedManifestIds = new HashSet(StringComparer.OrdinalIgnoreCase) { "microsoft.net.workload.android", "microsoft.net.workload.blazorwebassembly", "microsoft.net.workload.ios", - "microsoft.net.workload.maccatalyst", "microsoft.net.workload.macos", "microsoft.net.workload.tvos" }; + "microsoft.net.workload.maccatalyst", "microsoft.net.workload.macos", "microsoft.net.workload.tvos", "microsoft.net.workload.mono.toolchain" }; private readonly Dictionary? _knownManifestIdsAndOrder; public SdkDirectoryWorkloadManifestProvider(string sdkRootPath, string sdkVersion, string? userProfileDir) diff --git a/src/Tasks/Common/MetadataKeys.cs b/src/Tasks/Common/MetadataKeys.cs index ee3d946bca4f..9e2d95a1db2f 100644 --- a/src/Tasks/Common/MetadataKeys.cs +++ b/src/Tasks/Common/MetadataKeys.cs @@ -141,5 +141,8 @@ internal static class MetadataKeys public const string XmlFilePath = "XmlFilePath"; public const string PdbExtension = ".pdb"; public const string PdbFilePath = "PdbFilePath"; + + // Dependencies design time + public const string Resolved = "Resolved"; } } diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index c63b02ee21db..063a7bbfca2a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: Možnost „--output“ se při sestavování řešení nepodporuje. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 2e10814edd36..912b08d61737 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: Die Option "--output" wird beim Erstellen einer Lösung nicht unterstützt. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 2f813bee9644..66cf4beccc2a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: La opción "--output" no es permitida mientras se crea una solución. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 26ec9ca537c7..c4235e06c4b3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: l’option «--output» n’est pas prise en charge lors de la génération d’une solution. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 3adb832065d1..c2380702b6b9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: l'opzione "--output" non è supportata durante la compilazione di una soluzione. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 7a5fc1f1682b..f3e68c87d9f2 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -4,212 +4,212 @@ NETSDK1076: AddResource can only be used with integer resource types. - NETSDK1076: AddResource can only be used with integer resource types. + NETSDK1076: AddResource は、整数のリソースの種類でのみ使用できます。 {StrBegin="NETSDK1076: "} NETSDK1183: Unable to optimize assemblies for Ahead of time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing and make sure to restore packages with the PublishAot property set to true. - NETSDK1183: Unable to optimize assemblies for Ahead of time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing and make sure to restore packages with the PublishAot property set to true. + NETSDK1183: Ahead Of Time コンパイル用にアセンブリを最適化できません: 有効なランタイム パッケージが見つかりませんでした。PublishAot プロパティを false に設定するか、公開時に、サポートされているランタイム識別子を使用してください。.NET 7 以降を対象とする場合は、必ず PublishAot プロパティを true に設定してパッケージを復元してください。 {StrBegin="NETSDK1183: "} NETSDK1070: The application configuration file must have root configuration element. - 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: 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: 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: 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: 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: 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} + NETSDK1177: エラー コード {1} が発生して AppHost に署名できませんでした: {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: 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: 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: 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: 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: 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: 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: 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: 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: At least one possible target framework must be specified. + NETSDK1001: 可能性のあるターゲット フレームワークを少なくとも 1 つ指定する必要があります。 {StrBegin="NETSDK1001: "} - - NETSDK1125: Publishing to a single-file is only supported for netcoreapp target. - NETSDK1125: Publishing to a single-file is only supported for netcoreapp target. - {StrBegin="NETSDK1125: "} - 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: 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: 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: 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: 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: 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: 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: 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: 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: Publishing to a single-file is only supported for executable applications. + NETSDK1099: 単一ファイルへの公開は実行可能アプリケーションに対してのみサポートされています。 {StrBegin="NETSDK1099: "} - - 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: 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. - {StrBegin="NETSDK1097: "} - NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: ソリューションのビルド時に "--output" オプションはサポートされていません。 {StrBegin="NETSDK1194: "} 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: 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} 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: 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: 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: 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: 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}'. - 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. - 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}'. - Choosing '{0}' because file version '{1}' is greater than '{2}'. + ファイルのバージョン '{1}' が '{2}' より大きいため、'{0}' を選択しています。 Choosing '{0}' because it is a platform item. - Choosing '{0}' because it is a platform item. + '{0}' はプラットフォーム項目であるため、これを選択しています。 Choosing '{0}' because it comes from a package that is preferred. - 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: 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. @@ -217,329 +217,329 @@ 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: 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: 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. + NETSDK1167: 単一ファイル バンドルの圧縮は、.NET6 またはそれ以降の発行時にのみサポートされます。 {StrBegin="NETSDK1167: "} NETSDK1176: Compression in a single file bundle is only supported when publishing a self-contained application. - NETSDK1176: Compression in a single file bundle is only supported when publishing a self-contained application. + NETSDK1176: 単一ファイル バンドルの圧縮は、内蔵アプリケーションの発行時にのみサポートされます。 {StrBegin="NETSDK1176: "} NETSDK1133: There was conflicting information about runtime packs available for {0}: {1} - NETSDK1133: There was conflicting information about runtime packs available for {0}: + NETSDK1133: {0} で使用可能なランタイム パックの情報が競合しています: {1} {StrBegin="NETSDK1133: "} NETSDK1014: Content item for '{0}' sets '{1}', but does not provide '{2}' or '{3}'. - 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: 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. - Could not determine winner because '{0}' does not exist. + '{0}' が存在しないため勝者を判別できませんでした。 Could not determine winner due to equal file and assembly versions. - Could not determine winner due to equal file and assembly versions. + ファイルとアセンブリのバージョンが等しいため、勝者を判別できませんでした。 Could not determine a winner because '{0}' has no file version. - Could not determine a winner because '{0}' has no file version. + '{0}' にファイルのバージョンがないため勝者を判別できませんでした。 Could not determine a winner because '{0}' is not an assembly. - Could not determine a winner because '{0}' is not an assembly. + '{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. + NETSDK1181: パックバージョンの取得エラー。パック '{0}' がワークロード マニフェストに存在しませんでした。 {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. + NETSDK1042: 存在しなかったため、'{0}' から PlatformManifest を読み込めませんでした。 {StrBegin="NETSDK1042: "} NETSDK1120: C++/CLI projects targeting .NET Core require a target framework of at least 'netcoreapp3.1'. - 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. + NETSDK1158: 必要な '{0}' メタデータが Crossgen2Tool 項目にありません。 {StrBegin="NETSDK1158: "} NETSDK1126: Publishing ReadyToRun using Crossgen2 is only supported for self-contained applications. - 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. + NETSDK1155: Crossgen2Tool 実行可能ファイル '{0}' が見つかりません。 {StrBegin="NETSDK1155: "} NETSDK1154: Crossgen2Tool must be specified when UseCrossgen2 is set to true. - NETSDK1154: Crossgen2Tool must be specified when UseCrossgen2 is set to true. + NETSDK1154: UseCrossgen2 が true に設定されている場合は Crossgen2Tool を指定する必要があります。 {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. + NETSDK1166: 複合モードを使用して Crossgen2 で .NET 5 を対象に発行する場合、シンボルを生成できません。 {StrBegin="NETSDK1166: "} NETSDK1160: CrossgenTool executable '{0}' not found. - NETSDK1160: CrossgenTool executable '{0}' not found. + NETSDK1160: CrossgenTool 実行可能ファイル '{0}' が見つかりません。 {StrBegin="NETSDK1160: "} NETSDK1153: CrossgenTool not specified in PDB compilation mode. - NETSDK1153: CrossgenTool not specified in PDB compilation mode. + NETSDK1153: PDB コンパイル モードで CrossgenTool が指定されていません。 {StrBegin="NETSDK1153: "} NETSDK1159: CrossgenTool must be specified when UseCrossgen2 is set to false. - NETSDK1159: CrossgenTool must be specified when UseCrossgen2 is set to false. + NETSDK1159: UseCrossgen2 が false に設定されている場合は CrossgenTool を指定する必要があります。 {StrBegin="NETSDK1159: "} NETSDK1161: DiaSymReader library '{0}' not found. - NETSDK1161: DiaSymReader library '{0}' not found. + NETSDK1161: DiaSymReader ライブラリ '{0}' が見つかりません。 {StrBegin="NETSDK1161: "} NETSDK1156: .NET host executable '{0}' not found. - NETSDK1156: .NET host executable '{0}' not found. + NETSDK1156: .NET ホストの実行可能ファイル '{0}' が見つかりません。 {StrBegin="NETSDK1156: "} NETSDK1055: DotnetTool does not support target framework lower than netcoreapp2.1. - NETSDK1055: DotnetTool does not support target framework lower than netcoreapp2.1. + NETSDK1055: DotnetTool は、netcoreapp2.1 未満のターゲット フレームワークをサポートしていません。 {StrBegin="NETSDK1055: "} NETSDK1054: only supports .NET Core. - 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: 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: 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}. - NETSDK1152: Found multiple publish output files with the same relative path: {0}. + NETSDK1152: 同じ相対パスの発行出力ファイルが複数見つかりました: {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: 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. + NETSDK1169: 同じリソース ID {0} が2つのタイプ ライブラリ '{1}' と '{2}' に指定されました。タイプ ライブラリ ID の重複は許可されていません。 {StrBegin="NETSDK1169: "} Encountered conflict between '{0}' and '{1}'. - Encountered conflict between '{0}' and '{1}'. + '{0}' と '{1}' の間で競合が発生しました。 NETSDK1051: Error parsing FrameworkList from '{0}'. {1} '{2}' was invalid. - 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: 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: 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: Error reading assets file: {0} + NETSDK1060: アセット ファイルの読み取りでエラーが発生しました: {0} {StrBegin="NETSDK1060: "} NETSDK1111: Failed to delete output apphost: {0} - NETSDK1111: Failed to delete output apphost: {0} + NETSDK1111: 出力 apphost を削除できませんでした: {0} {StrBegin="NETSDK1111: "} NETSDK1077: Failed to lock resource. - NETSDK1077: Failed to lock resource. + NETSDK1077: リソースをロックできませんでした。 {StrBegin="NETSDK1077: "} NETSDK1030: Given file name '{0}' is longer than 1024 bytes - 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + アセンブリのサイズを最適化すると、アプリの動作が変わる可能性があります。公開した後に必ずテストしてください。https://aka.ms/dotnet-illink を参照してください Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + アセンブリのサイズを最適化しています。このプロセスには時間がかかる場合があります。 NETSDK1191: A runtime identifier for the property '{0}' couldn't be inferred. Specify a rid explicitly. - NETSDK1191: A runtime identifier for the property '{0}' couldn't be inferred. Specify a rid explicitly. + NETSDK1191: プロパティ '{0}' のランタイム識別子を推論できませんでした。RID を明示的に指定してください。 {StrBegin="NETSDK1191: "} NETSDK1020: Package Root {0} was incorrectly given for Resolved library {1} - 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: 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. + NETSDK1163: 入力アセンブリ '{0}' が見つかりません。 {StrBegin="NETSDK1163: "} NETSDK1003: Invalid framework name: '{0}'. - 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: 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: 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: 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: 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} is not a valid TargetPlatformVersion for {1}. Valid versions include: + 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. + NETSDK1173: 指定済みのタイプ ライブラリ '{0}' の形式が無効です。 {StrBegin="NETSDK1173: "} NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. + NETSDK1170: タイプ ライブラリ '{1}' の指定されたタイプ ライブラリ ID '{0}' が無効です。ID は 65536 未満の正の整数である必要があります。 {StrBegin="NETSDK1170: "} NETSDK1157: JIT library '{0}' not found. - NETSDK1157: JIT library '{0}' not found. + NETSDK1157: JIT ライブラリ '{0}' が見つかりません。 {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: 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 @@ -547,436 +547,436 @@ The following are names of parameters or literal values and should not be transl NETSDK1008: Missing '{0}' metadata on '{1}' item '{2}'. - 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). + NETSDK1164: PDB 生成モードの出力 PDB パス (OutputPDBImage メタデータ) がありません。 {StrBegin="NETSDK1164: "} NETSDK1165: Missing output R2R image path (OutputR2RImage metadata). - NETSDK1165: Missing output R2R image path (OutputR2RImage metadata). + NETSDK1165: 出力 R2R イメージ パス (OutputR2RImage メタデータ) がありません。 {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. + NETSDK1171: タイプ ライブラリ '{0}' に複数のタイプ ライブラリが指定されているため、65536 未満の整数の ID を指定する必要があります。 {StrBegin="NETSDK1171: "} NETSDK1021: More than one file found for {0} - 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: 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: 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: "} NETSDK1182: Targeting .NET 6.0 or higher in Visual Studio 2019 is not supported. - NETSDK1182: Targeting .NET 6.0 or higher in Visual Studio 2019 is not supported. + NETSDK1182: Visual Studio 2019 では .NET 6.0 以降をターゲットにすることはできません。 {StrBegin="NETSDK1182: "} NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. - NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Visual Studio 2022 17.3 では .NET 7.0 以上をターゲットにすることはできません。 {StrBegin="NETSDK1192: "} NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. - 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: 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: 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: 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: No runtime pack information was available for {0}. + NETSDK1132: {0} で使用可能なランタイム パックの情報がありません。 {StrBegin="NETSDK1132: "} NETSDK1128: COM hosting does not support self-contained deployments. - 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: 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: 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: 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: 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: 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: 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}' は自己完結型実行可能ファイルです。 自己完結型の実行可能ファイルは、自己完結型以外の実行可能ファイルでは参照できません。詳細については、「https://aka.ms/netsdk1151」を参照してください {StrBegin="NETSDK1151: "} NETSDK1162: PDB generation: R2R executable '{0}' not found. - NETSDK1162: PDB generation: R2R executable '{0}' not found. + NETSDK1162: PDB 生成: R2R 実行可能ファイル '{0}' が見つかりません。 {StrBegin="NETSDK1162: "} NETSDK1190: To use '{0}' in solution projects, you must set the environment variable '{1}' (to true). This will increase the time to complete the operation. - NETSDK1190: To use '{0}' in solution projects, you must set the environment variable '{1}' (to true). This will increase the time to complete the operation. + NETSDK1190: ソリューション プロジェクトで '{0}' を使用するには、環境変数 '{1}' を (true に) 設定する必要があります。これにより、操作を完了するまでの時間が長くなります。 {StrBegin="NETSDK1190: "} NETSDK1053: Pack as tool does not support self contained. - 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 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: "} NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: パッケージ {0} {1} にロケール '{2}' のリソースがあります。大文字と小文字の区別に関する問題を防ぐために、このロケールはビルド内では標準形式 '{3}' に正規化されています。大文字と小文字の区別に関する問題があることをパッケージの作成者に通知するようお勧めします。 Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: パッケージ {0} {1} にロケール '{2}' のリソースがあります。このロケールは .NET では認識されません。無効なロケールを使用していると思われることをパッケージ作成者に通知するようお勧めします。 Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string 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: 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: 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: 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: "} NETSDK1174: Placeholder - NETSDK1174: Placeholder + NETSDK1174: プレースホルダー {StrBegin="NETSDK1174: "} - This string is not used here, but is a placeholder for the error code, which is used by the "dotnet run" command. NETSDK1189: Prefer32Bit is not supported and has no effect for netcoreapp target. - NETSDK1189: Prefer32Bit is not supported and has no effect for netcoreapp target. + NETSDK1189: Prefer32Bit はサポートされておらず、netcoreapp ターゲットには影響しません。 {StrBegin="NETSDK1189: "} NETSDK1011: Assets are consumed from project '{0}', but no corresponding MSBuild project path was found in '{1}'. - 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: 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: 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 compilation will be skipped because it is only supported for .NET Core 3.0 or higher. + NETSDK1122: ReadyToRun コンパイルは、.NET Core 3.0 以降でのみサポートされているため、スキップされます。 {StrBegin="NETSDK1122: "} NETSDK1193: If PublishSelfContained is set, it must be either true or false. The value given was '{0}'. - NETSDK1193: If PublishSelfContained is set, it must be either true or false. The value given was '{0}'. + NETSDK1193: PublishSelfContained が設定されている場合、true または false のいずれかにする必要があります。指定された値は '{0}' でした。 {StrBegin="NETSDK1193: "} NETSDK1123: Publishing an application to a single-file requires .NET Core 3.0 or higher. - 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: 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: 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: 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. - 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 and make sure to restore packages with the PublishReadyToRun property set to 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 and make sure to restore packages with the PublishReadyToRun property set to true. + NETSDK1094: アセンブリのパフォーマンスを最適化できません: 有効なランタイム パッケージが見つかりませんでした。PublishReadyToRun プロパティを false に設定するか、公開時に、サポートされているランタイム識別子を使用してください。.NET 6 以降を対象とする場合は、必ず PublishReadyToRun プロパティを true に設定してパッケージを復元してください。 {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: 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: 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: The specified RuntimeIdentifier '{0}' is not recognized. + NETSDK1083: 指定された RuntimeIdentifier '{0}' は認識されていません。 {StrBegin="NETSDK1083: "} NETSDK1028: Specify a RuntimeIdentifier - 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: 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: The runtime pack for {0} was not downloaded. Try running a NuGet restore with the RuntimeIdentifier '{1}'. + NETSDK1112: {0} のランタイム パックがダウンロードされませんでした。RuntimeIdentifier '{1}' で NuGet 復元を実行してみてください。 {StrBegin="NETSDK1112: "} NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. + NETSDK1185: FrameworkReference '{0}' のランタイム パックは使用できませんでした。DisableTransitiveFrameworkReferenceDownloads が true に設定されたことが原因である可能性があります。 {StrBegin="NETSDK1185: "} 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: 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}' は自己完結型以外の実行可能ファイルです。 自己完結型以外の実行可能ファイルは、自己完結型の実行可能ファイルでは参照できません。詳細については、「https://aka.ms/netsdk1150」を参照してください {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. + NETSDK1179: '--runtime' を使用する場合は、'--self-contained' または '--no-self-contained' オプションのいずれかが必要です。 {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. - 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: 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: 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: 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: The targeting pack {0} is not installed. Please restore and try again. + NETSDK1127: ターゲット パック {0} がインストールされていません。復元して、もう一度お試しください。 {StrBegin="NETSDK1127: "} NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. + NETSDK1184: FrameworkReference '{0}' の Targeting Pack は使用できませんでした。DisableTransitiveFrameworkReferenceDownloads が true に設定されたことが原因である可能性があります。 {StrBegin="NETSDK1184: "} 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. + NETSDK1175: Windows フォームに関して、トリミングの有効化はサポートおよび推奨されていません。詳細については、https://aka.ms/dotnet-illink/windows-forms を参照してください。 {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. + NETSDK1168: WPF に関して、トリミングの有効化はサポートおよび推奨されていません。詳細については、https://aka.ms/dotnet-illink/wpf を参照してください。 {StrBegin="NETSDK1168: "} NETSDK1172: The provided type library '{0}' does not exist. - NETSDK1172: The provided type library '{0}' does not exist. + NETSDK1172: 指定済みのタイプ ライブラリ '{0}' は存在しません。 {StrBegin="NETSDK1172: "} NETSDK1016: Unable to find resolved path for '{0}'. - 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. - 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: 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: The FrameworkReference '{0}' was not recognized + NETSDK1073: FrameworkReference '{0}' は認識されませんでした {StrBegin="NETSDK1073: "} NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). + NETSDK1186: このプロジェクトでは、プロジェクトまたは NuGet パッケージ参照を介して Maui Essentials に依存していますが、その依存関係が明示的に宣言されていません。このプロジェクトをビルドするには、UseMauiEssentials プロパティを true に設定する必要があります (必要に応じて、Maui ワークロードをインストールしてください)。 {StrBegin="NETSDK1186: "} 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: 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: 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: 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} 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: 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: 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: 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: 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: 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: "} NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy + NETSDK1057: プレビュー版の .NET を使用しています。https://aka.ms/dotnet-support-policy をご覧ください NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. - 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} 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: {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 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 desktop applications are only supported on .NET Core 3.0 or higher. + NETSDK1105: Windows デスクトップ アプリケーションは、.NET Core 3.0 以降でのみサポートされています。 {StrBegin="NETSDK1105: "} NETSDK1100: To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true. - NETSDK1100: To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true. + NETSDK1100: このオペレーティング システムで Windows を対象とするプロジェクトをビルドするには、EnableWindowsTargeting プロパティを true に設定します。 {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: 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. + NETSDK1148: 参照アセンブリは、より新しいバージョンの Microsoft.Windows.SDK.NET.dll を使用してコンパイルされています。このアセンブリを参照するには、より新しい .NET SDK に更新してください。 {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. + NETSDK1178: プロジェクトは、このインストールで使用可能なワークロードのいずれにも存在しない次のワークロード パックに依存しています。{0} +別のオペレーティング システムまたはアーキテクチャでプロジェクトをビルドするか、.NET SDK を更新することが必要な場合があります。 {StrBegin="NETSDK1178: "} NETSDK1147: To build this project, the following workloads must be installed: {0} To install these workloads, run the following command: dotnet workload restore - NETSDK1147: To build this project, the following workloads must be installed: {0} -To install these workloads, run the following command: dotnet workload restore + NETSDK1147: このプロジェクトをビルドするには、次のワークロードをインストールする必要があります: {0} +これらのワークロードをインストールするには、次のコマンドを実行します: dotnet workload restore {StrBegin="NETSDK1147: "} LOCALIZATION: Do not localize "dotnet workload restore" diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 533e48ae1e90..9891d713cd30 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: 솔루션을 빌드할 때는 "--output" 옵션이 지원되지 않습니다. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 1e5c512bdf0c..f10fb444ea1a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: opcja „--output” nie jest obsługiwana podczas tworzenia rozwiązania. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 157964c8d6f4..fff2b4671687 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: a opção "--output" não é suportada ao criar uma solução. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 83cc3bfe4eb2..0f9eba0d7c98 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: параметр "--output" не поддерживается при создании решения. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 79df93c2f246..4b9514b7663c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: Çözüm oluşturulurken "--output" seçeneği desteklenmez. {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 9219491ae5af..270f7b275fb7 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: 生成解决方案时不支持 “--output” 选项。 {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 6234740bd9e4..46922b2d9173 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -144,7 +144,7 @@ NETSDK1194: The "--output" option isn't supported when building a solution. - NETSDK1194: The "--output" option isn't supported when building a solution. + NETSDK1194: 建置解決方案時不支援 "--output" 選項。 {StrBegin="NETSDK1194: "} diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs index 9d078eb466e3..bbacf673e4d8 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs @@ -21,9 +21,9 @@ public class GivenAResolvePackageDependenciesTask [Theory] [MemberData(nameof(ItemCounts))] - public void ItRaisesLockFileToMSBuildItems(string projectName, int[] counts, bool emitLegacyAssetsFileItems) + public void ItRaisesLockFileToMSBuildItems(string projectName, int[] counts) { - var task = GetExecutedTaskFromPrefix(projectName, out _, emitLegacyAssetsFileItems); + var task = GetExecutedTaskFromPrefix(projectName, out _); task.PackageDefinitions .Count().Should().Be(counts[0]); task.FileDefinitions .Count().Should().Be(counts[1]); @@ -40,36 +40,16 @@ public static IEnumerable ItemCounts { new object[] { "dotnet.new", - new int[] { 110, 2536, 1, 846, 73 }, - true - }, - new object[] { - "dotnet.new", - new int[] { 110, 0, 0, 846, 0 }, - false - }, - new object[] { - "simple.dependencies", - new int[] { 113, 2613, 1, 878, 94 }, - true + new int[] { 110, 2536, 1, 845, 75 }, }, new object[] { "simple.dependencies", - new int[] { 113, 0, 0, 878, 0 }, - false + new int[] { 113, 2613, 1, 877, 96 }, }, }; } } - [Fact] - public void ItOmitsLegacyItemsByDefault() - { - var task = new ResolvePackageDependencies(); - - task.EmitLegacyAssetsFileItems.Should().Be(false); - } - [Theory] [InlineData("dotnet.new")] [InlineData("simple.dependencies")] @@ -584,8 +564,7 @@ public void ItAddsAnalyzerMetadataAndFileDependencies() { ProjectAssetsFile = lockFile.Path, ProjectPath = null, - ProjectLanguage = projectLanguage, // set language - EmitLegacyAssetsFileItems = true + ProjectLanguage = projectLanguage // set language }; task.Execute().Should().BeTrue(); @@ -669,8 +648,7 @@ public void ItFiltersAnalyzersByProjectLanguage() { ProjectAssetsFile = lockFile.Path, ProjectPath = null, - ProjectLanguage = projectLanguage, // set language - EmitLegacyAssetsFileItems = true + ProjectLanguage = projectLanguage // set language }; task.Execute().Should().BeTrue(); @@ -839,19 +817,19 @@ public void ItDoesNotThrowOnCrossTargetingWithTargetPlatforms() GetExecutedTaskFromContents(lockFileContent, out _); // Task should not fail on matching framework names } - private static ResolvePackageDependencies GetExecutedTaskFromPrefix(string lockFilePrefix, out LockFile lockFile, bool emitLegacyAssetsFileItems = true, string target = null) + private static ResolvePackageDependencies GetExecutedTaskFromPrefix(string lockFilePrefix, out LockFile lockFile, string target = null) { lockFile = TestLockFiles.GetLockFile(lockFilePrefix); - return GetExecutedTask(lockFile, emitLegacyAssetsFileItems, target); + return GetExecutedTask(lockFile, target); } - private static ResolvePackageDependencies GetExecutedTaskFromContents(string lockFileContents, out LockFile lockFile, bool emitLegacyAssetsFileItems = true, string target = null) + private static ResolvePackageDependencies GetExecutedTaskFromContents(string lockFileContents, out LockFile lockFile, string target = null) { lockFile = TestLockFiles.CreateLockFile(lockFileContents); - return GetExecutedTask(lockFile, emitLegacyAssetsFileItems, target); + return GetExecutedTask(lockFile, target); } - private static ResolvePackageDependencies GetExecutedTask(LockFile lockFile, bool emitLegacyAssetsFileItems, string target) + private static ResolvePackageDependencies GetExecutedTask(LockFile lockFile, string target) { var resolver = new MockPackageResolver(_packageRoot); @@ -860,7 +838,6 @@ private static ResolvePackageDependencies GetExecutedTask(LockFile lockFile, boo ProjectAssetsFile = lockFile.Path, ProjectPath = _projectPath, ProjectLanguage = null, - EmitLegacyAssetsFileItems = emitLegacyAssetsFileItems, TargetFramework = target }; diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs index 84e2088d439a..d708ee4b05cc 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs @@ -1,399 +1,656 @@ // 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. +using System; using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using FluentAssertions; using Microsoft.Build.Framework; +using Microsoft.NET.TestFramework; using Xunit; +using Xunit.Abstractions; +using static Microsoft.NET.Build.Tasks.ResolvePackageAssets; namespace Microsoft.NET.Build.Tasks.UnitTests { - public class GivenThatWeWantToGetDependenciesViaDesignTimeBuild + public class GivenThatWeWantToGetDependenciesViaDesignTimeBuild : SdkTest { - [Fact] - public void ItShouldNotReturnPackagesWithUnknownTypes() + public GivenThatWeWantToGetDependenciesViaDesignTimeBuild(ITestOutputHelper log) : base(log) { - var task = new PreprocessPackageDependenciesDesignTime - { - TargetFramework = "net45", - DefaultImplicitPackages = string.Empty, - PackageDefinitions = new ITaskItem[] - { - new MockTaskItem( - itemSpec: "mockPackageNoType/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageNoType" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some path" } - }), - new MockTaskItem( - itemSpec: "mockPackageUnknown/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageUnknown" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "qqqq" } - }) - }, - PackageDependencies = new ITaskItem[] - { - new MockTaskItem( - itemSpec: "mockPackageNoType/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageUnknown/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }) - } - }; - - Assert.True(task.Execute()); - - Assert.Empty(task.PackageDependenciesDesignTime); } [Fact] - public void ItShouldReturnUnresolvedPackageDependenciesWithTypePackage() + public void ItShouldIgnoreAllDependenciesWithTypeNotEqualToPackageOrUnresolved() { - var task = new PreprocessPackageDependenciesDesignTime - { - TargetFramework = "net45", - DefaultImplicitPackages = string.Empty, - PackageDefinitions = new ITaskItem[] - { - new MockTaskItem( - itemSpec: "mockPackageUnresolved/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageUnresolved" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "" }, - { MetadataKeys.Type, "Unresolved" }, - { MetadataKeys.DiagnosticLevel, "Warning" } - }) - }, - PackageDependencies = new ITaskItem[] - { - new MockTaskItem( - itemSpec: "mockPackageUnresolved/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }) - } - }; - - Assert.True(task.Execute()); - - var item = Assert.Single(task.PackageDependenciesDesignTime); - - Assert.Equal("mockPackageUnresolved/1.0.0", item.ItemSpec); - Assert.Equal("mockPackageUnresolved", item.GetMetadata(MetadataKeys.Name)); - Assert.Equal("1.0.0", item.GetMetadata(MetadataKeys.Version)); - Assert.Equal("some path", item.GetMetadata(MetadataKeys.Path)); - Assert.Equal("", item.GetMetadata(MetadataKeys.ResolvedPath)); - Assert.Equal("Warning", item.GetMetadata(MetadataKeys.DiagnosticLevel)); - Assert.False(item.GetBooleanMetadata(MetadataKeys.IsImplicitlyDefined)); - Assert.False(item.GetBooleanMetadata(PreprocessPackageDependenciesDesignTime.ResolvedMetadata)); + var testRoot = _testAssetsManager.CreateTestDirectory().Path; + Log.WriteLine("Test root: " + testRoot); + + string projectAssetsJsonPath = Path.Combine(testRoot, "project.assets.json"); + string projectCacheAssetsJsonPath = Path.Combine(testRoot, "projectassets.cache"); + // project.assets.json + var assetsContent = CreateBasicProjectAssetsFile(testRoot, package2Type: "unresolved", package3Type: "unknown"); + + File.WriteAllText(projectAssetsJsonPath, assetsContent); + var task = InitializeTask(testRoot, out _); + task.ProjectAssetsFile = projectAssetsJsonPath; + task.ProjectAssetsCacheFile = projectCacheAssetsJsonPath; + task.TargetFramework = "net6.0"; + + task.Execute(); + + Assert.Equal(2, task.PackageDependenciesDesignTime.Count()); + + // Verify only + // top.package1 is type 'package' + // top.package2 is type 'unresolved' + // + // top.package3 is type 'unknown'. Should not appear in the list + var item1 = task.PackageDependenciesDesignTime[0]; + Assert.Equal("top.package1/1.0.0", item1.ItemSpec); + + var item2 = task.PackageDependenciesDesignTime[1]; + Assert.Equal("top.package2/1.0.0", item2.ItemSpec); } [Fact] public void ItShouldIdentifyDefaultImplicitPackages() { - var task = new PreprocessPackageDependenciesDesignTime - { - TargetFramework = "net45", - DefaultImplicitPackages = "DefaultImplicit", - PackageDefinitions = new ITaskItem[] - { - new MockTaskItem( - itemSpec: "DefaultImplicit/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "DefaultImplicit" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "" }, - { MetadataKeys.Type, "Package" } - }) - }, - PackageDependencies = new ITaskItem[] - { - new MockTaskItem( - itemSpec: "DefaultImplicit/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }) - } - }; - - Assert.True(task.Execute()); - - var item = Assert.Single(task.PackageDependenciesDesignTime); - - Assert.Equal("DefaultImplicit/1.0.0", item.ItemSpec); - Assert.True(item.GetBooleanMetadata(MetadataKeys.IsImplicitlyDefined)); - } + var testRoot = _testAssetsManager.CreateTestDirectory().Path; + Log.WriteLine("Test root: " + testRoot); - [Fact] - public void ItShouldIgnoreAllDependenciesWithTypeNotEqualToPackageOrUnresolved() - { - var task = new PreprocessPackageDependenciesDesignTime - { - TargetFramework = "net45", - DefaultImplicitPackages = string.Empty, - PackageDefinitions = new ITaskItem[] { - new MockTaskItem( - itemSpec: "mockPackageExternalProject/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageExternalProject" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some path" }, - { MetadataKeys.Type, "ExternalProject" } - }), - new MockTaskItem( - itemSpec: "mockPackageProject/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageProject" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "Project" } - }), - new MockTaskItem( - itemSpec: "mockPackageContent/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageContent" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "Content" } - }), - new MockTaskItem( - itemSpec: "mockPackageAssembly/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageAssembly" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "Assembly" } - }), - new MockTaskItem( - itemSpec: "mockPackageFrameworkAssembly/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageFrameworkAssembly" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "FrameworkAssembly" } - }), - new MockTaskItem( - itemSpec: "mockPackageDiagnostic/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageDiagnostic" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "Diagnostic" } - }), - new MockTaskItem( - itemSpec: "mockPackageWinmd/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageWinmd" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "Winmd" } - }), - new MockTaskItem( - itemSpec: "mockPackageReference/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "mockPackageReference" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "Reference" } - }) - }, - PackageDependencies = new ITaskItem[] { - new MockTaskItem( - itemSpec: "mockPackageExternalProject/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageProject/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageContent/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageAssembly/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageFrameworkAssembly/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageDiagnostic/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageWinmd/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "mockPackageReference/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }) - } - }; - - Assert.True(task.Execute()); - - Assert.Empty(task.PackageDependenciesDesignTime); + string projectAssetsJsonPath = Path.Combine(testRoot, "project.assets.json"); + string projectCacheAssetsJsonPath = Path.Combine(testRoot, "projectassets.cache"); + // project.assets.json + File.WriteAllText(projectAssetsJsonPath, CreateBasicProjectAssetsFile(testRoot)); + var task = InitializeTask(testRoot, out _); + task.ProjectAssetsFile = projectAssetsJsonPath; + task.ProjectAssetsCacheFile = projectCacheAssetsJsonPath; + task.TargetFramework = "net6.0"; + // Set implicit packages + task.DefaultImplicitPackages = "top.package2;top.package3"; + + task.Execute(); + + Assert.Equal(3, task.PackageDependenciesDesignTime.Count()); + + // Verify implicit packages + var item1 = task.PackageDependenciesDesignTime[0]; + Assert.Equal("top.package1/1.0.0", item1.ItemSpec); + Assert.Equal("False", item1.GetMetadata(MetadataKeys.IsImplicitlyDefined)); + + var item2 = task.PackageDependenciesDesignTime[1]; + Assert.Equal("top.package2/1.0.0", item2.ItemSpec); + Assert.Equal("True", item2.GetMetadata(MetadataKeys.IsImplicitlyDefined)); + + var item3 = task.PackageDependenciesDesignTime[2]; + Assert.Equal("top.package3/1.0.0", item3.ItemSpec); + Assert.Equal("True", item3.GetMetadata(MetadataKeys.IsImplicitlyDefined)); } [Fact] public void ItShouldOnlyReturnPackagesInTheSpecifiedTarget() { - var task = new PreprocessPackageDependenciesDesignTime - { - TargetFramework = "net45", - DefaultImplicitPackages = string.Empty, - PackageDefinitions = new ITaskItem[] { - new MockTaskItem( - itemSpec: "Package1/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "Package1" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "" }, - { MetadataKeys.Type, "Package" } - }), - new MockTaskItem( - itemSpec: "Package2/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "Package2" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "" }, - { MetadataKeys.Type, "Package" } - }) - }, - PackageDependencies = new ITaskItem[] { - new MockTaskItem( - itemSpec: "Package1/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "Package2/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net46" } - }) - } - }; - - Assert.True(task.Execute()); - - var item = Assert.Single(task.PackageDependenciesDesignTime); - - Assert.Equal("Package1/1.0.0", item.ItemSpec); + var testRoot = _testAssetsManager.CreateTestDirectory().Path; + Log.WriteLine("Test root: " + testRoot); + + string projectAssetsJsonPath = Path.Combine(testRoot, "project.assets.json"); + string projectCacheAssetsJsonPath = Path.Combine(testRoot, "projectassets.cache"); + // project.assets.json + var assetsContent = +""" +{ + "version" : 3, + "targets" : { + "net6.0" :{ + "top.package1/1.0.0": { + "type": "package", + "dependencies": { + "dependent.package1": "1.0.0", + "dependent.package2": "1.0.0", + }, + "compile": { + "lib/netstandard2.1/top.package1.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.1/top.package1.dll": { + "related": ".xml" + } + } + }, + "dependent.package1/1.0.0": { + "type": "package", + "dependencies": { + "dependent.package3": "1.0.0" + }, + "compile": { + "lib/netcoreapp3.1/_._": { + "related": ".xml" + } + }, + "runtime": { + "lib/netcoreapp3.1/dependent.package1.dll": { + "related": ".xml" + } + } + }, + "dependent.package2/1.0.0": { + "type": "package", + "compile": { + "lib/netstandard2.0/dependent.package2.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/dependent.package2.dll": { + "related": ".xml" + } + } + }, + "dependent.package3/1.0.0": { + "type": "package", + "compile": { + "lib/netstandard2.1/dependent.package3.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.1/dependent.package3.dll": { + "related": ".xml" + } + } + } + }, + "net7.0" : { + "top.package2/1.0.0" : { + "type" : "package", + "compile" : { + "lib/netstandard2.0/top.package2.dll" : { + "related" : ".pdb;.xml" + } + }, + "runtime" : { + "lib/netstandard2.0/top.package2.dll" : { + "related": ".pdb;.xml" + } + } + }, + "top.package3/1.0.0" : { + "type" : "package", + "dependencies": { + "dependent.package1" : "1.0.1" + }, + "compile" : { + "lib/netstandard2.0/top.package3.dll" : { + "related" : ".pdb;.xml" + } + }, + "runtime" : { + "lib/netstandard2.0/top.package3.dll" : { + "related" : ".pdb;.xml" + } + } + }, + "dependent.package1/1.0.0": { + "type": "package", + "dependencies": { + "dependent.package3": "1.0.0" + }, + "compile": { + "lib/netcoreapp3.1/_._": { + "related": ".xml" + } + }, + "runtime": { + "lib/netcoreapp3.1/dependent.package1.dll": { + "related": ".xml" + } + } + }, + "dependent.package3/1.0.0": { + "type": "package", + "compile": { + "lib/netstandard2.1/dependent.package3.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.1/dependent.package3.dll": { + "related": ".xml" + } + } + } + } + }, + "libraries" : { + "dependent.package1/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "dependent.package1/1.0.0", + "files" : [ + "lib/net461/dependent.package1.dll", + "lib/net461/dependent.package1.xml" + ] + }, + "dependent.package2/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "dependent.package2/1.0.0", + "files" : [ + ".nupkg.metadata" + ] + }, + "dependent.package3/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "dependent.package3/1.0.0", + "files" : [ + "lib/net472/dependent.package3.dll", + "lib/net472/dependent.package3.xml" + ] + }, + "top.package1/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "top.package1/1.0.0", + "files" : [ + "lib/net20/top.package1.dll", + "lib/net20/top.package1.pdb", + "lib/net20/top.package1.xml" + ] + }, + "top.package2/1.0.0" : { + "sha512" : "abc", + "type" : "package", + "path" : "top.package2/1.0.0", + "files" : [ + "lib/net45/top.package2.dll", + "lib/net45/top.package2.pdb", + "lib/net45/top.package2.xml" + ] + }, + "top.package3/1.0.0" : { + "sha512" : "abc", + "type" : "package", + "path" : "top.package3/1.0.0", + "files" : [ + ".nupkg.metadata", + ] + } + }, + "projectFileDependencyGroups": { + "net6.0": [ + "top.package1 >= 1.0.0" + ], + "net7.0": [ + "top.package2 >= 1.0.0", + "top.package3 >= 1.0.0" + ] + }, + "packageFolders": { + "C:\\.nuget\\packages\\" : {} + }, + "project" : { + "version" : "1.0.0", + "restore": { + "projectUniqueName": "C:\\projDir1\\projDir2\\proj.csproj", + "projectName": "proj", + "projectPath": "C:\\projDir1\\projDir2\\proj.csproj", + "packagesPath": "C:\\.nuget\\packages\\", + "outputPath": "C:\\projDir1\\projDir2\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\fallbackDir\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\configDir\\NuGet.Config", + "C:\\configDir2\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\configDir3\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks" : { + "net6.0": { + "targetAlias" : "net6.0", + "dependencies" : { + "top.package1" : { + "target" : "Package", + "version" : "[1.0.0, )" + } + } + } + } + } +} +"""; + assetsContent = assetsContent.Replace(@"C:\\.nuget", $@"{testRoot.Replace("\\", "\\\\")}\\.nuget"); ; + + File.WriteAllText(projectAssetsJsonPath, assetsContent); + var task = InitializeTask(testRoot, out _); + task.ProjectAssetsFile = projectAssetsJsonPath; + task.ProjectAssetsCacheFile = projectCacheAssetsJsonPath; + // Set target to verify + task.TargetFramework = "net6.0"; + task.Execute(); + + Assert.Single(task.PackageDependenciesDesignTime); + + // Verify top packages in target + var item1 = task.PackageDependenciesDesignTime[0]; + Assert.Equal("top.package1/1.0.0", item1.ItemSpec); } [Fact] public void ItShouldOnlyReturnTopLevelPackages() { - var task = new PreprocessPackageDependenciesDesignTime + var testRoot = _testAssetsManager.CreateTestDirectory().Path; + Log.WriteLine("Test root: " + testRoot); + + string projectAssetsJsonPath = Path.Combine(testRoot, "project.assets.json"); + string projectCacheAssetsJsonPath = Path.Combine(testRoot, "projectassets.cache"); + // project.assets.json + File.WriteAllText(projectAssetsJsonPath, CreateBasicProjectAssetsFile(testRoot)); + var task = InitializeTask(testRoot, out _); + task.ProjectAssetsFile = projectAssetsJsonPath; + task.ProjectAssetsCacheFile = projectCacheAssetsJsonPath; + task.TargetFramework = "net6.0"; + task.Execute(); + + // Verify all top packages are listed here + Assert.Equal(3, task.PackageDependenciesDesignTime.Count()); + + var item1 = task.PackageDependenciesDesignTime[0]; + Assert.Equal("top.package1/1.0.0", item1.ItemSpec); + + var item2 = task.PackageDependenciesDesignTime[1]; + Assert.Equal("top.package2/1.0.0", item2.ItemSpec); + + var item3 = task.PackageDependenciesDesignTime[2]; + Assert.Equal("top.package3/1.0.0", item3.ItemSpec); + } + + private string CreateBasicProjectAssetsFile(string testRoot, string package2Type = "package", string package3Type = "package") + { + var json = +""" +{ + "version" : 3, + "targets" : { + "net6.0" : { + "top.package1/1.0.0": { + "type": "package", + "dependencies": { + "dependent.package1": "1.0.0", + "dependent.package2": "1.0.0", + }, + "compile": { + "lib/netstandard2.1/top.package1.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.1/top.package1.dll": { + "related": ".xml" + } + } + }, + "top.package2/1.0.0" : { + "type" : "PACKAGE2_TYPE", + "compile" : { + "lib/netstandard2.0/top.package2.dll" : { + "related" : ".pdb;.xml" + } + }, + "runtime" : { + "lib/netstandard2.0/top.package2.dll" : { + "related": ".pdb;.xml" + } + } + }, + "top.package3/1.0.0" : { + "type" : "PACKAGE3_TYPE", + "dependencies": { + "dependent.package1" : "1.0.1" + }, + "compile" : { + "lib/netstandard2.0/top.package3.dll" : { + "related" : ".pdb;.xml" + } + }, + "runtime" : { + "lib/netstandard2.0/top.package3.dll" : { + "related" : ".pdb;.xml" + } + } + }, + "dependent.package1/1.0.0": { + "type": "package", + "dependencies": { + "dependent.package3": "1.0.0" + }, + "compile": { + "lib/netcoreapp3.1/_._": { + "related": ".xml" + } + }, + "runtime": { + "lib/netcoreapp3.1/dependent.package1.dll": { + "related": ".xml" + } + } + }, + "dependent.package2/1.0.0": { + "type": "package", + "compile": { + "lib/netstandard2.0/dependent.package2.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/dependent.package2.dll": { + "related": ".xml" + } + } + }, + "dependent.package3/1.0.0": { + "type": "package", + "compile": { + "lib/netstandard2.1/dependent.package3.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.1/dependent.package3.dll": { + "related": ".xml" + } + } + } + } + }, + "libraries" : { + "dependent.package1/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "dependent.package1/1.0.0", + "files" : [ + "lib/net461/dependent.package1.dll", + "lib/net461/dependent.package1.xml" + ] + }, + "dependent.package2/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "dependent.package2/1.0.0", + "files" : [ + ".nupkg.metadata" + ] + }, + "dependent.package3/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "dependent.package3/1.0.0", + "files" : [ + "lib/net472/dependent.package3.dll", + "lib/net472/dependent.package3.xml" + ] + }, + "top.package1/1.0.0" : { + "sha512" : "xyz", + "type" : "package", + "path" : "top.package1/1.0.0", + "files" : [ + "lib/net20/top.package1.dll", + "lib/net20/top.package1.pdb", + "lib/net20/top.package1.xml" + ] + }, + "top.package2/1.0.0" : { + "sha512" : "abc", + "type" : "PACKAGE2_TYPE", + "path" : "top.package2/1.0.0", + "files" : [ + "lib/net45/top.package2.dll", + "lib/net45/top.package2.pdb", + "lib/net45/top.package2.xml" + ] + }, + "top.package3/1.0.0" : { + "sha512" : "abc", + "type" : "PACKAGE3_TYPE", + "path" : "top.package3/1.0.0", + "files" : [ + ".nupkg.metadata", + ] + } + }, + "projectFileDependencyGroups": { + "net6.0": [ + "top.package1 >= 1.0.0", + "top.package2 >= 1.0.0", + "top.package3 >= 1.0.0" + ] + }, + "packageFolders": { + "C:\\.nuget\\packages\\" : {} + }, + "project" : { + "version" : "1.0.0", + "restore": { + "projectUniqueName": "C:\\projDir1\\projDir2\\proj.csproj", + "projectName": "proj", + "projectPath": "C:\\projDir1\\projDir2\\proj.csproj", + "packagesPath": "C:\\.nuget\\packages\\", + "outputPath": "C:\\projDir1\\projDir2\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\fallbackDir\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\configDir\\NuGet.Config", + "C:\\configDir2\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\configDir3\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks" : { + "net6.0": { + "targetAlias" : "net6.0", + "dependencies" : { + "top.package1" : { + "target" : "Package", + "version" : "[1.0.0, )" + } + } + } + } + } +} +"""; + return json.Replace("PACKAGE2_TYPE", package2Type) + .Replace("PACKAGE3_TYPE", package3Type) + .Replace(@"C:\\.nuget", $@"{testRoot.Replace("\\", "\\\\")}\\.nuget"); + } + private ResolvePackageAssets InitializeTask(string testRoot, out IEnumerable inputProperties) + { + inputProperties = typeof(ResolvePackageAssets) + .GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public) + .Where(p => !p.IsDefined(typeof(OutputAttribute)) && + p.Name != nameof(ResolvePackageAssets.DesignTimeBuild)) + .OrderBy(p => p.Name, StringComparer.Ordinal); + + var requiredProperties = inputProperties + .Where(p => p.IsDefined(typeof(RequiredAttribute))); + + var task = new ResolvePackageAssets(); + // Initialize all required properties as a genuine task invocation would. We do this + // because HashSettings need not defend against required parameters being null. + foreach (var property in requiredProperties) { - TargetFramework = "net45", - DefaultImplicitPackages = string.Empty, - PackageDefinitions = new ITaskItem[] { - new MockTaskItem( - itemSpec: "Package1/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "Package1" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "" }, - { MetadataKeys.Type, "Package" } - }), - new MockTaskItem( - itemSpec: "ChildPackage1/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.Name, "ChildPackage1" }, - { MetadataKeys.Version, "1.0.0" }, - { MetadataKeys.Path, "some path" }, - { MetadataKeys.ResolvedPath, "some resolved path" }, - { MetadataKeys.Type, "Package" } - }) - }, - PackageDependencies = new ITaskItem[] { - new MockTaskItem( - itemSpec: "Package1/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" } - }), - new MockTaskItem( - itemSpec: "ChildPackage1/1.0.0", - metadata: new Dictionary - { - { MetadataKeys.ParentTarget, "net45" }, - { MetadataKeys.ParentPackage, "Package1/1.0.0" } - }) - } - }; - - Assert.True(task.Execute()); - - var item = Assert.Single(task.PackageDependenciesDesignTime); - - Assert.Equal("Package1/1.0.0", item.ItemSpec); + property.PropertyType.Should().Be( + typeof(string), + because: $"this test hasn't been updated to handle non-string required task parameters like {property.Name}"); + + property.SetValue(task, "_"); + } + + task.BuildEngine = new MockBuildEngine(); + + CreateFolders(testRoot); + + return task; + } + + private void CreateFolders(string testRoot) + { + Directory.CreateDirectory($@"{testRoot}\.nuget\packages\top.package1\1.0.0\"); + Directory.CreateDirectory($@"{testRoot}\.nuget\packages\top.package2\1.0.0\"); + Directory.CreateDirectory($@"{testRoot}\.nuget\packages\top.package3\1.0.0\"); + Directory.CreateDirectory($@"{testRoot}\.nuget\packages\dependent.package1\1.0.0\"); + Directory.CreateDirectory($@"{testRoot}\.nuget\packages\dependent.package2\1.0.0\"); + Directory.CreateDirectory($@"{testRoot}\.nuget\packages\dependent.package3\1.0.0\"); + using (File.Create($@"{testRoot}\.nuget\packages\top.package1\1.0.0\.nupkg.metadata")) { } + using (File.Create($@"{testRoot}\.nuget\packages\top.package1\1.0.0\top.package1.1.0.0.nupkg.sha512")) { } + using (File.Create($@"{testRoot}\.nuget\packages\top.package2\1.0.0\.nupkg.metadata")) { } + using (File.Create($@"{testRoot}\.nuget\packages\top.package2\1.0.0\top.package2.1.0.0.nupkg.sha512")) { } + using (File.Create($@"{testRoot}\.nuget\packages\top.package3\1.0.0\.nupkg.metadata")) { } + using (File.Create($@"{testRoot}\.nuget\packages\top.package3\1.0.0\top.package3.1.0.0.nupkg.sha512")) { } + using (File.Create($@"{testRoot}\.nuget\packages\dependent.package1\1.0.0\.nupkg.metadata")) { } + using (File.Create($@"{testRoot}\.nuget\packages\dependent.package1\1.0.0\dependent.package1.10.0.nupkg.sha512")) { } + using (File.Create($@"{testRoot}\.nuget\packages\dependent.package2\1.0.0\.nupkg.metadata")) { } + using (File.Create($@"{testRoot}\.nuget\packages\dependent.package2\1.0.0\dependent.package2.1.0.0.nupkg.sha512")) { } + using (File.Create($@"{testRoot}\.nuget\packages\dependent.package3\1.0.0\.nupkg.metadata")) { } + using (File.Create($@"{testRoot}\.nuget\packages\dependent.package3\1.0.0\dependent.package3.1.0.0.nupkg.sha512")) { } + } } } + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/CollectSDKReferencesDesignTime.cs b/src/Tasks/Microsoft.NET.Build.Tasks/CollectSDKReferencesDesignTime.cs index 30a1d7f7a726..3f009bfde6ba 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/CollectSDKReferencesDesignTime.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/CollectSDKReferencesDesignTime.cs @@ -34,8 +34,7 @@ public class CollectSDKReferencesDesignTime : TaskBase protected override void ExecuteCore() { - ImplicitPackageReferences = - PreprocessPackageDependenciesDesignTime.GetImplicitPackageReferences(DefaultImplicitPackages); + ImplicitPackageReferences = GetImplicitPackageReferences(DefaultImplicitPackages); var sdkDesignTimeList = new List(SdkReferences); sdkDesignTimeList.AddRange(GetImplicitPackageReferences()); @@ -43,6 +42,28 @@ protected override void ExecuteCore() SDKReferencesDesignTime = sdkDesignTimeList.ToArray(); } + internal static HashSet GetImplicitPackageReferences(string defaultImplicitPackages) + { + var implicitPackageReferences = new HashSet(StringComparer.OrdinalIgnoreCase); + if (string.IsNullOrEmpty(defaultImplicitPackages)) + { + return implicitPackageReferences; + } + + var packageNames = defaultImplicitPackages.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); + if (packageNames.Length == 0) + { + return implicitPackageReferences; + } + + foreach (var packageReference in packageNames) + { + implicitPackageReferences.Add(packageReference); + } + + return implicitPackageReferences; + } + private IEnumerable GetImplicitPackageReferences() { var implicitPackages = new List(); @@ -74,4 +95,4 @@ private IEnumerable GetImplicitPackageReferences() return implicitPackages; } } -} \ No newline at end of file +} diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/PreprocessPackageDependenciesDesignTime.cs b/src/Tasks/Microsoft.NET.Build.Tasks/PreprocessPackageDependenciesDesignTime.cs deleted file mode 100644 index 2592cda63698..000000000000 --- a/src/Tasks/Microsoft.NET.Build.Tasks/PreprocessPackageDependenciesDesignTime.cs +++ /dev/null @@ -1,172 +0,0 @@ -// 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. - -using System; -using System.Collections.Generic; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Microsoft.NET.Build.Tasks -{ - /// - /// Filters and projects items produced by for consumption by - /// the dependencies tree, via design-time builds. - /// - /// - /// Only top-level package references are retained (i.e. those referenced directly by the project, not - /// those only brought in transitively). - /// - /// Only package references applicable to are retained. - /// - /// Changes to the implementation of this class must be coordinated with PackageRuleHandler - /// in the dotnet/project-system repo. - /// - public class PreprocessPackageDependenciesDesignTime : TaskBase - { - public const string ResolvedMetadata = "Resolved"; - - /// - /// Information about each package in the project, with metadata: - /// - Name = "MetadataExtractor" - /// - Path = "metadataextractor/1.0.0" - /// - ResolvedPath = "C:\Users\drnoakes\.nuget\packages\metadataextractor\1.0.0" - /// - Type = "package" - /// - Version = "2.3.0" - /// - DiagnosticLevel = "" - /// - [Required] - public ITaskItem[] PackageDefinitions { get; set; } - - /// - /// Items with metadata "ParentTarget" and "ParentPackage", which allows determining the hierarchy of package references. - /// - [Required] - public ITaskItem[] PackageDependencies { get; set; } - - /// - /// Eg: "Microsoft.NETCore.App;NETStandard.Library" - /// - [Required] - public string DefaultImplicitPackages { get; set; } - - /// - /// The TargetFramework, which may be an alias - /// Eg: "netcoreapp3.1", "net5.0-windows", etc. - /// Only packages targeting this framework will be returned. - /// - [Required] - public string TargetFramework { get; set; } - - [Output] - public ITaskItem[] PackageDependenciesDesignTime { get; private set; } - - protected override void ExecuteCore() - { - var implicitPackageReferences = GetImplicitPackageReferences(DefaultImplicitPackages); - - // We have two types of data: - // - // 1) "PackageDependencies" which place a package in a given target/hierarchy - // 2) "PackageDefinitions" which provide general metadata about a package - // - // First, we scan PackageDependencies to build the set of packages in our target. - - var allowItemSpecs = new HashSet(StringComparer.OrdinalIgnoreCase); - - foreach (var dependency in PackageDependencies) - { - if (dependency.HasMetadataValue(MetadataKeys.ParentPackage)) - { - // ignore non-top-level packages (those with ParentPackage) - continue; - } - - var target = dependency.GetMetadata(MetadataKeys.ParentTarget); - - if (!StringComparer.OrdinalIgnoreCase.Equals(target, TargetFramework)) - { - // skip dependencies for other targets - continue; - } - - allowItemSpecs.Add(dependency.ItemSpec); - } - - // Second, find PackageDefinitions that match our allowed item specs - - var outputItems = new List(allowItemSpecs.Count); - - foreach (var packageDef in PackageDefinitions) - { - if (!allowItemSpecs.Contains(packageDef.ItemSpec)) - { - // We are not interested in this definition (not top-level, or wrong target) - continue; - } - - var dependencyType = GetDependencyType(packageDef.GetMetadata(MetadataKeys.Type)); - - if (dependencyType == DependencyType.Package || - dependencyType == DependencyType.Unresolved) - { - var name = packageDef.GetMetadata(MetadataKeys.Name); - - if (string.IsNullOrEmpty(name)) - { - // Name is required - continue; - } - - var version = packageDef.GetMetadata(MetadataKeys.Version) ?? string.Empty; - var resolvedPath = packageDef.GetMetadata(MetadataKeys.ResolvedPath); - var resolved = !string.IsNullOrEmpty(resolvedPath); - var path = (resolved - ? resolvedPath - : packageDef.GetMetadata(MetadataKeys.Path)) ?? string.Empty; - var isImplicitlyDefined = implicitPackageReferences.Contains(name); - var diagnosticLevel = packageDef.GetMetadata(MetadataKeys.DiagnosticLevel) ?? string.Empty; - - var outputItem = new TaskItem(packageDef.ItemSpec); - outputItem.SetMetadata(MetadataKeys.Name, name); - outputItem.SetMetadata(MetadataKeys.Version, version); - outputItem.SetMetadata(MetadataKeys.Path, path); - outputItem.SetMetadata(MetadataKeys.IsImplicitlyDefined, isImplicitlyDefined.ToString()); - outputItem.SetMetadata(MetadataKeys.DiagnosticLevel, diagnosticLevel); - outputItem.SetMetadata(ResolvedMetadata, resolved.ToString()); - - outputItems.Add(outputItem); - } - } - - PackageDependenciesDesignTime = outputItems.ToArray(); - } - - internal static HashSet GetImplicitPackageReferences(string defaultImplicitPackages) - { - var implicitPackageReferences = new HashSet(StringComparer.OrdinalIgnoreCase); - if (string.IsNullOrEmpty(defaultImplicitPackages)) - { - return implicitPackageReferences; - } - - var packageNames = defaultImplicitPackages.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); - if (packageNames.Length == 0) - { - return implicitPackageReferences; - } - - foreach (var packageReference in packageNames) - { - implicitPackageReferences.Add(packageReference); - } - - return implicitPackageReferences; - } - - private static DependencyType GetDependencyType(string dependencyTypeString) - { - Enum.TryParse(dependencyTypeString, ignoreCase: true, out DependencyType dependencyType); - return dependencyType; - } - } -} diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs index 48ee5d280c58..74e1e19b2415 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs @@ -8,10 +8,12 @@ using System.Linq; using System.Security.Cryptography; using System.Text; +using System.Xml.Linq; using Microsoft.Build.Evaluation; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using NuGet.Common; +using NuGet.Frameworks; using NuGet.ProjectModel; using NuGet.Versioning; @@ -27,6 +29,8 @@ namespace Microsoft.NET.Build.Tasks /// public sealed class ResolvePackageAssets : TaskBase { + #region Input Items + /// /// Path to assets.json. /// @@ -160,6 +164,15 @@ public sealed class ResolvePackageAssets : TaskBase /// public bool DesignTimeBuild { get; set; } + /// + /// Eg: "Microsoft.NETCore.App;NETStandard.Library" + /// + [Required] + public string DefaultImplicitPackages { get; set; } + + #endregion + + #region Output Items /// /// Full paths to assemblies from packages to pass to compiler as analyzers. /// @@ -233,6 +246,17 @@ public sealed class ResolvePackageAssets : TaskBase [Output] public ITaskItem[] PackageDependencies { get; private set; } + /// + /// Filters and projects items produced by for consumption by + /// the dependencies tree, via design-time builds. + /// + /// + /// Changes to the implementation of output must be coordinated with PackageRuleHandler + /// in the dotnet/project-system repo. + /// + [Output] + public ITaskItem[] PackageDependenciesDesignTime { get; private set; } + /// /// List of symbol files (.pdb) related to NuGet packages. /// @@ -251,6 +275,8 @@ public sealed class ResolvePackageAssets : TaskBase [Output] public ITaskItem[] ReferenceDocumentationFiles { get; private set; } + #endregion + /// /// Messages from the assets file. /// These are logged directly and therefore not returned to the targets (note private here). @@ -304,7 +330,7 @@ public sealed class ResolvePackageAssets : TaskBase //////////////////////////////////////////////////////////////////////////////////////////////////// private const int CacheFormatSignature = ('P' << 0) | ('K' << 8) | ('G' << 16) | ('A' << 24); - private const int CacheFormatVersion = 11; + private const int CacheFormatVersion = 12; private static readonly Encoding TextEncoding = Encoding.UTF8; private const int SettingsHashLength = 256 / 8; private HashAlgorithm CreateSettingsHash() => SHA256.Create(); @@ -336,6 +362,7 @@ private void ReadItemGroups() FrameworkReferences = reader.ReadItemGroup(); NativeLibraries = reader.ReadItemGroup(); PackageDependencies = reader.ReadItemGroup(); + PackageDependenciesDesignTime = reader.ReadItemGroup(); PackageFolders = reader.ReadItemGroup(); ReferenceDocumentationFiles = reader.ReadItemGroup(); ResourceAssemblies = reader.ReadItemGroup(); @@ -694,7 +721,6 @@ public CacheWriter(ResolvePackageAssets task) _lockFile = new LockFileCache(task).GetLockFile(task.ProjectAssetsFile); _packageResolver = NuGetPackageResolver.CreateResolver(_lockFile); - // If we are doing a design-time build, we do not want to fail the build if we can't find the // target framework and/or runtime identifier in the assets file. This is because the design-time // build needs to succeed in order to get the right information in order to run a restore in order @@ -816,6 +842,7 @@ private void WriteItemGroups() WriteItemGroup(WriteFrameworkReferences); WriteItemGroup(WriteNativeLibraries); WriteItemGroup(WritePackageDependencies); + WriteItemGroup(WritePackageDependenciesDesignTime); WriteItemGroup(WritePackageFolders); WriteItemGroup(WriteReferenceDocumentationFiles); WriteItemGroup(WriteResourceAssemblies); @@ -1166,17 +1193,13 @@ private void WriteDebugItems( foreach (string fileExtension in relatedExtensions.Split(RelatedPropertySeparator)) { - if (fileExtension.ToLower() == extension) + if (StringComparer.InvariantCulture.Equals(fileExtension, extension)) { string xmlFilePath = Path.ChangeExtension(itemSpec, fileExtension); if (File.Exists(xmlFilePath)) { WriteItem(xmlFilePath, library); } - else - { - _task.Log.LogWarning(Strings.AssetsFileNotFound, xmlFilePath); - } } } } @@ -1414,6 +1437,110 @@ private void WritePackageDependencies() } } + private void WritePackageDependenciesDesignTime() + { + var implicitPackageReferences = CollectSDKReferencesDesignTime.GetImplicitPackageReferences(_task.DefaultImplicitPackages); + + // Scan PackageDependencies to build the set of packages in our target. + var allowItemSpecs = GetPackageDependencies(); + + foreach (var package in _lockFile.Libraries) + { + var packageVersion = package.Version.ToNormalizedString(); + string packageId = $"{package.Name}/{packageVersion}"; + + // Find PackageDefinitions that match our allowed item specs + if (string.IsNullOrEmpty(package.Name) || !allowItemSpecs.Contains(packageId)) + { + // Only include packages from the allow list. + // This excludes transitive packages and those from other targets. + continue; + } + + var dependencyType = GetDependencyType(package.Type); + + if (dependencyType == DependencyType.Package || + dependencyType == DependencyType.Unresolved) + { + WriteItem(packageId); + WriteMetadata(MetadataKeys.Name, package.Name); + + var version = packageVersion ?? string.Empty; + WriteMetadata(MetadataKeys.Version, version); + + var isImplicitlyDefined = implicitPackageReferences.Contains(package.Name); + WriteMetadata(MetadataKeys.IsImplicitlyDefined, isImplicitlyDefined.ToString()); + + string resolvedPackagePath = _packageResolver.GetPackageDirectory(package.Name, package.Version); + var resolvedPath = resolvedPackagePath ?? string.Empty; + var resolved = !string.IsNullOrEmpty(resolvedPath); + WriteMetadata(MetadataKeys.Resolved, resolved.ToString()); + + string itemPath = package.Path ?? string.Empty; + var path = (resolved + ? resolvedPath + : itemPath) ?? string.Empty; + WriteMetadata(MetadataKeys.Path, path); + + string itemDiagnosticLevel = GetPackageDiagnosticLevel(package); + var diagnosticLevel = itemDiagnosticLevel ?? string.Empty; + WriteMetadata(MetadataKeys.DiagnosticLevel, diagnosticLevel); + } + } + + HashSet GetPackageDependencies() + { + HashSet projectFileDependencies = _lockFile.GetProjectFileDependencySet(_compileTimeTarget.Name); + + HashSet results = new(StringComparer.OrdinalIgnoreCase); + + foreach (var package in _compileTimeTarget.Libraries) + { + if (projectFileDependencies.Contains(package.Name)) + { + string itemSpec = GetPackageId(package); + + bool added = results.Add(itemSpec); + + Debug.Assert(added); + } + } + + return results; + } + + static string GetPackageId(LockFileTargetLibrary package) => $"{package.Name}/{package.Version.ToNormalizedString()}"; + + string GetPackageDiagnosticLevel(LockFileLibrary package) + { + string target = _task.TargetFramework ?? ""; + + var messages = _lockFile.LogMessages.Where(log => + log.LibraryId == package.Name && + log.TargetGraphs.Any(tg => + { + var parsedTargetGraph = NuGetFramework.Parse(tg); + var alias = _lockFile.PackageSpec.TargetFrameworks + .FirstOrDefault(tf => tf.FrameworkName == parsedTargetGraph) + ?.TargetAlias ?? tg; + return alias == target; + })); + + if (!messages.Any()) + { + return string.Empty; + } + + return messages.Max(log => log.Level).ToString(); + } + + static DependencyType GetDependencyType(string dependencyTypeString) + { + Enum.TryParse(dependencyTypeString, ignoreCase: true, out DependencyType dependencyType); + return dependencyType; + } + } + private void WriteResourceAssemblies() { WriteItems( diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs index be6e7e20b3da..7785c24105db 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs @@ -16,11 +16,11 @@ namespace Microsoft.NET.Build.Tasks /// Raises Nuget LockFile representation to MSBuild items and resolves /// assets specified in the lock file. /// + /// + /// Only called for backwards compatability, when ResolvePackageDependencies is true. + /// public sealed class ResolvePackageDependencies : TaskBase { - /// - /// Only used if is . - /// private readonly Dictionary _fileTypes = new Dictionary(StringComparer.OrdinalIgnoreCase); private HashSet _projectFileDependencies; @@ -37,7 +37,6 @@ public sealed class ResolvePackageDependencies : TaskBase /// /// All the targets in the lock file. - /// Only populated if is . /// [Output] public ITaskItem[] TargetDefinitions @@ -56,7 +55,6 @@ public ITaskItem[] PackageDefinitions /// /// All the files in the lock file. - /// Only populated if is . /// [Output] public ITaskItem[] FileDefinitions @@ -77,7 +75,6 @@ public ITaskItem[] PackageDependencies /// /// All the dependencies between files and packages, labeled by the group containing /// the file (e.g. CompileTimeAssembly, RuntimeAssembly, etc.). - /// Only populated if is . /// [Output] public ITaskItem[] FileDependencies @@ -114,12 +111,6 @@ public string ProjectLanguage get; set; } - /// - /// Setting this property restores pre-16.7 behaviour of populating , - /// and outputs. - /// - public bool EmitLegacyAssetsFileItems { get; set; } = false; - public string TargetFramework { get; set; } #endregion @@ -195,11 +186,6 @@ private void GetPackageAndFileDefinitions() _packageDefinitions.Add(item); - if (!EmitLegacyAssetsFileItems) - { - continue; - } - foreach (var file in package.Files) { if (NuGetUtils.IsPlaceholderFile(file)) @@ -276,18 +262,15 @@ private void RaiseLockFileTargets() { foreach (var target in LockFile.Targets) { - if (EmitLegacyAssetsFileItems) - { - TaskItem item = new TaskItem(target.Name); - item.SetMetadata(MetadataKeys.RuntimeIdentifier, target.RuntimeIdentifier ?? string.Empty); - item.SetMetadata(MetadataKeys.TargetFramework, TargetFramework); - item.SetMetadata(MetadataKeys.TargetFrameworkMoniker, target.TargetFramework.DotNetFrameworkName); - item.SetMetadata(MetadataKeys.FrameworkName, target.TargetFramework.Framework); - item.SetMetadata(MetadataKeys.FrameworkVersion, target.TargetFramework.Version.ToString()); - item.SetMetadata(MetadataKeys.Type, "target"); - - _targetDefinitions.Add(item); - } + TaskItem item = new TaskItem(target.Name); + item.SetMetadata(MetadataKeys.RuntimeIdentifier, target.RuntimeIdentifier ?? string.Empty); + item.SetMetadata(MetadataKeys.TargetFramework, TargetFramework); + item.SetMetadata(MetadataKeys.TargetFrameworkMoniker, target.TargetFramework.DotNetFrameworkName); + item.SetMetadata(MetadataKeys.FrameworkName, target.TargetFramework.Framework); + item.SetMetadata(MetadataKeys.FrameworkVersion, target.TargetFramework.Version.ToString()); + item.SetMetadata(MetadataKeys.Type, "target"); + + _targetDefinitions.Add(item); // raise each library in the target GetPackageAndFileDependencies(target); @@ -323,11 +306,8 @@ private void GetPackageAndFileDependencies(LockFileTarget target) // get sub package dependencies GetPackageDependencies(package, target.Name, resolvedPackageVersions, transitiveProjectRefs); - if (EmitLegacyAssetsFileItems) - { - // get file dependencies on this package - GetFileDependencies(package, target.Name); - } + // get file dependencies on this package + GetFileDependencies(package, target.Name); } } @@ -375,7 +355,7 @@ private void GetFileDependencies(LockFileTargetLibrary package, string targetNam string filePath = entry.Item1; IDictionary properties = entry.Item2; - if (NuGetUtils.IsPlaceholderFile(filePath) || !EmitLegacyAssetsFileItems) + if (NuGetUtils.IsPlaceholderFile(filePath)) { continue; } diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props index fd37d2483ef8..96960d81b0f5 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props @@ -111,7 +111,7 @@ Copyright (c) .NET Foundation. All rights reserved. false false true - 1.0.2 + 1.0.3 false true true diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets index 2456989cbf34..dc048fde8e68 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets @@ -192,18 +192,17 @@ Copyright (c) .NET Foundation. All rights reserved. RuntimeIdentifier="$(RuntimeIdentifier)" Condition=" '$(DesignTimeBuild)' != 'true'"/> + + ContinueOnError="ErrorAndContinue" + Condition="'$(EmitLegacyAssetsFileItems)' == 'true'"> - - @@ -290,7 +289,8 @@ Copyright (c) .NET Foundation. All rights reserved. SatelliteResourceLanguages="$(SatelliteResourceLanguages)" DesignTimeBuild="$(DesignTimeBuild)" ContinueOnError="$(ContinueOnError)" - PackageReferences="@(PackageReference)"> + PackageReferences="@(PackageReference)" + DefaultImplicitPackages= "$(DefaultImplicitPackages)"> @@ -309,6 +309,7 @@ Copyright (c) .NET Foundation. All rights reserved. + @@ -339,23 +340,9 @@ Copyright (c) .NET Foundation. All rights reserved. ============================================================ --> - - - - - - - - - + DependsOnTargets="ResolvePackageAssets;RunResolvePackageDependencies;ResolveAssemblyReferencesDesignTime" />