Update tool (#8794)

This commit is contained in:
William Lee 2018-03-15 19:45:11 -07:00 committed by GitHub
parent 3d13658f97
commit 3f09a889d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 2855 additions and 57 deletions

View file

@ -22,6 +22,7 @@ using Microsoft.DotNet.Tools.Uninstall;
using Microsoft.DotNet.Tools.VSTest;
using System.Collections.Generic;
using Microsoft.DotNet.Tools.Install;
using Microsoft.DotNet.Tools.Update;
namespace Microsoft.DotNet.Cli
{
@ -154,6 +155,10 @@ namespace Microsoft.DotNet.Cli
{
Command = UninstallCommand.Run
},
["update"] = new BuiltInCommandMetadata
{
Command = UpdateCommand.Run
},
["internal-reportinstallsuccess"] = new BuiltInCommandMetadata
{
Command = InternalReportinstallsuccess.Run

View file

@ -57,6 +57,7 @@ namespace Microsoft.DotNet.Cli
InternalReportinstallsuccessCommandParser.InternalReportinstallsuccess(),
InstallCommandParser.Install(),
UninstallCommandParser.Uninstall(),
UpdateCommandParser.Update(),
CommonOptions.HelpOption(),
Create.Option("--info", ""),
Create.Option("-d", ""),

View file

@ -30,6 +30,7 @@ path-to-application:
store {LocalizableStrings.StoreDefinition}
install {LocalizableStrings.InstallDefinition}
uninstall {LocalizableStrings.UninstallDefinition}
update {LocalizableStrings.UpdateDefinition}
help {LocalizableStrings.HelpDefinition}
{LocalizableStrings.CommonOptions}:

View file

@ -273,4 +273,7 @@
<data name="UninstallDefinition" xml:space="preserve">
<value>Uninstalls an item from the development environment.</value>
</data>
<data name="UpdateDefinition" xml:space="preserve">
<value>Updates an item in the development environment.</value>
</data>
</root>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -262,6 +262,11 @@
<target state="new">Uninstalls an item from the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateDefinition">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -123,4 +123,4 @@
<data name="CommandDescription" xml:space="preserve">
<value>Installs an item into the development environment.</value>
</data>
</root>
</root>

View file

@ -161,41 +161,10 @@ namespace Microsoft.DotNet.Tools.Install.Tool
package.Version.ToNormalizedString()).Green());
return 0;
}
catch (ToolPackageException ex)
catch (Exception ex) when (InstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
{
throw new GracefulException(
messages: new[]
{
ex.Message,
string.Format(LocalizableStrings.ToolInstallationFailed, _packageId),
},
verboseMessages: new[] {ex.ToString()},
isUserError: false);
}
catch (ToolConfigurationException ex)
{
throw new GracefulException(
messages: new[]
{
string.Format(
LocalizableStrings.InvalidToolConfiguration,
ex.Message),
string.Format(LocalizableStrings.ToolInstallationFailedContactAuthor, _packageId)
},
verboseMessages: new[] {ex.ToString()},
isUserError: false);
}
catch (ShellShimException ex)
{
throw new GracefulException(
messages: new[]
{
string.Format(
LocalizableStrings.FailedToCreateToolShim,
_packageId,
ex.Message),
string.Format(LocalizableStrings.ToolInstallationFailed, _packageId)
},
messages: InstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId),
verboseMessages: new[] {ex.ToString()},
isUserError: false);
}

View file

@ -0,0 +1,56 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using Microsoft.DotNet.ShellShim;
using Microsoft.DotNet.ToolPackage;
namespace Microsoft.DotNet.Tools.Install.Tool
{
internal static class InstallToolCommandLowLevelErrorConverter
{
public static IEnumerable<string> GetUserFacingMessages(Exception ex, PackageId packageId)
{
string[] userFacingMessages = null;
if (ex is ToolPackageException)
{
userFacingMessages = new[]
{
ex.Message,
string.Format(LocalizableStrings.ToolInstallationFailed, packageId),
};
}
else if (ex is ToolConfigurationException)
{
userFacingMessages = new[]
{
string.Format(
LocalizableStrings.InvalidToolConfiguration,
ex.Message),
string.Format(LocalizableStrings.ToolInstallationFailedContactAuthor, packageId)
};
}
else if (ex is ShellShimException)
{
userFacingMessages = new[]
{
string.Format(
LocalizableStrings.FailedToCreateToolShim,
packageId,
ex.Message),
string.Format(LocalizableStrings.ToolInstallationFailed, packageId)
};
}
return userFacingMessages;
}
public static bool ShouldConvertToUserFacingError(Exception ex)
{
return ex is ToolPackageException
|| ex is ToolConfigurationException
|| ex is ShellShimException;
}
}
}

View file

@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Transactions;
@ -119,27 +120,11 @@ namespace Microsoft.DotNet.Tools.Uninstall.Tool
package.Version.ToNormalizedString()).Green());
return 0;
}
catch (ToolPackageException ex)
catch (Exception ex) when (UninstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
{
throw new GracefulException(
messages: new[]
{
ex.Message
},
verboseMessages: new[] { ex.ToString() },
isUserError: false);
}
catch (Exception ex) when (ex is ToolConfigurationException || ex is ShellShimException)
{
throw new GracefulException(
messages: new[]
{
string.Format(
LocalizableStrings.FailedToUninstallTool,
packageId,
ex.Message)
},
verboseMessages: new[] { ex.ToString() },
messages: UninstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, packageId),
verboseMessages: new[] {ex.ToString()},
isUserError: false);
}
}

View file

@ -0,0 +1,44 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using Microsoft.DotNet.ShellShim;
using Microsoft.DotNet.ToolPackage;
namespace Microsoft.DotNet.Tools.Uninstall.Tool
{
internal static class UninstallToolCommandLowLevelErrorConverter
{
public static IEnumerable<string> GetUserFacingMessages(Exception ex, PackageId packageId)
{
string[] userFacingMessages = null;
if (ex is ToolPackageException)
{
userFacingMessages = new[]
{
ex.Message
};
}
else if (ex is ToolConfigurationException || ex is ShellShimException)
{
userFacingMessages = new[]
{
String.Format(
LocalizableStrings.FailedToUninstallTool,
packageId,
ex.Message)
};
}
return userFacingMessages;
}
public static bool ShouldConvertToUserFacingError(Exception ex)
{
return ex is ToolPackageException
|| ex is ToolConfigurationException
|| ex is ShellShimException;
}
}
}

View file

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="UpdateFullCommandName" xml:space="preserve">
<value>.NET Update Command</value>
</data>
<data name="CommandDescription" xml:space="preserve">
<value>Updates an item in the development environment.</value>
</data>
<data name="UpdateArgumentDescription" xml:space="preserve">
<value>The NuGet package identifier of the tool to update.</value>
</data>
</root>

View file

@ -0,0 +1,30 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.Update
{
public class UpdateCommand : DotNetTopLevelCommandBase
{
protected override string CommandName => "update";
protected override string FullCommandNameLocalized => LocalizableStrings.UpdateFullCommandName;
protected override string ArgumentName => Constants.ToolPackageArgumentName;
protected override string ArgumentDescriptionLocalized => LocalizableStrings.UpdateArgumentDescription;
internal override Dictionary<string, Func<AppliedOption, CommandBase>> SubCommands =>
new Dictionary<string, Func<AppliedOption, CommandBase>>
{
["tool"] = options => new Tool.UpdateToolCommand(options["tool"], ParseResult)
};
public static int Run(string[] args)
{
return new UpdateCommand().RunCommand(args);
}
}
}

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.CommandLine;
namespace Microsoft.DotNet.Cli
{
internal static class UpdateCommandParser
{
public static Command Update()
{
return Create.Command(
"update",
Tools.Update.LocalizableStrings.CommandDescription,
Accept.NoArguments(),
CommonOptions.HelpOption(),
UpdateToolCommandParser.Update());
}
}
}

View file

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="PackageIdArgumentName" xml:space="preserve">
<value>PACKAGE_ID</value>
</data>
<data name="PackageIdArgumentDescription" xml:space="preserve">
<value>NuGet Package Id of the tool to update.</value>
</data>
<data name="SpecifyExactlyOnePackageId" xml:space="preserve">
<value>Please specify one tool Package Id to update.</value>
</data>
<data name="VersionOptionDescription" xml:space="preserve">
<value>Version of the tool package in NuGet.</value>
</data>
<data name="SourceOptionDescription" xml:space="preserve">
<value>Specifies a NuGet package source to use during update.</value>
</data>
<data name="SourceOptionName" xml:space="preserve">
<value>SOURCE</value>
</data>
<data name="CommandDescription" xml:space="preserve">
<value>Updates a tool to the latest stable version for use.</value>
</data>
<data name="ConfigFileOptionDescription" xml:space="preserve">
<value>The NuGet configuration file to use.</value>
</data>
<data name="FrameworkOptionDescription" xml:space="preserve">
<value>The target framework to update the tool for.</value>
</data>
<data name="NuGetConfigurationFileDoesNotExist" xml:space="preserve">
<value>NuGet configuration file '{0}' does not exist.</value>
</data>
<data name="UpdateSucceeded" xml:space="preserve">
<value>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</value>
</data>
<data name="GlobalOptionDescription" xml:space="preserve">
<value>Update user wide.</value>
</data>
<data name="UpdateFullCommandNameLocalized" xml:space="preserve">
<value>.NET update Command</value>
</data>
<data name="UpdateToolCommandNeedGlobalOrToolPath" xml:space="preserve">
<value>Please specify either the global option (--global) or the tool path option (--tool-path).</value>
</data>
<data name="UpdateToolCommandInvalidGlobalAndToolPath" xml:space="preserve">
<value>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</value>
</data>
<data name="ToolPathDescription" xml:space="preserve">
<value>Location where the tool will be installed.</value>
</data>
<data name="ToolHasMultipleVersionsInstalled" xml:space="preserve">
<value>Tool '{0}' has multiple versions installed and cannot be updated.</value>
</data>
<data name="ToolNotInstalled" xml:space="preserve">
<value>Tool '{0}' is not currently installed.</value>
</data>
<data name="UpdateSucceededVersionNoChange" xml:space="preserve">
<value>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</value>
</data>
<data name="UpdateToolFailed" xml:space="preserve">
<value>Tool '{0}' failed to update due to the following:</value>
</data>
</root>

View file

@ -0,0 +1,246 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Transactions;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ShellShim;
using Microsoft.DotNet.ToolPackage;
using Microsoft.DotNet.Tools.Install.Tool;
using Microsoft.DotNet.Tools.Uninstall.Tool;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.Tools.Update.Tool
{
internal delegate IShellShimRepository CreateShellShimRepository(DirectoryPath? nonGlobalLocation = null);
internal delegate (IToolPackageStore, IToolPackageInstaller) CreateToolPackageStoreAndInstaller(
DirectoryPath? nonGlobalLocation = null);
internal class UpdateToolCommand : CommandBase
{
private readonly IReporter _reporter;
private readonly IReporter _errorReporter;
private readonly CreateShellShimRepository _createShellShimRepository;
private readonly CreateToolPackageStoreAndInstaller _createToolPackageStoreAndInstaller;
private readonly PackageId _packageId;
private readonly string _configFilePath;
private readonly string _framework;
private readonly string _source;
private readonly bool _global;
private readonly string _verbosity;
private readonly string _toolPath;
public UpdateToolCommand(AppliedOption appliedCommand,
ParseResult parseResult,
CreateToolPackageStoreAndInstaller createToolPackageStoreAndInstaller = null,
CreateShellShimRepository createShellShimRepository = null,
IReporter reporter = null)
: base(parseResult)
{
if (appliedCommand == null)
{
throw new ArgumentNullException(nameof(appliedCommand));
}
_packageId = new PackageId(appliedCommand.Arguments.Single());
_configFilePath = appliedCommand.ValueOrDefault<string>("configfile");
_framework = appliedCommand.ValueOrDefault<string>("framework");
_source = appliedCommand.ValueOrDefault<string>("source");
_global = appliedCommand.ValueOrDefault<bool>("global");
_verbosity = appliedCommand.SingleArgumentOrDefault("verbosity");
_toolPath = appliedCommand.SingleArgumentOrDefault("tool-path");
_createToolPackageStoreAndInstaller = createToolPackageStoreAndInstaller ??
ToolPackageFactory.CreateToolPackageStoreAndInstaller;
_createShellShimRepository =
createShellShimRepository ?? ShellShimRepositoryFactory.CreateShellShimRepository;
_reporter = (reporter ?? Reporter.Output);
_errorReporter = (reporter ?? Reporter.Error);
}
public override int Execute()
{
ValidateArguments();
DirectoryPath? toolPath = null;
if (_toolPath != null)
{
toolPath = new DirectoryPath(_toolPath);
}
(IToolPackageStore toolPackageStore, IToolPackageInstaller toolPackageInstaller) =
_createToolPackageStoreAndInstaller(toolPath);
IShellShimRepository shellShimRepository = _createShellShimRepository(toolPath);
IToolPackage oldPackage;
try
{
oldPackage = toolPackageStore.EnumeratePackageVersions(_packageId).SingleOrDefault();
if (oldPackage == null)
{
throw new GracefulException(
messages: new[]
{
string.Format(
LocalizableStrings.ToolNotInstalled,
_packageId),
},
isUserError: false);
}
}
catch (InvalidOperationException)
{
throw new GracefulException(
messages: new[]
{
string.Format(
LocalizableStrings.ToolHasMultipleVersionsInstalled,
_packageId),
},
isUserError: false);
}
FilePath? configFile = null;
if (_configFilePath != null)
{
configFile = new FilePath(_configFilePath);
}
using (var scope = new TransactionScope(
TransactionScopeOption.Required,
TimeSpan.Zero))
{
RunWithHandlingUninstallError(() =>
{
foreach (CommandSettings command in oldPackage.Commands)
{
shellShimRepository.RemoveShim(command.Name);
}
oldPackage.Uninstall();
});
RunWithHandlingInstallError(() =>
{
IToolPackage newInstalledPackage = toolPackageInstaller.InstallPackage(
packageId: _packageId,
targetFramework: _framework,
nugetConfig: configFile,
source: _source,
verbosity: _verbosity);
foreach (CommandSettings command in newInstalledPackage.Commands)
{
shellShimRepository.CreateShim(command.Executable, command.Name);
}
PrintSuccessMessage(oldPackage, newInstalledPackage);
});
scope.Complete();
}
return 0;
}
private void ValidateArguments()
{
if (string.IsNullOrWhiteSpace(_toolPath) && !_global)
{
throw new GracefulException(
LocalizableStrings.UpdateToolCommandNeedGlobalOrToolPath);
}
if (!string.IsNullOrWhiteSpace(_toolPath) && _global)
{
throw new GracefulException(
LocalizableStrings.UpdateToolCommandInvalidGlobalAndToolPath);
}
if (_configFilePath != null && !File.Exists(_configFilePath))
{
throw new GracefulException(
string.Format(
LocalizableStrings.NuGetConfigurationFileDoesNotExist,
Path.GetFullPath(_configFilePath)));
}
}
private void RunWithHandlingInstallError(Action installAction)
{
try
{
installAction();
}
catch (Exception ex)
when (InstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
{
var message = new List<string>
{
string.Format(LocalizableStrings.UpdateToolFailed, _packageId)
};
message.AddRange(
InstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId));
throw new GracefulException(
messages: message,
verboseMessages: new[] { ex.ToString() },
isUserError: false);
}
}
private void RunWithHandlingUninstallError(Action uninstallAction)
{
try
{
uninstallAction();
}
catch (Exception ex)
when (UninstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
{
var message = new List<string>
{
string.Format(LocalizableStrings.UpdateToolFailed, _packageId)
};
message.AddRange(
UninstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId));
throw new GracefulException(
messages: message,
verboseMessages: new[] { ex.ToString() },
isUserError: false);
}
}
private void PrintSuccessMessage(IToolPackage oldPackage, IToolPackage newInstalledPackage)
{
if (oldPackage.Version != newInstalledPackage.Version)
{
_reporter.WriteLine(
string.Format(
LocalizableStrings.UpdateSucceeded,
newInstalledPackage.Id,
oldPackage.Version.ToNormalizedString(),
newInstalledPackage.Version.ToNormalizedString()).Green());
}
else
{
_reporter.WriteLine(
string.Format(
LocalizableStrings.UpdateSucceededVersionNoChange,
newInstalledPackage.Id, newInstalledPackage.Version).Green());
}
}
}
}

View file

@ -0,0 +1,43 @@
// 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.CommandLine;
using LocalizableStrings = Microsoft.DotNet.Tools.Update.Tool.LocalizableStrings;
namespace Microsoft.DotNet.Cli
{
internal static class UpdateToolCommandParser
{
public static Command Update()
{
return Create.Command("tool",
LocalizableStrings.CommandDescription,
Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageId)
.With(name: LocalizableStrings.PackageIdArgumentName,
description: LocalizableStrings.PackageIdArgumentDescription),
Create.Option(
"-g|--global",
LocalizableStrings.GlobalOptionDescription,
Accept.NoArguments()),
Create.Option(
"--tool-path",
LocalizableStrings.ToolPathDescription,
Accept.ExactlyOneArgument()),
Create.Option(
"--configfile",
LocalizableStrings.ConfigFileOptionDescription,
Accept.ExactlyOneArgument()),
Create.Option(
"--source",
LocalizableStrings.SourceOptionDescription,
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.SourceOptionName)),
Create.Option(
"-f|--framework",
LocalizableStrings.FrameworkOptionDescription,
Accept.ExactlyOneArgument()),
CommonOptions.HelpOption(),
CommonOptions.VerbosityOption());
}
}
}

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ru" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../LocalizableStrings.resx">
<body>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to update.</source>
<target state="new">NuGet Package Id of the tool to update.</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to update.</source>
<target state="new">Please specify one tool Package Id to update.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during update.</source>
<target state="new">Specifies a NuGet package source to use during update.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates a tool to the latest stable version for use.</source>
<target state="new">Updates a tool to the latest stable version for use.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to update the tool for.</source>
<target state="new">The target framework to update the tool for.</target>
<note />
</trans-unit>
<trans-unit id="NuGetConfigurationFileDoesNotExist">
<source>NuGet configuration file '{0}' does not exist.</source>
<target state="new">NuGet configuration file '{0}' does not exist.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceeded">
<source>Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</source>
<target state="new">Tool '{0}' was successfully updated from version '{1}' to version '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Update user wide.</source>
<target state="new">Update user wide.</target>
<note />
</trans-unit>
<trans-unit id="UpdateFullCommandNameLocalized">
<source>.NET update Command</source>
<target state="new">.NET update Command</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandNeedGlobalOrToolPath">
<source>Please specify either the global option (--global) or the tool path option (--tool-path).</source>
<target state="new">Please specify either the global option (--global) or the tool path option (--tool-path).</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolCommandInvalidGlobalAndToolPath">
<source>(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</source>
<target state="new">(--global) conflicts with the tool path option (--tool-path). Please specify only one of the options.</target>
<note />
</trans-unit>
<trans-unit id="ToolPathDescription">
<source>Location where the tool will be installed.</source>
<target state="new">Location where the tool will be installed.</target>
<note />
</trans-unit>
<trans-unit id="ToolHasMultipleVersionsInstalled">
<source>Tool '{0}' has multiple versions installed and cannot be updated.</source>
<target state="new">Tool '{0}' has multiple versions installed and cannot be updated.</target>
<note />
</trans-unit>
<trans-unit id="ToolNotInstalled">
<source>Tool '{0}' is not currently installed.</source>
<target state="new">Tool '{0}' is not currently installed.</target>
<note />
</trans-unit>
<trans-unit id="UpdateSucceededVersionNoChange">
<source>Tool '{0}' was reinstalled with the latest stable version (version '{1}').</source>
<target state="new">Tool '{0}' was reinstalled with the latest stable version (version '{1}').</target>
<note />
</trans-unit>
<trans-unit id="UpdateToolFailed">
<source>Tool '{0}' failed to update due to the following:</source>
<target state="new">Tool '{0}' failed to update due to the following:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ru" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../LocalizableStrings.resx">
<body>
<trans-unit id="UpdateFullCommandName">
<source>.NET Update Command</source>
<target state="new">.NET Update Command</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Updates an item in the development environment.</source>
<target state="new">Updates an item in the development environment.</target>
<note />
</trans-unit>
<trans-unit id="UpdateArgumentDescription">
<source>The NuGet package identifier of the tool to update.</source>
<target state="new">The NuGet package identifier of the tool to update.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -41,6 +41,8 @@
<EmbeddedResource Update="**\dotnet-test\*.resx" Namespace="Microsoft.DotNet.Tools.Test" />
<EmbeddedResource Update="**\dotnet-uninstall\*.resx" Namespace="Microsoft.DotNet.Tools.Uninstall" />
<EmbeddedResource Update="**\dotnet-uninstall\tool\*.resx" Namespace="Microsoft.DotNet.Tools.Uninstall.Tool" />
<EmbeddedResource Update="**\dotnet-update\*.resx" Namespace="Microsoft.DotNet.Tools.Update" />
<EmbeddedResource Update="**\dotnet-update\tool\*.resx" Namespace="Microsoft.DotNet.Tools.Update.Tool" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj" />

View file

@ -121,7 +121,7 @@ namespace Microsoft.DotNet.Tools.Tests.ComponentMocks
FilePath? nugetConfig = null,
string source = null)
{
var package = _feeds
var allPackages = _feeds
.Where(f => {
if (nugetConfig != null)
{
@ -134,8 +134,11 @@ namespace Microsoft.DotNet.Tools.Tests.ComponentMocks
return true;
})
.SelectMany(f => f.Packages)
.Where(p => MatchPackage(p, packageId, versionRange)).OrderByDescending(p => p.Version)
.FirstOrDefault();
.Where(f => f.PackageId == packageId);
var bestVersion = versionRange.FindBestMatch(allPackages.Select(p => NuGetVersion.Parse(p.Version)));
var package = allPackages.Where(p => NuGetVersion.Parse(p.Version).Equals(bestVersion)).FirstOrDefault();
if (package == null)
{

View file

@ -41,6 +41,7 @@ SDK commands:
store Stores the specified assemblies in the runtime store.
install Installs an item into the development environment.
uninstall Uninstalls an item from the development environment.
update Updates an item in the development environment.
help Show help.
Common options:

View file

@ -155,7 +155,9 @@ namespace Microsoft.DotNet.Tests.Commands
Action a = () => installToolCommand.Execute();
a.ShouldThrow<GracefulException>().And.Message
.Should().Contain(string.Format(LocalizableStrings.ToolInstallationFailed, PackageId));
.Should().Contain(
"Simulated error" + Environment.NewLine
+ string.Format(LocalizableStrings.ToolInstallationFailed, PackageId));
_fileSystem.Directory.Exists(Path.Combine(PathToPlacePackages, PackageId)).Should().BeFalse();
}

View file

@ -0,0 +1,243 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ToolPackage;
using Microsoft.DotNet.Tools.Install.Tool;
using Microsoft.DotNet.Tools.Tests.ComponentMocks;
using Microsoft.DotNet.Tools.Test.Utilities;
using Microsoft.DotNet.Tools.Update.Tool;
using Microsoft.Extensions.DependencyModel.Tests;
using Microsoft.Extensions.EnvironmentAbstractions;
using Xunit;
using Parser = Microsoft.DotNet.Cli.Parser;
using LocalizableStrings = Microsoft.DotNet.Tools.Update.Tool.LocalizableStrings;
namespace Microsoft.DotNet.Tests.Commands
{
public class UpdateToolCommandTests
{
private readonly BufferedReporter _reporter;
private readonly IFileSystem _fileSystem;
private readonly EnvironmentPathInstructionMock _environmentPathInstructionMock;
private readonly ToolPackageStoreMock _store;
private readonly PackageId _packageId = new PackageId("global.tool.console.demo");
private readonly List<MockFeed> _mockFeeds;
private const string LowerPackageVersion = "1.0.4";
private const string HigherPackageVersion = "1.0.5";
private const string ShimsDirectory = "shims";
private const string ToolsDirectory = "tools";
public UpdateToolCommandTests()
{
_reporter = new BufferedReporter();
_fileSystem = new FileSystemMockBuilder().Build();
_environmentPathInstructionMock = new EnvironmentPathInstructionMock(_reporter, ShimsDirectory);
_store = new ToolPackageStoreMock(new DirectoryPath(ToolsDirectory), _fileSystem);
_mockFeeds = new List<MockFeed>
{
new MockFeed
{
Type = MockFeedType.FeedFromLookUpNugetConfig,
Packages = new List<MockFeedPackage>
{
new MockFeedPackage
{
PackageId = _packageId.ToString(),
Version = LowerPackageVersion
},
new MockFeedPackage
{
PackageId = _packageId.ToString(),
Version = HigherPackageVersion
}
}
}
};
}
[Fact]
public void GivenANonExistentPackageItErrors()
{
var packageId = "does.not.exist";
var command = CreateUpdateCommand($"-g {packageId}");
Action a = () => command.Execute();
a.ShouldThrow<GracefulException>().And.Message
.Should().Contain(
string.Format(
LocalizableStrings.ToolNotInstalled,
packageId));
}
[Fact]
public void GivenAnExistedLowerversionInstallationWhenCallItCanUpdateThePackageVersion()
{
CreateInstallCommand($"-g {_packageId} --version {LowerPackageVersion}").Execute();
var command = CreateUpdateCommand($"-g {_packageId}");
command.Execute();
_store.EnumeratePackageVersions(_packageId).Single().Version.ToFullString().Should()
.Be(HigherPackageVersion);
}
[Fact]
public void GivenAnExistedLowerversionInstallationWhenCallItCanPrintSucessMessage()
{
CreateInstallCommand($"-g {_packageId} --version {LowerPackageVersion}").Execute();
_reporter.Lines.Clear();
var command = CreateUpdateCommand($"-g {_packageId}");
command.Execute();
_reporter.Lines.First().Should().Contain(string.Format(
LocalizableStrings.UpdateSucceeded,
_packageId, LowerPackageVersion, HigherPackageVersion));
}
[Fact]
public void GivenAnExistedSameVersionInstallationWhenCallItCanPrintSucessMessage()
{
CreateInstallCommand($"-g {_packageId} --version {HigherPackageVersion}").Execute();
_reporter.Lines.Clear();
var command = CreateUpdateCommand($"-g {_packageId}");
command.Execute();
_reporter.Lines.First().Should().Contain(string.Format(
LocalizableStrings.UpdateSucceededVersionNoChange,
_packageId, HigherPackageVersion));
}
[Fact]
public void GivenAnExistedLowerversionWhenReinstallThrowsIthasTheFirstLineIndicateUpdateFailure()
{
CreateInstallCommand($"-g {_packageId} --version {LowerPackageVersion}").Execute();
_reporter.Lines.Clear();
ParseResult result = Parser.Instance.Parse("dotnet update tool " + $"-g {_packageId}");
var command = new UpdateToolCommand(
result["dotnet"]["update"]["tool"],
result,
_ => (_store,
new ToolPackageInstallerMock(
_fileSystem,
_store,
new ProjectRestorerMock(
_fileSystem,
_reporter,
_mockFeeds
),
installCallback: () => throw new ToolConfigurationException("Simulated error"))),
_ => new ShellShimRepositoryMock(new DirectoryPath(ShimsDirectory), _fileSystem),
_reporter);
Action a = () => command.Execute();
a.ShouldThrow<GracefulException>().And.Message.Should().Contain(
string.Format(LocalizableStrings.UpdateToolFailed, _packageId) + Environment.NewLine +
string.Format(Tools.Install.Tool.LocalizableStrings.InvalidToolConfiguration, "Simulated error"));
}
[Fact]
public void GivenAnExistedLowerversionWhenReinstallThrowsItRollsBack()
{
CreateInstallCommand($"-g {_packageId} --version {LowerPackageVersion}").Execute();
_reporter.Lines.Clear();
ParseResult result = Parser.Instance.Parse("dotnet update tool " + $"-g {_packageId}");
var command = new UpdateToolCommand(
result["dotnet"]["update"]["tool"],
result,
_ => (_store,
new ToolPackageInstallerMock(
_fileSystem,
_store,
new ProjectRestorerMock(
_fileSystem,
_reporter,
_mockFeeds
),
installCallback: () => throw new ToolConfigurationException("Simulated error"))),
_ => new ShellShimRepositoryMock(new DirectoryPath(ShimsDirectory), _fileSystem),
_reporter);
Action a = () => command.Execute();
_store.EnumeratePackageVersions(_packageId).Single().Version.ToFullString().Should()
.Be(LowerPackageVersion);
}
[Fact]
public void WhenRunWithBothGlobalAndToolPathShowErrorMessage()
{
var command = CreateUpdateCommand($"-g --tool-path /tmp/folder {_packageId}");
Action a = () => command.Execute();
a.ShouldThrow<GracefulException>().And.Message
.Should().Contain(
LocalizableStrings.UpdateToolCommandInvalidGlobalAndToolPath);
}
[Fact]
public void WhenRunWithNeitherOfGlobalNorToolPathShowErrorMessage()
{
var command = CreateUpdateCommand($"{_packageId}");
Action a = () => command.Execute();
a.ShouldThrow<GracefulException>().And.Message
.Should().Contain(
LocalizableStrings.UpdateToolCommandNeedGlobalOrToolPath);
}
private InstallToolCommand CreateInstallCommand(string options)
{
ParseResult result = Parser.Instance.Parse("dotnet install tool " + options);
return new InstallToolCommand(
result["dotnet"]["install"]["tool"],
result,
(_) => (_store, new ToolPackageInstallerMock(
_fileSystem,
_store,
new ProjectRestorerMock(
_fileSystem,
_reporter,
_mockFeeds
))),
(_) => new ShellShimRepositoryMock(new DirectoryPath(ShimsDirectory), _fileSystem),
_environmentPathInstructionMock,
_reporter);
}
private UpdateToolCommand CreateUpdateCommand(string options)
{
ParseResult result = Parser.Instance.Parse("dotnet update tool " + options);
return new UpdateToolCommand(
result["dotnet"]["update"]["tool"],
result,
(_) => (_store, new ToolPackageInstallerMock(
_fileSystem,
_store,
new ProjectRestorerMock(
_fileSystem,
_reporter,
_mockFeeds
))),
(_) => new ShellShimRepositoryMock(new DirectoryPath(ShimsDirectory), _fileSystem),
_reporter);
}
}
}

View file

@ -0,0 +1,93 @@
// 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.Linq;
using FluentAssertions;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.CommandLine;
using Xunit;
using Xunit.Abstractions;
using Parser = Microsoft.DotNet.Cli.Parser;
namespace Microsoft.DotNet.Tests.ParserTests
{
public class UpdateInstallToolParserTests
{
private readonly ITestOutputHelper _output;
public UpdateInstallToolParserTests(ITestOutputHelper output)
{
_output = output;
}
[Fact]
public void UpdateGlobaltoolParserCanGetPackageId()
{
var command = Parser.Instance;
var result = command.Parse("dotnet update tool -g console.test.app");
var parseResult = result["dotnet"]["update"]["tool"];
var packageId = parseResult.Arguments.Single();
packageId.Should().Be("console.test.app");
}
[Fact]
public void UpdateToolParserCanGetGlobalOption()
{
var result = Parser.Instance.Parse("dotnet update tool -g console.test.app");
var appliedOptions = result["dotnet"]["update"]["tool"];
appliedOptions.ValueOrDefault<bool>("global").Should().Be(true);
}
[Fact]
public void UpdateToolParserCanGetFollowingArguments()
{
var command = Parser.Instance;
var result =
command.Parse(
@"dotnet update tool -g console.test.app --version 1.0.1 --framework netcoreapp2.0 --configfile C:\TestAssetLocalNugetFeed");
var parseResult = result["dotnet"]["update"]["tool"];
parseResult.ValueOrDefault<string>("configfile").Should().Be(@"C:\TestAssetLocalNugetFeed");
parseResult.ValueOrDefault<string>("framework").Should().Be("netcoreapp2.0");
}
[Fact]
public void UpdateToolParserCanParseSourceOption()
{
const string expectedSourceValue = "TestSourceValue";
var result =
Parser.Instance.Parse($"dotnet update tool -g --source {expectedSourceValue} console.test.app");
var appliedOptions = result["dotnet"]["update"]["tool"];
appliedOptions.ValueOrDefault<string>("source").Should().Be(expectedSourceValue);
}
[Fact]
public void UpdateToolParserCanParseVerbosityOption()
{
const string expectedVerbosityLevel = "diag";
var result =
Parser.Instance.Parse($"dotnet update tool -g --verbosity:{expectedVerbosityLevel} console.test.app");
var appliedOptions = result["dotnet"]["update"]["tool"];
appliedOptions.SingleArgumentOrDefault("verbosity").Should().Be(expectedVerbosityLevel);
}
[Fact]
public void UpdateToolParserCanParseToolPathOption()
{
var result =
Parser.Instance.Parse(@"dotnet update tool --tool-path C:\TestAssetLocalNugetFeed console.test.app");
var appliedOptions = result["dotnet"]["update"]["tool"];
appliedOptions.SingleArgumentOrDefault("tool-path").Should().Be(@"C:\TestAssetLocalNugetFeed");
}
}
}