Merge pull request #8486 from peterhuene/install-tool-visibility

Add verbosity option to `install tool` command.
This commit is contained in:
Peter Huene 2018-02-02 15:37:11 -08:00 committed by GitHub
commit c22f7e29a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 1068 additions and 1103 deletions

View file

@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.27130.2020 VisualStudioVersion = 15.0.27130.2020
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
@ -236,6 +236,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Test
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_launcher", "src\tool_launcher\tool_launcher.csproj", "{EDF19BE6-F20F-4AD0-8E3B-E837030726A5}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_launcher", "src\tool_launcher\tool_launcher.csproj", "{EDF19BE6-F20F-4AD0-8E3B-E837030726A5}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnet-install-tool.Tests", "test\dotnet-install-tool.Tests\dotnet-install-tool.Tests.csproj", "{8FE9D802-57F3-493B-9E14-72DF905E3838}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -1692,6 +1694,30 @@ Global
{E442F4C1-08DB-470F-B9A6-197444CD0295}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {E442F4C1-08DB-470F-B9A6-197444CD0295}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{E442F4C1-08DB-470F-B9A6-197444CD0295}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {E442F4C1-08DB-470F-B9A6-197444CD0295}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{E442F4C1-08DB-470F-B9A6-197444CD0295}.RelWithDebInfo|x86.Build.0 = Release|Any CPU {E442F4C1-08DB-470F-B9A6-197444CD0295}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Debug|x64.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Debug|x64.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Debug|x86.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Debug|x86.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.MinSizeRel|x86.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Release|Any CPU.Build.0 = Release|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Release|x64.ActiveCfg = Release|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Release|x64.Build.0 = Release|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Release|x86.ActiveCfg = Release|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.Release|x86.Build.0 = Release|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
{8FE9D802-57F3-493B-9E14-72DF905E3838}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1767,6 +1793,7 @@ Global
{91BFE800-1624-4A58-A1CE-339705A8FFD0} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {91BFE800-1624-4A58-A1CE-339705A8FFD0} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{EDF19BE6-F20F-4AD0-8E3B-E837030726A5} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {EDF19BE6-F20F-4AD0-8E3B-E837030726A5} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{E442F4C1-08DB-470F-B9A6-197444CD0295} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {E442F4C1-08DB-470F-B9A6-197444CD0295} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{8FE9D802-57F3-493B-9E14-72DF905E3838} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5} SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5}

View file

@ -520,28 +520,26 @@
<data name="NoRestoreDescription" xml:space="preserve"> <data name="NoRestoreDescription" xml:space="preserve">
<value>Does not do an implicit restore when executing the command.</value> <value>Does not do an implicit restore when executing the command.</value>
</data> </data>
<data name="CannotBeNullOrWhitespace" xml:space="preserve">
<value>Cannot be null or whitespace.</value>
</data>
<data name="ContainInvalidCharacters" xml:space="preserve">
<value>Contains one or more invalid characters: {0}</value>
</data>
<data name="NuGetConfigurationFileDoesNotExist" xml:space="preserve"> <data name="NuGetConfigurationFileDoesNotExist" xml:space="preserve">
<value>NuGet configuration file {0} does not exist.</value> <value>NuGet configuration file {0} does not exist.</value>
</data> </data>
<data name="ToolSettingInvalidRunner" xml:space="preserve">
<value>The tool's settings file has non "dotnet" as runner.</value>
</data>
<data name="ToolSettingMoreThanOneCommand" xml:space="preserve">
<value>The tool's settings file has more than one command defined.</value>
</data>
<data name="ToolSettingsContainError" xml:space="preserve">
<value>The tool's settings file contains error.
{0}</value>
</data>
<data name="ToolSettingsInvalidXml" xml:space="preserve"> <data name="ToolSettingsInvalidXml" xml:space="preserve">
<value>The tool's settings file is invalid xml. <value>Invalid XML: {0}</value>
{0}</value> </data>
<data name="ToolSettingsMissingCommandName" xml:space="preserve">
<value>Tool defines a command with a missing name setting.</value>
</data>
<data name="ToolSettingsMissingEntryPoint" xml:space="preserve">
<value>Command '{0}' is missing an entry point setting.</value>
</data>
<data name="ToolSettingsInvalidCommandName" xml:space="preserve">
<value>Command '{0}' contains one or more of the following invalid characters: {1}.</value>
</data>
<data name="ToolSettingsMoreThanOneCommand" xml:space="preserve">
<value>More than one command is defined for the tool.</value>
</data>
<data name="ToolSettingsUnsupportedRunner" xml:space="preserve">
<value>Command '{0}' uses unsupported runner '{1}'."</value>
</data> </data>
<data name="EnvironmentPathLinuxManualInstruction" xml:space="preserve"> <data name="EnvironmentPathLinuxManualInstruction" xml:space="preserve">
<value>Cannot find the tools executable path. Please ensure {0} is added to your PATH. <value>Cannot find the tools executable path. Please ensure {0} is added to your PATH.

View file

@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // 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. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ToolPackage namespace Microsoft.DotNet.ToolPackage
@ -11,6 +12,7 @@ namespace Microsoft.DotNet.ToolPackage
FilePath projectPath, FilePath projectPath,
DirectoryPath assetJsonOutput, DirectoryPath assetJsonOutput,
FilePath? nugetconfig, FilePath? nugetconfig,
string source); string source,
string verbosity);
} }
} }

View file

@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // 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. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ToolPackage namespace Microsoft.DotNet.ToolPackage
@ -12,6 +13,7 @@ namespace Microsoft.DotNet.ToolPackage
string packageVersion = null, string packageVersion = null,
FilePath? nugetconfig = null, FilePath? nugetconfig = null,
string targetframework = null, string targetframework = null,
string source = null); string source = null,
string verbosity = null);
} }
} }

View file

@ -3,6 +3,7 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using Microsoft.DotNet.Tools; using Microsoft.DotNet.Tools;
namespace Microsoft.DotNet.ToolPackage namespace Microsoft.DotNet.ToolPackage
@ -15,33 +16,36 @@ namespace Microsoft.DotNet.ToolPackage
{ {
if (string.IsNullOrWhiteSpace(commandName)) if (string.IsNullOrWhiteSpace(commandName))
{ {
throw new ArgumentNullException(nameof(commandName), CommonLocalizableStrings.CannotBeNullOrWhitespace); throw new ToolConfigurationException(CommonLocalizableStrings.ToolSettingsMissingCommandName);
} }
EnsureNoInvalidFilenameCharacters(commandName, nameof(toolAssemblyEntryPoint));
if (string.IsNullOrWhiteSpace(toolAssemblyEntryPoint)) if (string.IsNullOrWhiteSpace(toolAssemblyEntryPoint))
{ {
throw new ArgumentNullException(nameof(toolAssemblyEntryPoint), CommonLocalizableStrings.CannotBeNullOrWhitespace); throw new ToolConfigurationException(
string.Format(
CommonLocalizableStrings.ToolSettingsMissingEntryPoint,
commandName));
} }
EnsureNoInvalidFilenameCharacters(commandName);
CommandName = commandName; CommandName = commandName;
ToolAssemblyEntryPoint = toolAssemblyEntryPoint; ToolAssemblyEntryPoint = toolAssemblyEntryPoint;
} }
private void EnsureNoInvalidFilenameCharacters(string commandName, string nameOfParam) private void EnsureNoInvalidFilenameCharacters(string commandName)
{ {
char[] invalidCharactors = Path.GetInvalidFileNameChars(); var invalidCharacters = Path.GetInvalidFileNameChars();
if (commandName.IndexOfAny(invalidCharactors) != -1) if (commandName.IndexOfAny(invalidCharacters) != -1)
{ {
throw new ArgumentException( throw new ToolConfigurationException(
paramName: nameof(nameOfParam), string.Format(
message: string.Format(CommonLocalizableStrings.ContainInvalidCharacters, CommonLocalizableStrings.ToolSettingsInvalidCommandName,
new string(invalidCharactors))); commandName,
string.Join(", ", invalidCharacters.Select(c => $"'{c}'"))));
} }
} }
public string CommandName { get; } public string CommandName { get; }
public string ToolAssemblyEntryPoint { get; } public string ToolAssemblyEntryPoint { get; }
} }

View file

@ -29,35 +29,29 @@ namespace Microsoft.DotNet.ToolPackage
catch (InvalidOperationException e) when (e.InnerException is XmlException) catch (InvalidOperationException e) when (e.InnerException is XmlException)
{ {
throw new ToolConfigurationException( throw new ToolConfigurationException(
string.Format(CommonLocalizableStrings.ToolSettingsInvalidXml, e.InnerException.Message)); string.Format(
CommonLocalizableStrings.ToolSettingsInvalidXml,
e.InnerException.Message));
} }
} }
if (dotNetCliTool.Commands.Length != 1) if (dotNetCliTool.Commands.Length != 1)
{ {
throw new ToolConfigurationException( throw new ToolConfigurationException(CommonLocalizableStrings.ToolSettingsMoreThanOneCommand);
CommonLocalizableStrings.ToolSettingMoreThanOneCommand);
} }
if (dotNetCliTool.Commands[0].Runner != "dotnet") if (dotNetCliTool.Commands[0].Runner != "dotnet")
{ {
throw new ToolConfigurationException( throw new ToolConfigurationException(
CommonLocalizableStrings.ToolSettingInvalidRunner); string.Format(
CommonLocalizableStrings.ToolSettingsUnsupportedRunner,
dotNetCliTool.Commands[0].Name,
dotNetCliTool.Commands[0].Runner));
} }
var commandName = dotNetCliTool.Commands[0].Name; return new ToolConfiguration(
var toolAssemblyEntryPoint = dotNetCliTool.Commands[0].EntryPoint; dotNetCliTool.Commands[0].Name,
dotNetCliTool.Commands[0].EntryPoint);
try
{
return new ToolConfiguration(commandName, toolAssemblyEntryPoint);
}
catch (ArgumentException e)
{
throw new ToolConfigurationException(
string.Format(CommonLocalizableStrings.ToolSettingsContainError,
e.Message));
}
} }
} }
} }

View file

@ -1,4 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Xml.Linq; using System.Xml.Linq;
@ -38,7 +40,8 @@ namespace Microsoft.DotNet.ToolPackage
string packageVersion = null, string packageVersion = null,
FilePath? nugetconfig = null, FilePath? nugetconfig = null,
string targetframework = null, string targetframework = null,
string source = null) string source = null,
string verbosity = null)
{ {
if (packageId == null) if (packageId == null)
{ {
@ -71,7 +74,7 @@ namespace Microsoft.DotNet.ToolPackage
targetframework, targetframework,
toolDirectory); toolDirectory);
_projectRestorer.Restore(tempProjectPath, toolDirectory, nugetconfig, source); _projectRestorer.Restore(tempProjectPath, toolDirectory, nugetconfig, source, verbosity);
if (packageVersionOrPlaceHolder.IsPlaceholder) if (packageVersionOrPlaceHolder.IsPlaceholder)
{ {

View file

@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli;
@ -27,6 +28,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool
private readonly string _framework; private readonly string _framework;
private readonly string _source; private readonly string _source;
private readonly bool _global; private readonly bool _global;
private readonly string _verbosity;
public InstallToolCommand( public InstallToolCommand(
AppliedOption appliedCommand, AppliedOption appliedCommand,
@ -48,6 +50,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool
_framework = appliedCommand.ValueOrDefault<string>("framework"); _framework = appliedCommand.ValueOrDefault<string>("framework");
_source = appliedCommand.ValueOrDefault<string>("source"); _source = appliedCommand.ValueOrDefault<string>("source");
_global = appliedCommand.ValueOrDefault<bool>("global"); _global = appliedCommand.ValueOrDefault<bool>("global");
_verbosity = appliedCommand.SingleArgumentOrDefault("verbosity");
var cliFolderPathCalculator = new CliFolderPathCalculator(); var cliFolderPathCalculator = new CliFolderPathCalculator();
var offlineFeedPath = new DirectoryPath(cliFolderPathCalculator.CliFallbackFolderPath); var offlineFeedPath = new DirectoryPath(cliFolderPathCalculator.CliFallbackFolderPath);
@ -58,7 +61,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool
.WithSubDirectories(Path.GetRandomFileName()) .WithSubDirectories(Path.GetRandomFileName())
.WithFile(Path.GetRandomFileName() + ".csproj"), .WithFile(Path.GetRandomFileName() + ".csproj"),
new Lazy<string>(BundledTargetFramework.GetTargetFrameworkMoniker), new Lazy<string>(BundledTargetFramework.GetTargetFrameworkMoniker),
new ProjectRestorer()); new ProjectRestorer(reporter));
_environmentPathInstruction = environmentPathInstruction _environmentPathInstruction = environmentPathInstruction
?? EnvironmentPathFactory ?? EnvironmentPathFactory
@ -66,69 +69,68 @@ namespace Microsoft.DotNet.Tools.Install.Tool
_shellShimMaker = shellShimMaker ?? new ShellShimMaker(cliFolderPathCalculator.ToolsShimPath); _shellShimMaker = shellShimMaker ?? new ShellShimMaker(cliFolderPathCalculator.ToolsShimPath);
_reporter = reporter ?? Reporter.Output; _reporter = reporter;
} }
public override int Execute() public override int Execute()
{ {
var reporter = (_reporter ?? Reporter.Output);
var errorReporter = (_reporter ?? Reporter.Error);
if (!_global) if (!_global)
{ {
throw new GracefulException(LocalizableStrings.InstallToolCommandOnlySupportGlobal); throw new GracefulException(LocalizableStrings.InstallToolCommandOnlySupportGlobal);
} }
var toolConfigurationAndExecutablePath = ObtainPackage(); try
{
var toolConfigurationAndExecutablePath = ObtainPackage();
var commandName = toolConfigurationAndExecutablePath.Configuration.CommandName; var commandName = toolConfigurationAndExecutablePath.Configuration.CommandName;
_shellShimMaker.EnsureCommandNameUniqueness(commandName); _shellShimMaker.EnsureCommandNameUniqueness(commandName);
_shellShimMaker.CreateShim( _shellShimMaker.CreateShim(
toolConfigurationAndExecutablePath.Executable, toolConfigurationAndExecutablePath.Executable,
commandName); commandName);
_environmentPathInstruction _environmentPathInstruction
.PrintAddPathInstructionIfPathDoesNotExist(); .PrintAddPathInstructionIfPathDoesNotExist();
_reporter.WriteLine(
string.Format(LocalizableStrings.InstallationSucceeded, commandName));
reporter.WriteLine(
string.Format(LocalizableStrings.InstallationSucceeded, commandName));
}
catch (PackageObtainException ex)
{
errorReporter.WriteLine(ex.Message.Red());
errorReporter.WriteLine(string.Format(LocalizableStrings.ToolInstallationFailed, _packageId).Red());
return 1;
}
catch (ToolConfigurationException ex)
{
errorReporter.WriteLine(
string.Format(
LocalizableStrings.InvalidToolConfiguration,
ex.Message).Red());
errorReporter.WriteLine(string.Format(LocalizableStrings.ToolInstallationFailedContactAuthor, _packageId).Red());
return 1;
}
return 0; return 0;
} }
private ToolConfigurationAndExecutablePath ObtainPackage() private ToolConfigurationAndExecutablePath ObtainPackage()
{ {
try FilePath? configFile = null;
if (_configFilePath != null)
{ {
FilePath? configFile = null; configFile = new FilePath(_configFilePath);
if (_configFilePath != null)
{
configFile = new FilePath(_configFilePath);
}
return _toolPackageObtainer.ObtainAndReturnExecutablePath(
packageId: _packageId,
packageVersion: _packageVersion,
nugetconfig: configFile,
targetframework: _framework,
source: _source);
} }
catch (PackageObtainException ex) return _toolPackageObtainer.ObtainAndReturnExecutablePath(
{ packageId: _packageId,
throw new GracefulException( packageVersion: _packageVersion,
message: nugetconfig: configFile,
string.Format(LocalizableStrings.InstallFailedNuget, targetframework: _framework,
ex.Message), source: _source,
innerException: ex); verbosity: _verbosity);
}
catch (ToolConfigurationException ex)
{
throw new GracefulException(
message:
string.Format(
LocalizableStrings.InstallFailedPackage,
ex.Message),
innerException: ex);
}
} }
} }
} }

View file

@ -36,7 +36,8 @@ namespace Microsoft.DotNet.Cli
"-f|--framework", "-f|--framework",
LocalizableStrings.FrameworkOptionDescription, LocalizableStrings.FrameworkOptionDescription,
Accept.ExactlyOneArgument()), Accept.ExactlyOneArgument()),
CommonOptions.HelpOption()); CommonOptions.HelpOption(),
CommonOptions.VerbosityOption());
} }
} }
} }

View file

@ -149,24 +149,6 @@
WorkingDirectory: {0} WorkingDirectory: {0}
Arguments: {1} Arguments: {1}
Output: {2}{3}</value> Output: {2}{3}</value>
</data>
<data name="FailedToRestorePackage" xml:space="preserve">
<value>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</value>
</data>
<data name="InstallFailedNuget" xml:space="preserve">
<value>Install failed. Failed to download package:
NuGet returned:
{0}</value>
</data>
<data name="InstallFailedPackage" xml:space="preserve">
<value>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</value>
</data> </data>
<data name="InstallationSucceeded" xml:space="preserve"> <data name="InstallationSucceeded" xml:space="preserve">
<value> <value>
@ -181,4 +163,16 @@ The installation succeeded. If there are no further instructions, you can type t
<data name="InstallToolCommandOnlySupportGlobal" xml:space="preserve"> <data name="InstallToolCommandOnlySupportGlobal" xml:space="preserve">
<value>The --global switch (-g) is currently required because only user wide tools are supported.</value> <value>The --global switch (-g) is currently required because only user wide tools are supported.</value>
</data> </data>
<data name="InvalidToolConfiguration" xml:space="preserve">
<value>The settings file in the tool's NuGet package is invalid: {0}</value>
</data>
<data name="ToolInstallationFailed" xml:space="preserve">
<value>Tool '{0}' failed to install.</value>
</data>
<data name="ToolInstallationFailedContactAuthor" xml:space="preserve">
<value>Tool '{0}' failed to install. Please contact the tool author for assistance.</value>
</data>
<data name="ToolInstallationRestoreFailed" xml:space="preserve">
<value>The tool package could not be restored.</value>
</data>
</root> </root>

View file

@ -14,11 +14,19 @@ namespace Microsoft.DotNet.Tools.Install.Tool
{ {
internal class ProjectRestorer : IProjectRestorer internal class ProjectRestorer : IProjectRestorer
{ {
private IReporter _reporter;
public ProjectRestorer(IReporter reporter)
{
_reporter = reporter;
}
public void Restore( public void Restore(
FilePath projectPath, FilePath projectPath,
DirectoryPath assetJsonOutput, DirectoryPath assetJsonOutput,
FilePath? nugetconfig, FilePath? nugetconfig,
string source = null) string source = null,
string verbosity = null)
{ {
var argsToPassToRestore = new List<string>(); var argsToPassToRestore = new List<string>();
@ -42,18 +50,22 @@ namespace Microsoft.DotNet.Tools.Install.Tool
$"/p:BaseIntermediateOutputPath={assetJsonOutput.ToQuotedString()}" $"/p:BaseIntermediateOutputPath={assetJsonOutput.ToQuotedString()}"
}); });
argsToPassToRestore.Add($"/verbosity:{verbosity ?? "quiet"}");
var command = new DotNetCommandFactory(alwaysRunOutOfProc: true) var command = new DotNetCommandFactory(alwaysRunOutOfProc: true)
.Create("restore", argsToPassToRestore) .Create("restore", argsToPassToRestore);
.CaptureStdOut()
.CaptureStdErr(); if (_reporter != null)
{
command = command
.OnOutputLine((line) => _reporter.WriteLine(line))
.OnErrorLine((line) => _reporter.WriteLine(line));
}
var result = command.Execute(); var result = command.Execute();
if (result.ExitCode != 0) if (result.ExitCode != 0)
{ {
throw new PackageObtainException( throw new PackageObtainException(LocalizableStrings.ToolInstallationRestoreFailed);
string.Format(
LocalizableStrings.FailedToRestorePackage,
result.StartInfo.WorkingDirectory, result.StartInfo.Arguments, result.StdErr, result.StdOut));
} }
} }

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -30,39 +30,6 @@ Arguments: {1}
Output: {2}{3}</target> Output: {2}{3}</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription"> <trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source> <source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target> <target state="new">NuGet Package Id of the tool to install.</target>
@ -113,6 +80,26 @@ The error was:
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target> <target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationRestoreFailed">
<source>The tool package could not be restored.</source>
<target state="new">The tool package could not be restored.</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">Projekt {0} byl z řešení odebrán.</target> <target state="translated">Projekt {0} byl z řešení odebrán.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">Das Projekt "{0}" wurde aus der Projektmappe entfernt.</target> <target state="translated">Das Projekt "{0}" wurde aus der Projektmappe entfernt.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">Se ha quitado el proyecto "{0}" de la solución.</target> <target state="translated">Se ha quitado el proyecto "{0}" de la solución.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">Projet '{0}' retiré de la solution.</target> <target state="translated">Projet '{0}' retiré de la solution.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">Il progetto `{0}` è stato rimosso dalla soluzione.</target> <target state="translated">Il progetto `{0}` è stato rimosso dalla soluzione.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">プロジェクト `{0}` がソリューションから削除されました。</target> <target state="translated">プロジェクト `{0}` がソリューションから削除されました。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">'{0}' 프로젝트가 솔루션에서 제거되었습니다.</target> <target state="translated">'{0}' 프로젝트가 솔루션에서 제거되었습니다.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">Projekt „{0}” został skasowany z rozwiązania.</target> <target state="translated">Projekt „{0}” został skasowany z rozwiązania.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">O projeto `{0}` foi removido da solução.</target> <target state="translated">O projeto `{0}` foi removido da solução.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">Проект "{0}" удален из решения.</target> <target state="translated">Проект "{0}" удален из решения.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">`{0}` projesi çözümden kaldırıldı.</target> <target state="translated">`{0}` projesi çözümden kaldırıldı.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">已从解决方案中移除项目“{0}”。</target> <target state="translated">已从解决方案中移除项目“{0}”。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -674,40 +674,6 @@
<target state="translated">專案 `{0}` 已從解決方案移除。</target> <target state="translated">專案 `{0}` 已從解決方案移除。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="CannotBeNullOrWhitespace">
<source>Cannot be null or whitespace.</source>
<target state="new">Cannot be null or whitespace.</target>
<note />
</trans-unit>
<trans-unit id="ContainInvalidCharacters">
<source>Contains one or more invalid characters: {0}</source>
<target state="new">Contains one or more invalid characters: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>The tool's settings file is invalid xml.
{0}</source>
<target state="new">The tool's settings file is invalid xml.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingInvalidRunner">
<source>The tool's settings file has non "dotnet" as runner.</source>
<target state="new">The tool's settings file has non "dotnet" as runner.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingMoreThanOneCommand">
<source>The tool's settings file has more than one command defined.</source>
<target state="new">The tool's settings file has more than one command defined.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsContainError">
<source>The tool's settings file contains error.
{0}</source>
<target state="new">The tool's settings file contains error.
{0}</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist"> <trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file {0} does not exist.</source> <source>NuGet configuration file {0} does not exist.</source>
<target state="new">NuGet configuration file {0} does not exist.</target> <target state="new">NuGet configuration file {0} does not exist.</target>
@ -797,6 +763,36 @@ setx PATH "%PATH%;{1}"</target>
<target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target> <target state="new">Package '{0}' is missing tool settings file DotnetToolSettings.xml.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ToolSettingsInvalidXml">
<source>Invalid XML: {0}</source>
<target state="new">Invalid XML: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingCommandName">
<source>Tool defines a command with a missing name setting.</source>
<target state="new">Tool defines a command with a missing name setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMissingEntryPoint">
<source>Command '{0}' is missing an entry point setting.</source>
<target state="new">Command '{0}' is missing an entry point setting.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsInvalidCommandName">
<source>Command '{0}' contains one or more of the following invalid characters: {1}.</source>
<target state="new">Command '{0}' contains one or more of the following invalid characters: {1}.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsMoreThanOneCommand">
<source>More than one command is defined for the tool.</source>
<target state="new">More than one command is defined for the tool.</target>
<note />
</trans-unit>
<trans-unit id="ToolSettingsUnsupportedRunner">
<source>Command '{0}' uses unsupported runner '{1}'."</source>
<target state="new">Command '{0}' uses unsupported runner '{1}'."</target>
<note />
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.27004.2008 VisualStudioVersion = 15.0.27004.2008
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
@ -88,6 +88,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ToolPackag
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.ComponentMocks", "Microsoft.DotNet.Tools.Tests.ComponentMocks\Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj", "{A3DE5654-7755-45C8-8AE5-5B5B00BEB248}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.ComponentMocks", "Microsoft.DotNet.Tools.Tests.ComponentMocks\Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj", "{A3DE5654-7755-45C8-8AE5-5B5B00BEB248}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-install-tool.Tests", "dotnet-install-tool.Tests\dotnet-install-tool.Tests.csproj", "{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -578,6 +580,18 @@ Global
{A3DE5654-7755-45C8-8AE5-5B5B00BEB248}.Release|x64.Build.0 = Release|Any CPU {A3DE5654-7755-45C8-8AE5-5B5B00BEB248}.Release|x64.Build.0 = Release|Any CPU
{A3DE5654-7755-45C8-8AE5-5B5B00BEB248}.Release|x86.ActiveCfg = Release|Any CPU {A3DE5654-7755-45C8-8AE5-5B5B00BEB248}.Release|x86.ActiveCfg = Release|Any CPU
{A3DE5654-7755-45C8-8AE5-5B5B00BEB248}.Release|x86.Build.0 = Release|Any CPU {A3DE5654-7755-45C8-8AE5-5B5B00BEB248}.Release|x86.Build.0 = Release|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Debug|x64.ActiveCfg = Debug|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Debug|x64.Build.0 = Debug|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Debug|x86.ActiveCfg = Debug|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Debug|x86.Build.0 = Debug|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Release|Any CPU.Build.0 = Release|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Release|x64.ActiveCfg = Release|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Release|x64.Build.0 = Release|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Release|x86.ActiveCfg = Release|Any CPU
{E2F5F115-0DE4-4CC0-920C-EF6F89D15EAB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View file

@ -1,28 +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 Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.ShellShim.Tests
{
internal class FakeReporter : IReporter
{
public string Message { get; private set; } = "";
public void WriteLine(string message)
{
Message = message;
}
public void WriteLine()
{
throw new NotImplementedException();
}
public void Write(string message)
{
throw new NotImplementedException();
}
}
}

View file

@ -19,10 +19,10 @@ namespace Microsoft.DotNet.ShellShim.Tests
[Fact] [Fact]
public void GivenEnvironmentAndReporterItCanPrintOutInstructionToAddPath() public void GivenEnvironmentAndReporterItCanPrintOutInstructionToAddPath()
{ {
var fakeReporter = new FakeReporter(); var reporter = new BufferedReporter();
var linuxEnvironmentPath = new LinuxEnvironmentPath( var linuxEnvironmentPath = new LinuxEnvironmentPath(
new BashPathUnderHomeDirectory("/myhome", "executable/path"), new BashPathUnderHomeDirectory("/myhome", "executable/path"),
fakeReporter, reporter,
new FakeEnvironmentProvider( new FakeEnvironmentProvider(
new Dictionary<string, string> new Dictionary<string, string>
{ {
@ -33,7 +33,7 @@ namespace Microsoft.DotNet.ShellShim.Tests
linuxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist(); linuxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist();
// similar to https://code.visualstudio.com/docs/setup/mac // similar to https://code.visualstudio.com/docs/setup/mac
fakeReporter.Message.Should().Be( reporter.Lines.Should().Equal(
string.Format( string.Format(
CommonLocalizableStrings.EnvironmentPathLinuxManualInstruction, CommonLocalizableStrings.EnvironmentPathLinuxManualInstruction,
"/myhome/executable/path", "/myhome/executable/path")); "/myhome/executable/path", "/myhome/executable/path"));
@ -42,10 +42,10 @@ namespace Microsoft.DotNet.ShellShim.Tests
[Fact] [Fact]
public void GivenEnvironmentAndReporterItPrintsNothingWhenenvironmentExists() public void GivenEnvironmentAndReporterItPrintsNothingWhenenvironmentExists()
{ {
var fakeReporter = new FakeReporter(); var reporter = new BufferedReporter();
var linuxEnvironmentPath = new LinuxEnvironmentPath( var linuxEnvironmentPath = new LinuxEnvironmentPath(
new BashPathUnderHomeDirectory("/myhome", "executable/path"), new BashPathUnderHomeDirectory("/myhome", "executable/path"),
fakeReporter, reporter,
new FakeEnvironmentProvider( new FakeEnvironmentProvider(
new Dictionary<string, string> new Dictionary<string, string>
{ {
@ -55,16 +55,16 @@ namespace Microsoft.DotNet.ShellShim.Tests
linuxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist(); linuxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist();
fakeReporter.Message.Should().BeEmpty(); reporter.Lines.Should().BeEmpty();
} }
[Fact] [Fact]
public void GivenAddPackageExecutablePathToUserPathJustRunItPrintsInstructionToLogout() public void GivenAddPackageExecutablePathToUserPathJustRunItPrintsInstructionToLogout()
{ {
var fakeReporter = new FakeReporter(); var reporter = new BufferedReporter();
var linuxEnvironmentPath = new LinuxEnvironmentPath( var linuxEnvironmentPath = new LinuxEnvironmentPath(
new BashPathUnderHomeDirectory("/myhome", "executable/path"), new BashPathUnderHomeDirectory("/myhome", "executable/path"),
fakeReporter, reporter,
new FakeEnvironmentProvider( new FakeEnvironmentProvider(
new Dictionary<string, string> new Dictionary<string, string>
{ {
@ -75,8 +75,8 @@ namespace Microsoft.DotNet.ShellShim.Tests
linuxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist(); linuxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist();
fakeReporter.Message.Should() reporter.Lines.Should()
.Be(CommonLocalizableStrings.EnvironmentPathLinuxNeedLogout); .Equal(CommonLocalizableStrings.EnvironmentPathLinuxNeedLogout);
} }
} }
} }

View file

@ -19,10 +19,10 @@ namespace Microsoft.DotNet.ShellShim.Tests
[Fact] [Fact]
public void GivenEnvironmentAndReporterItCanPrintOutInstructionToAddPath() public void GivenEnvironmentAndReporterItCanPrintOutInstructionToAddPath()
{ {
var fakeReporter = new FakeReporter(); var reporter = new BufferedReporter();
var osxEnvironmentPath = new OSXEnvironmentPath( var osxEnvironmentPath = new OSXEnvironmentPath(
new BashPathUnderHomeDirectory("/myhome", "executable/path"), new BashPathUnderHomeDirectory("/myhome", "executable/path"),
fakeReporter, reporter,
new FakeEnvironmentProvider( new FakeEnvironmentProvider(
new Dictionary<string, string> new Dictionary<string, string>
{ {
@ -33,7 +33,7 @@ namespace Microsoft.DotNet.ShellShim.Tests
osxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist(); osxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist();
// similar to https://code.visualstudio.com/docs/setup/mac // similar to https://code.visualstudio.com/docs/setup/mac
fakeReporter.Message.Should().Be( reporter.Lines.Should().Equal(
string.Format( string.Format(
CommonLocalizableStrings.EnvironmentPathOSXManualInstruction, CommonLocalizableStrings.EnvironmentPathOSXManualInstruction,
"/myhome/executable/path", "/myhome/executable/path")); "/myhome/executable/path", "/myhome/executable/path"));
@ -44,10 +44,10 @@ namespace Microsoft.DotNet.ShellShim.Tests
[InlineData("~/executable/path")] [InlineData("~/executable/path")]
public void GivenEnvironmentAndReporterItPrintsNothingWhenenvironmentExists(string existingPath) public void GivenEnvironmentAndReporterItPrintsNothingWhenenvironmentExists(string existingPath)
{ {
var fakeReporter = new FakeReporter(); var reporter = new BufferedReporter();
var osxEnvironmentPath = new OSXEnvironmentPath( var osxEnvironmentPath = new OSXEnvironmentPath(
new BashPathUnderHomeDirectory("/myhome", "executable/path"), new BashPathUnderHomeDirectory("/myhome", "executable/path"),
fakeReporter, reporter,
new FakeEnvironmentProvider( new FakeEnvironmentProvider(
new Dictionary<string, string> new Dictionary<string, string>
{ {
@ -57,16 +57,16 @@ namespace Microsoft.DotNet.ShellShim.Tests
osxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist(); osxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist();
fakeReporter.Message.Should().BeEmpty(); reporter.Lines.Should().BeEmpty();
} }
[Fact] [Fact]
public void GivenAddPackageExecutablePathToUserPathJustRunItPrintsInstructionToLogout() public void GivenAddPackageExecutablePathToUserPathJustRunItPrintsInstructionToLogout()
{ {
var fakeReporter = new FakeReporter(); var reporter = new BufferedReporter();
var osxEnvironmentPath = new OSXEnvironmentPath( var osxEnvironmentPath = new OSXEnvironmentPath(
new BashPathUnderHomeDirectory("/myhome", "executable/path"), new BashPathUnderHomeDirectory("/myhome", "executable/path"),
fakeReporter, reporter,
new FakeEnvironmentProvider( new FakeEnvironmentProvider(
new Dictionary<string, string> new Dictionary<string, string>
{ {
@ -77,7 +77,7 @@ namespace Microsoft.DotNet.ShellShim.Tests
osxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist(); osxEnvironmentPath.PrintAddPathInstructionIfPathDoesNotExist();
fakeReporter.Message.Should().Be(CommonLocalizableStrings.EnvironmentPathOSXNeedReopen); reporter.Lines.Should().Equal(CommonLocalizableStrings.EnvironmentPathOSXNeedReopen);
} }
} }
} }

View file

@ -38,16 +38,21 @@ namespace Microsoft.DotNet.ToolPackage.Tests
Action a = () => ToolConfigurationDeserializer.Deserialize("DotnetToolSettingsMissing.xml"); Action a = () => ToolConfigurationDeserializer.Deserialize("DotnetToolSettingsMissing.xml");
a.ShouldThrow<ToolConfigurationException>() a.ShouldThrow<ToolConfigurationException>()
.And.Message.Should() .And.Message.Should()
.Contain(string.Format(CommonLocalizableStrings.ToolSettingsContainError, string.Empty)); .Contain(CommonLocalizableStrings.ToolSettingsMissingCommandName);
} }
[Fact] [Fact]
public void GivenInvalidCharAsFileNameItThrows() public void GivenInvalidCharAsFileNameItThrows()
{ {
Action a = () => new ToolConfiguration("na\0me", "my.dll"); var invalidCommandName = "na\0me";
Action a = () => new ToolConfiguration(invalidCommandName, "my.dll");
a.ShouldThrow<ArgumentException>() a.ShouldThrow<ArgumentException>()
.And.Message.Should() .And.Message.Should()
.Contain(string.Format(CommonLocalizableStrings.ContainInvalidCharacters, string.Empty)); .Contain(
string.Format(
CommonLocalizableStrings.ToolSettingsInvalidCommandName,
invalidCommandName,
string.Join(", ", Path.GetInvalidFileNameChars().Select(c => $"'{c}'"))));
} }
} }
} }

View file

@ -9,6 +9,7 @@ using FluentAssertions;
using Microsoft.DotNet.Tools.Test.Utilities; using Microsoft.DotNet.Tools.Test.Utilities;
using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.Extensions.EnvironmentAbstractions;
using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Tools; using Microsoft.DotNet.Tools;
using Microsoft.DotNet.Tools.Install.Tool; using Microsoft.DotNet.Tools.Install.Tool;
using Xunit; using Xunit;
@ -21,6 +22,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
[Fact] [Fact]
public void GivenNoFeedItThrows() public void GivenNoFeedItThrows()
{ {
var reporter = new BufferedReporter();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
ToolPackageObtainer packageObtainer = ToolPackageObtainer packageObtainer =
@ -29,7 +31,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
new DirectoryPath("no such path"), new DirectoryPath("no such path"),
GetUniqueTempProjectPathEachTest, GetUniqueTempProjectPathEachTest,
new Lazy<string>(), new Lazy<string>(),
new ProjectRestorer()); new ProjectRestorer(reporter));
Action a = () => packageObtainer.ObtainAndReturnExecutablePath( Action a = () => packageObtainer.ObtainAndReturnExecutablePath(
packageId: TestPackageId, packageId: TestPackageId,
@ -37,11 +39,15 @@ namespace Microsoft.DotNet.ToolPackage.Tests
targetframework: _testTargetframework); targetframework: _testTargetframework);
a.ShouldThrow<PackageObtainException>(); a.ShouldThrow<PackageObtainException>();
reporter.Lines.Count.Should().Be(1);
reporter.Lines[0].Should().Contain(TestPackageId);
} }
[Fact] [Fact]
public void GivenOfflineFeedWhenCallItCanDownloadThePackage() public void GivenOfflineFeedWhenCallItCanDownloadThePackage()
{ {
var reporter = new BufferedReporter();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
ToolPackageObtainer packageObtainer = ToolPackageObtainer packageObtainer =
@ -50,7 +56,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
offlineFeedPath: new DirectoryPath(GetTestLocalFeedPath()), offlineFeedPath: new DirectoryPath(GetTestLocalFeedPath()),
getTempProjectPath: GetUniqueTempProjectPathEachTest, getTempProjectPath: GetUniqueTempProjectPathEachTest,
bundledTargetFrameworkMoniker: new Lazy<string>(), bundledTargetFrameworkMoniker: new Lazy<string>(),
projectRestorer: new ProjectRestorer()); projectRestorer: new ProjectRestorer(reporter));
ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath = ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath =
packageObtainer.ObtainAndReturnExecutablePath( packageObtainer.ObtainAndReturnExecutablePath(
@ -58,6 +64,8 @@ namespace Microsoft.DotNet.ToolPackage.Tests
packageVersion: TestPackageVersion, packageVersion: TestPackageVersion,
targetframework: _testTargetframework); targetframework: _testTargetframework);
reporter.Lines.Should().BeEmpty();
var executable = toolConfigurationAndExecutablePath var executable = toolConfigurationAndExecutablePath
.Executable; .Executable;
@ -77,11 +85,12 @@ namespace Microsoft.DotNet.ToolPackage.Tests
public void GivenNugetConfigAndPackageNameAndVersionAndTargetFrameworkWhenCallItCanDownloadThePackage( public void GivenNugetConfigAndPackageNameAndVersionAndTargetFrameworkWhenCallItCanDownloadThePackage(
bool testMockBehaviorIsInSync) bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
FilePath nugetConfigPath = WriteNugetConfigFileToPointToTheFeed(); FilePath nugetConfigPath = WriteNugetConfigFileToPointToTheFeed();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
var packageObtainer = var packageObtainer =
ConstructDefaultPackageObtainer(toolsPath, testMockBehaviorIsInSync, nugetConfigPath.Value); ConstructDefaultPackageObtainer(toolsPath, reporter, testMockBehaviorIsInSync, nugetConfigPath.Value);
ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath
= packageObtainer.ObtainAndReturnExecutablePath( = packageObtainer.ObtainAndReturnExecutablePath(
@ -90,6 +99,8 @@ namespace Microsoft.DotNet.ToolPackage.Tests
nugetconfig: nugetConfigPath, nugetconfig: nugetConfigPath,
targetframework: _testTargetframework); targetframework: _testTargetframework);
reporter.Lines.Should().BeEmpty();
FilePath executable = toolConfigurationAndExecutablePath.Executable; FilePath executable = toolConfigurationAndExecutablePath.Executable;
File.Exists(executable.Value) File.Exists(executable.Value)
.Should() .Should()
@ -104,11 +115,12 @@ namespace Microsoft.DotNet.ToolPackage.Tests
public void GivenNugetConfigAndPackageNameAndVersionAndTargetFrameworkWhenCallItCreateAssetFile( public void GivenNugetConfigAndPackageNameAndVersionAndTargetFrameworkWhenCallItCreateAssetFile(
bool testMockBehaviorIsInSync) bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed(); var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
var packageObtainer = var packageObtainer =
ConstructDefaultPackageObtainer(toolsPath, testMockBehaviorIsInSync, nugetConfigPath.Value); ConstructDefaultPackageObtainer(toolsPath, reporter, testMockBehaviorIsInSync, nugetConfigPath.Value);
ToolConfigurationAndExecutablePath toolConfigurationAndExecutableDirectory = ToolConfigurationAndExecutablePath toolConfigurationAndExecutableDirectory =
packageObtainer.ObtainAndReturnExecutablePath( packageObtainer.ObtainAndReturnExecutablePath(
@ -117,6 +129,8 @@ namespace Microsoft.DotNet.ToolPackage.Tests
nugetconfig: nugetConfigPath, nugetconfig: nugetConfigPath,
targetframework: _testTargetframework); targetframework: _testTargetframework);
reporter.Lines.Should().BeEmpty();
/* /*
From mytool.dll to project.assets.json From mytool.dll to project.assets.json
.dotnet/.tools/packageid/version/packageid/version/mytool.dll .dotnet/.tools/packageid/version/packageid/version/mytool.dll
@ -146,6 +160,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
[InlineData(true)] [InlineData(true)]
public void GivenAllButNoNugetConfigFilePathItCanDownloadThePackage(bool testMockBehaviorIsInSync) public void GivenAllButNoNugetConfigFilePathItCanDownloadThePackage(bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
var uniqueTempProjectPath = GetUniqueTempProjectPathEachTest(); var uniqueTempProjectPath = GetUniqueTempProjectPathEachTest();
var tempProjectDirectory = uniqueTempProjectPath.GetDirectoryPath(); var tempProjectDirectory = uniqueTempProjectPath.GetDirectoryPath();
var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed(); var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed();
@ -171,7 +186,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
new DirectoryPath("no such path"), new DirectoryPath("no such path"),
() => uniqueTempProjectPath, () => uniqueTempProjectPath,
new Lazy<string>(), new Lazy<string>(),
new ProjectRestorer()); new ProjectRestorer(reporter));
} }
ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath = ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath =
@ -180,6 +195,8 @@ namespace Microsoft.DotNet.ToolPackage.Tests
packageVersion: TestPackageVersion, packageVersion: TestPackageVersion,
targetframework: _testTargetframework); targetframework: _testTargetframework);
reporter.Lines.Should().BeEmpty();
var executable = toolConfigurationAndExecutablePath.Executable; var executable = toolConfigurationAndExecutablePath.Executable;
File.Exists(executable.Value) File.Exists(executable.Value)
@ -194,11 +211,12 @@ namespace Microsoft.DotNet.ToolPackage.Tests
[InlineData(true)] [InlineData(true)]
public void GivenAllButNoPackageVersionItCanDownloadThePackage(bool testMockBehaviorIsInSync) public void GivenAllButNoPackageVersionItCanDownloadThePackage(bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed(); var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
var packageObtainer = var packageObtainer =
ConstructDefaultPackageObtainer(toolsPath, testMockBehaviorIsInSync, nugetConfigPath.Value); ConstructDefaultPackageObtainer(toolsPath, reporter, testMockBehaviorIsInSync, nugetConfigPath.Value);
ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath = ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath =
packageObtainer.ObtainAndReturnExecutablePath( packageObtainer.ObtainAndReturnExecutablePath(
@ -206,6 +224,8 @@ namespace Microsoft.DotNet.ToolPackage.Tests
nugetconfig: nugetConfigPath, nugetconfig: nugetConfigPath,
targetframework: _testTargetframework); targetframework: _testTargetframework);
reporter.Lines.Should().BeEmpty();
var executable = toolConfigurationAndExecutablePath.Executable; var executable = toolConfigurationAndExecutablePath.Executable;
File.Exists(executable.Value) File.Exists(executable.Value)
@ -220,22 +240,27 @@ namespace Microsoft.DotNet.ToolPackage.Tests
[InlineData(true)] [InlineData(true)]
public void GivenAllButNoPackageVersionAndInvokeTwiceItShouldNotThrow(bool testMockBehaviorIsInSync) public void GivenAllButNoPackageVersionAndInvokeTwiceItShouldNotThrow(bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed(); var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
var packageObtainer = var packageObtainer =
ConstructDefaultPackageObtainer(toolsPath, testMockBehaviorIsInSync, nugetConfigPath.Value); ConstructDefaultPackageObtainer(toolsPath, reporter, testMockBehaviorIsInSync, nugetConfigPath.Value);
packageObtainer.ObtainAndReturnExecutablePath( packageObtainer.ObtainAndReturnExecutablePath(
packageId: TestPackageId, packageId: TestPackageId,
nugetconfig: nugetConfigPath, nugetconfig: nugetConfigPath,
targetframework: _testTargetframework); targetframework: _testTargetframework);
reporter.Lines.Should().BeEmpty();
Action secondCall = () => packageObtainer.ObtainAndReturnExecutablePath( Action secondCall = () => packageObtainer.ObtainAndReturnExecutablePath(
packageId: TestPackageId, packageId: TestPackageId,
nugetconfig: nugetConfigPath, nugetconfig: nugetConfigPath,
targetframework: _testTargetframework); targetframework: _testTargetframework);
reporter.Lines.Should().BeEmpty();
secondCall.ShouldNotThrow(); secondCall.ShouldNotThrow();
} }
@ -244,6 +269,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
[InlineData(true)] [InlineData(true)]
public void GivenAllButNoTargetFrameworkItCanDownloadThePackage(bool testMockBehaviorIsInSync) public void GivenAllButNoTargetFrameworkItCanDownloadThePackage(bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed(); var nugetConfigPath = WriteNugetConfigFileToPointToTheFeed();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
@ -261,7 +287,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
{ {
new MockFeedPackage new MockFeedPackage
{ {
PackageId = "global.tool.console.demo", PackageId = TestPackageId,
Version = "1.0.4" Version = "1.0.4"
} }
} }
@ -275,7 +301,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
new DirectoryPath("no such path"), new DirectoryPath("no such path"),
GetUniqueTempProjectPathEachTest, GetUniqueTempProjectPathEachTest,
new Lazy<string>(() => BundledTargetFramework.GetTargetFrameworkMoniker()), new Lazy<string>(() => BundledTargetFramework.GetTargetFrameworkMoniker()),
new ProjectRestorer()); new ProjectRestorer(reporter));
} }
ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath = ToolConfigurationAndExecutablePath toolConfigurationAndExecutablePath =
packageObtainer.ObtainAndReturnExecutablePath( packageObtainer.ObtainAndReturnExecutablePath(
@ -283,6 +309,8 @@ namespace Microsoft.DotNet.ToolPackage.Tests
packageVersion: TestPackageVersion, packageVersion: TestPackageVersion,
nugetconfig: nugetConfigPath); nugetconfig: nugetConfigPath);
reporter.Lines.Should().BeEmpty();
var executable = toolConfigurationAndExecutablePath.Executable; var executable = toolConfigurationAndExecutablePath.Executable;
File.Exists(executable.Value) File.Exists(executable.Value)
@ -297,10 +325,11 @@ namespace Microsoft.DotNet.ToolPackage.Tests
[InlineData(true)] [InlineData(true)]
public void GivenNonExistentNugetConfigFileItThrows(bool testMockBehaviorIsInSync) public void GivenNonExistentNugetConfigFileItThrows(bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
var packageObtainer = var packageObtainer =
ConstructDefaultPackageObtainer(toolsPath, testMockBehaviorIsInSync); ConstructDefaultPackageObtainer(toolsPath, reporter, testMockBehaviorIsInSync);
var nonExistNugetConfigFile = new FilePath("NonExistent.file"); var nonExistNugetConfigFile = new FilePath("NonExistent.file");
Action a = () => Action a = () =>
@ -317,6 +346,8 @@ namespace Microsoft.DotNet.ToolPackage.Tests
.Message.Should().Contain(string.Format( .Message.Should().Contain(string.Format(
CommonLocalizableStrings.NuGetConfigurationFileDoesNotExist, CommonLocalizableStrings.NuGetConfigurationFileDoesNotExist,
Path.GetFullPath(nonExistNugetConfigFile.Value))); Path.GetFullPath(nonExistNugetConfigFile.Value)));
reporter.Lines.Should().BeEmpty();
} }
[Theory] [Theory]
@ -324,15 +355,18 @@ namespace Microsoft.DotNet.ToolPackage.Tests
[InlineData(true)] [InlineData(true)]
public void GivenASourceItCanObtainThePackageFromThatSource(bool testMockBehaviorIsInSync) public void GivenASourceItCanObtainThePackageFromThatSource(bool testMockBehaviorIsInSync)
{ {
var reporter = new BufferedReporter();
var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName()); var toolsPath = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
var packageObtainer = ConstructDefaultPackageObtainer(toolsPath); var packageObtainer = ConstructDefaultPackageObtainer(toolsPath, reporter);
var toolConfigurationAndExecutableDirectory = packageObtainer.ObtainAndReturnExecutablePath( var toolConfigurationAndExecutableDirectory = packageObtainer.ObtainAndReturnExecutablePath(
packageId: TestPackageId, packageId: TestPackageId,
packageVersion: TestPackageVersion, packageVersion: TestPackageVersion,
targetframework: _testTargetframework, targetframework: _testTargetframework,
source:GetTestLocalFeedPath()); source:GetTestLocalFeedPath());
reporter.Lines.Should().BeEmpty();
var executable = toolConfigurationAndExecutableDirectory.Executable; var executable = toolConfigurationAndExecutableDirectory.Executable;
File.Exists(executable.Value) File.Exists(executable.Value)
@ -353,6 +387,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
private static IToolPackageObtainer ConstructDefaultPackageObtainer( private static IToolPackageObtainer ConstructDefaultPackageObtainer(
string toolsPath, string toolsPath,
IReporter reporter,
bool testMockBehaviorIsInSync = false, bool testMockBehaviorIsInSync = false,
string addNugetConfigFeedWithFilePath = null, string addNugetConfigFeedWithFilePath = null,
string addSourceFeedWithFilePath = null) string addSourceFeedWithFilePath = null)
@ -372,7 +407,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
{ {
new MockFeedPackage new MockFeedPackage
{ {
PackageId = "global.tool.console.demo", PackageId = TestPackageId,
Version = "1.0.4" Version = "1.0.4"
} }
} }
@ -393,7 +428,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
{ {
new MockFeedPackage new MockFeedPackage
{ {
PackageId = "global.tool.console.demo", PackageId = TestPackageId,
Version = "1.0.4" Version = "1.0.4"
} }
} }
@ -409,7 +444,7 @@ namespace Microsoft.DotNet.ToolPackage.Tests
new DirectoryPath("no such path"), new DirectoryPath("no such path"),
GetUniqueTempProjectPathEachTest, GetUniqueTempProjectPathEachTest,
new Lazy<string>(), new Lazy<string>(),
new ProjectRestorer()); new ProjectRestorer(reporter));
} }
private static FilePath WriteNugetConfigFileToPointToTheFeed() private static FilePath WriteNugetConfigFileToPointToTheFeed()

View file

@ -56,7 +56,8 @@ namespace Microsoft.DotNet.Tools.Tests.ComponentMocks
string packageVersion = null, string packageVersion = null,
FilePath? nugetconfig = null, FilePath? nugetconfig = null,
string targetframework = null, string targetframework = null,
string source = null) string source = null,
string verbosity = null)
{ {
_beforeRunObtain(); _beforeRunObtain();

View file

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public class BufferedReporter : IReporter
{
public List<string> Lines { get; private set; } = new List<string>();
public void WriteLine(string message)
{
Lines.Add(message);
}
public void WriteLine()
{
Lines.Add("");
}
public void Write(string message)
{
throw new NotImplementedException();
}
}
}

View file

@ -0,0 +1,20 @@
// 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.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public sealed class InstallCommand : DotnetCommand
{
public override CommandResult Execute(string args = "")
{
return base.Execute($"install {args}");
}
public override CommandResult ExecuteWithCapturedOutput(string args = "")
{
return base.ExecuteWithCapturedOutput($"install {args}");
}
}
}

View file

@ -0,0 +1,42 @@
// 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 FluentAssertions;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
namespace Microsoft.DotNet.Cli.Install.Tests
{
public class GivenDotnetInstallTool : TestBase
{
[Fact]
public void ItRunsWithQuietVerbosityByDefault()
{
var result = new InstallCommand()
.ExecuteWithCapturedOutput("tool -g nonexistent_tool_package");
result
.Should()
.Fail()
.And
.NotHaveStdOutContaining("Restoring");
}
[Fact]
public void ItRunsWithTheSpecifiedVerbosity()
{
var result = new InstallCommand()
.ExecuteWithCapturedOutput("tool -g -v:m nonexistent_tool_package");
result
.Should()
.Fail();
result
.StdOut
.Should()
.ContainVisuallySameFragmentIfNotLocalized("Restoring");
}
}
}

View file

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AssemblyName>dotnet-install-tool.Tests</AssemblyName>
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4;portable-net451+win8</AssetTargetFallback>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.2.0" />
</ItemGroup>
</Project>

View file

@ -12,6 +12,7 @@ using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.ToolPackage;
using Microsoft.DotNet.Tools.Install.Tool; using Microsoft.DotNet.Tools.Install.Tool;
using Microsoft.DotNet.Tools.Tests.ComponentMocks; using Microsoft.DotNet.Tools.Tests.ComponentMocks;
using Microsoft.DotNet.Tools.Test.Utilities;
using Microsoft.Extensions.DependencyModel.Tests; using Microsoft.Extensions.DependencyModel.Tests;
using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.Extensions.EnvironmentAbstractions;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -29,7 +30,7 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
private readonly EnvironmentPathInstructionMock _environmentPathInstructionMock; private readonly EnvironmentPathInstructionMock _environmentPathInstructionMock;
private readonly AppliedOption _appliedCommand; private readonly AppliedOption _appliedCommand;
private readonly ParseResult _parseResult; private readonly ParseResult _parseResult;
private readonly FakeReporter _fakeReporter; private readonly BufferedReporter _reporter;
private const string PathToPlaceShim = "pathToPlace"; private const string PathToPlaceShim = "pathToPlace";
public InstallToolCommandTests() public InstallToolCommandTests()
@ -37,9 +38,9 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
_fileSystemWrapper = new FileSystemMockBuilder().Build(); _fileSystemWrapper = new FileSystemMockBuilder().Build();
_toolPackageObtainerMock = new ToolPackageObtainerMock(_fileSystemWrapper); _toolPackageObtainerMock = new ToolPackageObtainerMock(_fileSystemWrapper);
_shellShimMakerMock = new ShellShimMakerMock(PathToPlaceShim, _fileSystemWrapper); _shellShimMakerMock = new ShellShimMakerMock(PathToPlaceShim, _fileSystemWrapper);
_fakeReporter = new FakeReporter(); _reporter = new BufferedReporter();
_environmentPathInstructionMock = _environmentPathInstructionMock =
new EnvironmentPathInstructionMock(_fakeReporter, PathToPlaceShim); new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim);
ParseResult result = Parser.Instance.Parse("dotnet install tool -g global.tool.console.demo"); ParseResult result = Parser.Instance.Parse("dotnet install tool -g global.tool.console.demo");
_appliedCommand = result["dotnet"]["install"]["tool"]; _appliedCommand = result["dotnet"]["install"]["tool"];
@ -56,7 +57,7 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
_shellShimMakerMock, _shellShimMakerMock,
_environmentPathInstructionMock); _environmentPathInstructionMock);
installToolCommand.Execute(); installToolCommand.Execute().Should().Be(0);
// It is hard to simulate shell behavior. Only Assert shim can point to executable dll // It is hard to simulate shell behavior. Only Assert shim can point to executable dll
_fileSystemWrapper.File.Exists(Path.Combine("pathToPlace", ToolPackageObtainerMock.FakeCommandName)) _fileSystemWrapper.File.Exists(Path.Combine("pathToPlace", ToolPackageObtainerMock.FakeCommandName))
@ -99,7 +100,7 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
_shellShimMakerMock, _shellShimMakerMock,
_environmentPathInstructionMock); _environmentPathInstructionMock);
installToolCommand.Execute(); installToolCommand.Execute().Should().Be(0);
// It is hard to simulate shell behavior. Only Assert shim can point to executable dll // It is hard to simulate shell behavior. Only Assert shim can point to executable dll
_fileSystemWrapper.File.Exists(Path.Combine("pathToPlace", ToolPackageObtainerMock.FakeCommandName)) _fileSystemWrapper.File.Exists(Path.Combine("pathToPlace", ToolPackageObtainerMock.FakeCommandName))
@ -121,13 +122,13 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
_shellShimMakerMock, _shellShimMakerMock,
_environmentPathInstructionMock); _environmentPathInstructionMock);
installToolCommand.Execute(); installToolCommand.Execute().Should().Be(0);
_fakeReporter.Message.Single().Should().NotBeEmpty(); _reporter.Lines.Single().Should().NotBeEmpty();
} }
[Fact] [Fact]
public void GivenFailedPackageObtainWhenRunWithPackageIdItShouldThrow() public void GivenFailedPackageObtainWhenRunWithPackageIdItShouldFail()
{ {
var toolPackageObtainerSimulatorThatThrows var toolPackageObtainerSimulatorThatThrows
= new ToolPackageObtainerMock( = new ToolPackageObtainerMock(
@ -139,17 +140,25 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
toolPackageObtainerSimulatorThatThrows, toolPackageObtainerSimulatorThatThrows,
_shellShimMakerMock, _shellShimMakerMock,
_environmentPathInstructionMock, _environmentPathInstructionMock,
_fakeReporter); _reporter);
Action a = () => installToolCommand.Execute(); installToolCommand.Execute().Should().Be(1);
a.ShouldThrow<GracefulException>() _reporter.Lines.Count.Should().Be(2);
.And.Message.Should()
.Contain(string.Format(LocalizableStrings.InstallFailedNuget, "Simulated error")); _reporter
.Lines[0]
.Should()
.Contain("Simulated error");
_reporter
.Lines[1]
.Should()
.Contain(string.Format(LocalizableStrings.ToolInstallationFailed, "global.tool.console.demo"));
} }
[Fact] [Fact]
public void GivenInCorrectToolConfigurationWhenRunWithPackageIdItShouldThrow() public void GivenInCorrectToolConfigurationWhenRunWithPackageIdItShouldFail()
{ {
var toolPackageObtainerSimulatorThatThrows var toolPackageObtainerSimulatorThatThrows
= new ToolPackageObtainerMock( = new ToolPackageObtainerMock(
@ -161,12 +170,24 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
toolPackageObtainerSimulatorThatThrows, toolPackageObtainerSimulatorThatThrows,
_shellShimMakerMock, _shellShimMakerMock,
_environmentPathInstructionMock, _environmentPathInstructionMock,
_fakeReporter); _reporter);
Action a = () => installToolCommand.Execute(); installToolCommand.Execute().Should().Be(1);
a.ShouldThrow<GracefulException>()
.And.Message.Should() _reporter.Lines.Count.Should().Be(2);
.Contain(string.Format(LocalizableStrings.InstallFailedPackage, "Simulated error"));
_reporter
.Lines[0]
.Should()
.Contain(
string.Format(
LocalizableStrings.InvalidToolConfiguration,
"Simulated error"));
_reporter
.Lines[1]
.Should()
.Contain(string.Format(LocalizableStrings.ToolInstallationFailedContactAuthor, "global.tool.console.demo"));
} }
[Fact] [Fact]
@ -177,35 +198,15 @@ namespace Microsoft.DotNet.Tests.InstallToolCommandTests
_parseResult, _parseResult,
_toolPackageObtainerMock, _toolPackageObtainerMock,
_shellShimMakerMock, _shellShimMakerMock,
new EnvironmentPathInstructionMock(_fakeReporter, PathToPlaceShim, true), new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true),
_fakeReporter); _reporter);
installToolCommand.Execute(); installToolCommand.Execute().Should().Be(0);
_fakeReporter _reporter
.Message .Lines
.Single().Should() .Single().Should()
.Contain(string.Format(LocalizableStrings.InstallationSucceeded, "SimulatorCommand")); .Contain(string.Format(LocalizableStrings.InstallationSucceeded, "SimulatorCommand"));
} }
internal class FakeReporter : IReporter
{
public List<string> Message { get; set; } = new List<string>();
public void WriteLine(string message)
{
Message.Add(message);
}
public void WriteLine()
{
throw new NotImplementedException();
}
public void Write(string message)
{
throw new NotImplementedException();
}
}
} }
} }

View file

@ -68,5 +68,16 @@ namespace Microsoft.DotNet.Tests.ParserTests
var appliedOptions = result["dotnet"]["install"]["tool"]; var appliedOptions = result["dotnet"]["install"]["tool"];
appliedOptions.ValueOrDefault<bool>("global").Should().Be(true); appliedOptions.ValueOrDefault<bool>("global").Should().Be(true);
} }
[Fact]
public void InstallToolParserCanParseVerbosityOption()
{
const string expectedVerbosityLevel = "diag";
var result = Parser.Instance.Parse($"dotnet install tool -g --verbosity:{expectedVerbosityLevel} console.test.app");
var appliedOptions = result["dotnet"]["install"]["tool"];
appliedOptions.SingleArgumentOrDefault("verbosity").Should().Be(expectedVerbosityLevel);
}
} }
} }