Implement uninstall tool command.
This commit implements the `uninstall tool` command. The `uninstall tool` command is responsible for uninstalling global tools that are installed with the `install tool` command. This commit heavily refactors the ToolPackage and ShellShim namespaces to better support the operations required for the uninstall command. Several string resources have been updated to be more informative or to correct oddly structured sentences. This commit also fixes `--version` on the install command not supporting ranges and wildcards. Fixes #8549. Issue #8485 is partially fixed by this commit (`--prerelease` is not yet implemented).
This commit is contained in:
parent
787bee7ad3
commit
aab9af71b8
134 changed files with 6376 additions and 3159 deletions
|
@ -21,5 +21,6 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
|
||||
public static readonly string ProjectArgumentName = "<PROJECT>";
|
||||
public static readonly string SolutionArgumentName = "<SLN_FILE>";
|
||||
public static readonly string ToolPackageArgumentName = "<PACKAGE_ID>";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,9 +19,14 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
return new TemporaryDirectory();
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetFiles(string path, string searchPattern)
|
||||
public IEnumerable<string> EnumerateFileSystemEntries(string path)
|
||||
{
|
||||
return Directory.GetFiles(path, searchPattern);
|
||||
return Directory.EnumerateFileSystemEntries(path);
|
||||
}
|
||||
|
||||
public IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern)
|
||||
{
|
||||
return Directory.EnumerateFileSystemEntries(path, searchPattern);
|
||||
}
|
||||
|
||||
public string GetDirectoryFullName(string path)
|
||||
|
@ -52,5 +57,10 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
{
|
||||
Directory.Delete(path, recursive);
|
||||
}
|
||||
|
||||
public void Move(string source, string destination)
|
||||
{
|
||||
Directory.Move(source, destination);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,11 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
File.WriteAllText(path, content);
|
||||
}
|
||||
|
||||
public void Move(string source, string destination)
|
||||
{
|
||||
File.Move(source, destination);
|
||||
}
|
||||
|
||||
public void Delete(string path)
|
||||
{
|
||||
File.Delete(path);
|
||||
|
|
|
@ -11,12 +11,16 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
|
||||
ITemporaryDirectory CreateTemporaryDirectory();
|
||||
|
||||
IEnumerable<string> GetFiles(string path, string searchPattern);
|
||||
IEnumerable<string> EnumerateFileSystemEntries(string path);
|
||||
|
||||
IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern);
|
||||
|
||||
string GetDirectoryFullName(string path);
|
||||
|
||||
void CreateDirectory(string path);
|
||||
|
||||
void Delete(string path, bool recursive);
|
||||
|
||||
void Move(string source, string destination);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
|
||||
void WriteAllText(string path, string content);
|
||||
|
||||
void Move(string source, string destination);
|
||||
|
||||
void Delete(string path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ using Microsoft.DotNet.Tools.Run;
|
|||
using Microsoft.DotNet.Tools.Sln;
|
||||
using Microsoft.DotNet.Tools.Store;
|
||||
using Microsoft.DotNet.Tools.Test;
|
||||
using Microsoft.DotNet.Tools.Uninstall;
|
||||
using Microsoft.DotNet.Tools.VSTest;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.DotNet.Tools.Install;
|
||||
|
@ -149,6 +150,10 @@ namespace Microsoft.DotNet.Cli
|
|||
{
|
||||
Command = InstallCommand.Run
|
||||
},
|
||||
["uninstall"] = new BuiltInCommandMetadata
|
||||
{
|
||||
Command = UninstallCommand.Run
|
||||
},
|
||||
["internal-reportinstallsuccess"] = new BuiltInCommandMetadata
|
||||
{
|
||||
Command = InternalReportinstallsuccess.Run
|
||||
|
|
|
@ -520,9 +520,6 @@
|
|||
<data name="NoRestoreDescription" xml:space="preserve">
|
||||
<value>Does not do an implicit restore when executing the command.</value>
|
||||
</data>
|
||||
<data name="NuGetConfigurationFileDoesNotExist" xml:space="preserve">
|
||||
<value>NuGet configuration file {0} does not exist.</value>
|
||||
</data>
|
||||
<data name="ToolSettingsInvalidXml" xml:space="preserve">
|
||||
<value>Invalid XML: {0}</value>
|
||||
</data>
|
||||
|
@ -541,46 +538,77 @@
|
|||
<data name="ToolSettingsUnsupportedRunner" xml:space="preserve">
|
||||
<value>Command '{0}' uses unsupported runner '{1}'."</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathLinuxManualInstruction" xml:space="preserve">
|
||||
<value>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
If you are using bash. You can do this by running the following command:
|
||||
<data name="ShellShimConflict" xml:space="preserve">
|
||||
<value>Command '{0}' conflicts with an existing command from another tool.</value>
|
||||
</data>
|
||||
<data name="CannotCreateShimForEmptyExecutablePath" xml:space="preserve">
|
||||
<value>Cannot create shell shim for an empty executable path.</value>
|
||||
</data>
|
||||
<data name="CannotCreateShimForEmptyCommand" xml:space="preserve">
|
||||
<value>Cannot create shell shim for an empty command.</value>
|
||||
</data>
|
||||
<data name="FailedToRetrieveToolConfiguration" xml:space="preserve">
|
||||
<value>Failed to retrieve tool configuration: {0}</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathLinuxManualInstructions" xml:space="preserve">
|
||||
<value>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</value>
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathLinuxNeedLogout" xml:space="preserve">
|
||||
<value>Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathOSXManualInstruction" xml:space="preserve">
|
||||
<value>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
If you are using bash, You can do this by running the following command:
|
||||
<data name="EnvironmentPathOSXManualInstructions" xml:space="preserve">
|
||||
<value>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</value>
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathOSXNeedReopen" xml:space="preserve">
|
||||
<value>Since you just installed the .NET Core SDK, you will need to reopen terminal before running the tool you installed.</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathWindowsManualInstruction" xml:space="preserve">
|
||||
<value>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
You can do this by running the following command:
|
||||
<data name="EnvironmentPathWindowsManualInstructions" xml:space="preserve">
|
||||
<value>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
|
||||
setx PATH "%PATH%;{1}"</value>
|
||||
You can add the directory to the PATH by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{0}"
|
||||
</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathWindowsNeedReopen" xml:space="preserve">
|
||||
<value>Since you just installed the .NET Core SDK, you will need to reopen the Command Prompt window before running the tool you installed.</value>
|
||||
</data>
|
||||
<data name="FailInstallToolPermission" xml:space="preserve">
|
||||
<value>Failed to change permission:
|
||||
Error: {0}
|
||||
Output: {1}</value>
|
||||
<data name="FailedToCreateShellShim" xml:space="preserve">
|
||||
<value>Failed to create tool shim for command '{0}': {1}</value>
|
||||
</data>
|
||||
<data name="FailInstallToolSameName" xml:space="preserve">
|
||||
<value>Failed to install tool {0}. A command with the same name already exists.</value>
|
||||
<data name="FailedToRemoveShellShim" xml:space="preserve">
|
||||
<value>Failed to remove tool shim for command '{0}': {1}</value>
|
||||
</data>
|
||||
<data name="FailedSettingShimPermissions" xml:space="preserve">
|
||||
<value>Failed to set user executable permissions for shell shim: {0}</value>
|
||||
</data>
|
||||
<data name="FailedToInstallToolPackage" xml:space="preserve">
|
||||
<value>Failed to install tool package '{0}': {1}</value>
|
||||
</data>
|
||||
<data name="FailedToUninstallToolPackage" xml:space="preserve">
|
||||
<value>Failed to uninstall tool package '{0}': {1}</value>
|
||||
</data>
|
||||
<data name="ToolPackageMissingEntryPointFile" xml:space="preserve">
|
||||
<value>Package '{0}' is missing entry point file {1}.</value>
|
||||
|
@ -589,6 +617,6 @@ Output: {1}</value>
|
|||
<value>Package '{0}' is missing tool settings file DotnetToolSettings.xml.</value>
|
||||
</data>
|
||||
<data name="ToolPackageConflictPackageId" xml:space="preserve">
|
||||
<value>Tool '{0}' is already installed.</value>
|
||||
<value>Tool '{0}' (version '{1}') is already installed.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -56,6 +56,7 @@ namespace Microsoft.DotNet.Cli
|
|||
CompleteCommandParser.Complete(),
|
||||
InternalReportinstallsuccessCommandParser.InternalReportinstallsuccess(),
|
||||
InstallCommandParser.Install(),
|
||||
UninstallCommandParser.Uninstall(),
|
||||
CommonOptions.HelpOption(),
|
||||
Create.Option("--info", ""),
|
||||
Create.Option("-d", ""),
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Transactions;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
internal class CreateShimTransaction : IEnlistmentNotification
|
||||
{
|
||||
private readonly Action<List<FilePath>> _createShim;
|
||||
private readonly Action<List<FilePath>> _rollback;
|
||||
private List<FilePath> _locationOfShimDuringTransaction = new List<FilePath>();
|
||||
|
||||
public CreateShimTransaction(
|
||||
Action<List<FilePath>> createShim,
|
||||
Action<List<FilePath>> rollback)
|
||||
{
|
||||
_createShim = createShim ?? throw new ArgumentNullException(nameof(createShim));
|
||||
_rollback = rollback ?? throw new ArgumentNullException(nameof(rollback));
|
||||
}
|
||||
|
||||
public void CreateShim()
|
||||
{
|
||||
_createShim(_locationOfShimDuringTransaction);
|
||||
}
|
||||
|
||||
public void Commit(Enlistment enlistment)
|
||||
{
|
||||
enlistment.Done();
|
||||
}
|
||||
|
||||
public void InDoubt(Enlistment enlistment)
|
||||
{
|
||||
Rollback(enlistment);
|
||||
}
|
||||
|
||||
public void Prepare(PreparingEnlistment preparingEnlistment)
|
||||
{
|
||||
preparingEnlistment.Done();
|
||||
}
|
||||
|
||||
public void Rollback(Enlistment enlistment)
|
||||
{
|
||||
_rollback(_locationOfShimDuringTransaction);
|
||||
|
||||
enlistment.Done();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ using Microsoft.DotNet.Cli.Utils;
|
|||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
public class DoNothingEnvironmentPath : IEnvironmentPath
|
||||
internal class DoNothingEnvironmentPath : IEnvironmentPath
|
||||
{
|
||||
public void AddPackageExecutablePathToUserPath()
|
||||
{
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
public interface IShellShimMaker
|
||||
{
|
||||
void CreateShim(FilePath packageExecutable, string shellCommandName);
|
||||
void EnsureCommandNameUniqueness(string shellCommandName);
|
||||
}
|
||||
}
|
13
src/dotnet/ShellShim/IShellShimRepository.cs
Normal file
13
src/dotnet/ShellShim/IShellShimRepository.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
internal interface IShellShimRepository
|
||||
{
|
||||
void CreateShim(FilePath targetExecutablePath, string commandName);
|
||||
|
||||
void RemoveShim(string commandName);
|
||||
}
|
||||
}
|
|
@ -75,8 +75,8 @@ namespace Microsoft.DotNet.ShellShim
|
|||
// similar to https://code.visualstudio.com/docs/setup/mac
|
||||
_reporter.WriteLine(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.EnvironmentPathLinuxManualInstruction,
|
||||
_packageExecutablePath.Path, _packageExecutablePath.Path));
|
||||
CommonLocalizableStrings.EnvironmentPathLinuxManualInstructions,
|
||||
_packageExecutablePath.Path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,8 +75,8 @@ namespace Microsoft.DotNet.ShellShim
|
|||
// similar to https://code.visualstudio.com/docs/setup/mac
|
||||
_reporter.WriteLine(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.EnvironmentPathOSXManualInstruction,
|
||||
_packageExecutablePath.Path, _packageExecutablePath.Path));
|
||||
CommonLocalizableStrings.EnvironmentPathOSXManualInstructions,
|
||||
_packageExecutablePath.Path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
22
src/dotnet/ShellShim/ShellShimException.cs
Normal file
22
src/dotnet/ShellShim/ShellShimException.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
// 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;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
internal class ShellShimException : Exception
|
||||
{
|
||||
public ShellShimException()
|
||||
{
|
||||
}
|
||||
|
||||
public ShellShimException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public ShellShimException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,166 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Transactions;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Tools;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
public class ShellShimMaker : IShellShimMaker
|
||||
{
|
||||
private const string LauncherExeResourceName = "Microsoft.DotNet.Tools.Launcher.Executable";
|
||||
private const string LauncherConfigResourceName = "Microsoft.DotNet.Tools.Launcher.Config";
|
||||
|
||||
private readonly string _pathToPlaceShim;
|
||||
|
||||
public ShellShimMaker(string pathToPlaceShim)
|
||||
{
|
||||
_pathToPlaceShim = pathToPlaceShim ?? throw new ArgumentNullException(nameof(pathToPlaceShim));
|
||||
}
|
||||
|
||||
public void CreateShim(FilePath packageExecutable, string shellCommandName)
|
||||
{
|
||||
var createShimTransaction = new CreateShimTransaction(
|
||||
createShim: locationOfShimDuringTransaction =>
|
||||
{
|
||||
EnsureCommandNameUniqueness(shellCommandName);
|
||||
PlaceShim(packageExecutable, shellCommandName, locationOfShimDuringTransaction);
|
||||
},
|
||||
rollback: locationOfShimDuringTransaction =>
|
||||
{
|
||||
foreach (FilePath f in locationOfShimDuringTransaction)
|
||||
{
|
||||
if (File.Exists(f.Value))
|
||||
{
|
||||
File.Delete(f.Value);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
using (var transactionScope = new TransactionScope())
|
||||
{
|
||||
Transaction.Current.EnlistVolatile(createShimTransaction, EnlistmentOptions.None);
|
||||
createShimTransaction.CreateShim();
|
||||
|
||||
transactionScope.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaceShim(FilePath packageExecutable, string shellCommandName, List<FilePath> locationOfShimDuringTransaction)
|
||||
{
|
||||
FilePath shimPath = GetShimPath(shellCommandName);
|
||||
|
||||
if (!Directory.Exists(shimPath.GetDirectoryPath().Value))
|
||||
{
|
||||
Directory.CreateDirectory(shimPath.GetDirectoryPath().Value);
|
||||
}
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
FilePath windowsConfig = GetWindowsConfigPath(shellCommandName);
|
||||
CreateConfigFile(
|
||||
windowsConfig,
|
||||
entryPoint: packageExecutable,
|
||||
runner: "dotnet");
|
||||
|
||||
locationOfShimDuringTransaction.Add(windowsConfig);
|
||||
|
||||
using (var shim = File.Create(shimPath.Value))
|
||||
using (var exe = typeof(ShellShimMaker).Assembly.GetManifestResourceStream(LauncherExeResourceName))
|
||||
{
|
||||
exe.CopyTo(shim);
|
||||
}
|
||||
locationOfShimDuringTransaction.Add(shimPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
var script = new StringBuilder();
|
||||
script.AppendLine("#!/bin/sh");
|
||||
script.AppendLine($"dotnet {packageExecutable.ToQuotedString()} \"$@\"");
|
||||
|
||||
File.WriteAllText(shimPath.Value, script.ToString());
|
||||
locationOfShimDuringTransaction.Add(shimPath);
|
||||
|
||||
SetUserExecutionPermissionToShimFile(shimPath);
|
||||
}
|
||||
}
|
||||
|
||||
public void EnsureCommandNameUniqueness(string shellCommandName)
|
||||
{
|
||||
if (File.Exists(GetShimPath(shellCommandName).Value))
|
||||
{
|
||||
throw new GracefulException(
|
||||
string.Format(CommonLocalizableStrings.FailInstallToolSameName,
|
||||
shellCommandName));
|
||||
}
|
||||
}
|
||||
|
||||
internal void CreateConfigFile(FilePath outputPath, FilePath entryPoint, string runner)
|
||||
{
|
||||
XDocument config;
|
||||
using(var resource = typeof(ShellShimMaker).Assembly.GetManifestResourceStream(LauncherConfigResourceName))
|
||||
{
|
||||
config = XDocument.Load(resource);
|
||||
}
|
||||
|
||||
var appSettings = config.Descendants("appSettings").First();
|
||||
appSettings.Add(new XElement("add", new XAttribute("key", "entryPoint"), new XAttribute("value", entryPoint.Value)));
|
||||
appSettings.Add(new XElement("add", new XAttribute("key", "runner"), new XAttribute("value", runner ?? string.Empty)));
|
||||
config.Save(outputPath.Value);
|
||||
}
|
||||
|
||||
public void Remove(string shellCommandName)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
File.Delete(GetWindowsConfigPath(shellCommandName).Value);
|
||||
}
|
||||
|
||||
File.Delete(GetShimPath(shellCommandName).Value);
|
||||
}
|
||||
|
||||
private FilePath GetShimPath(string shellCommandName)
|
||||
{
|
||||
var scriptPath = Path.Combine(_pathToPlaceShim, shellCommandName);
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
scriptPath += ".exe";
|
||||
}
|
||||
|
||||
return new FilePath(scriptPath);
|
||||
}
|
||||
|
||||
private FilePath GetWindowsConfigPath(string shellCommandName)
|
||||
{
|
||||
return new FilePath(GetShimPath(shellCommandName).Value + ".config");
|
||||
}
|
||||
|
||||
private static void SetUserExecutionPermissionToShimFile(FilePath scriptPath)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return;
|
||||
|
||||
CommandResult result = new CommandFactory()
|
||||
.Create("chmod", new[] { "u+x", scriptPath.Value })
|
||||
.CaptureStdOut()
|
||||
.CaptureStdErr()
|
||||
.Execute();
|
||||
|
||||
if (result.ExitCode != 0)
|
||||
{
|
||||
throw new GracefulException(
|
||||
string.Format(CommonLocalizableStrings.FailInstallToolPermission, result.StdErr,
|
||||
result.StdOut));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
213
src/dotnet/ShellShim/ShellShimRepository.cs
Normal file
213
src/dotnet/ShellShim/ShellShimRepository.cs
Normal file
|
@ -0,0 +1,213 @@
|
|||
// 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.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Tools;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
internal class ShellShimRepository : IShellShimRepository
|
||||
{
|
||||
private const string LauncherExeResourceName = "Microsoft.DotNet.Tools.Launcher.Executable";
|
||||
private const string LauncherConfigResourceName = "Microsoft.DotNet.Tools.Launcher.Config";
|
||||
|
||||
private readonly DirectoryPath _shimsDirectory;
|
||||
|
||||
public ShellShimRepository(DirectoryPath shimsDirectory)
|
||||
{
|
||||
_shimsDirectory = shimsDirectory;
|
||||
}
|
||||
|
||||
public void CreateShim(FilePath targetExecutablePath, string commandName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(targetExecutablePath.Value))
|
||||
{
|
||||
throw new ShellShimException(CommonLocalizableStrings.CannotCreateShimForEmptyExecutablePath);
|
||||
}
|
||||
if (string.IsNullOrEmpty(commandName))
|
||||
{
|
||||
throw new ShellShimException(CommonLocalizableStrings.CannotCreateShimForEmptyCommand);
|
||||
}
|
||||
|
||||
if (ShimExists(commandName))
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.ShellShimConflict,
|
||||
commandName));
|
||||
}
|
||||
|
||||
TransactionalAction.Run(
|
||||
action: () => {
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(_shimsDirectory.Value))
|
||||
{
|
||||
Directory.CreateDirectory(_shimsDirectory.Value);
|
||||
}
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
CreateConfigFile(
|
||||
outputPath: GetWindowsConfigPath(commandName),
|
||||
entryPoint: targetExecutablePath,
|
||||
runner: "dotnet");
|
||||
|
||||
using (var shim = File.Create(GetWindowsShimPath(commandName).Value))
|
||||
using (var resource = typeof(ShellShimRepository).Assembly.GetManifestResourceStream(LauncherExeResourceName))
|
||||
{
|
||||
resource.CopyTo(shim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var script = new StringBuilder();
|
||||
script.AppendLine("#!/bin/sh");
|
||||
script.AppendLine($"dotnet {targetExecutablePath.ToQuotedString()} \"$@\"");
|
||||
|
||||
var shimPath = GetPosixShimPath(commandName);
|
||||
File.WriteAllText(shimPath.Value, script.ToString());
|
||||
|
||||
SetUserExecutionPermission(shimPath);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToCreateShellShim,
|
||||
commandName,
|
||||
ex.Message
|
||||
),
|
||||
ex);
|
||||
}
|
||||
},
|
||||
rollback: () => {
|
||||
foreach (var file in GetShimFiles(commandName).Where(f => File.Exists(f.Value)))
|
||||
{
|
||||
File.Delete(file.Value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void RemoveShim(string commandName)
|
||||
{
|
||||
var files = new Dictionary<string, string>();
|
||||
TransactionalAction.Run(
|
||||
action: () => {
|
||||
try
|
||||
{
|
||||
foreach (var file in GetShimFiles(commandName).Where(f => File.Exists(f.Value)))
|
||||
{
|
||||
var tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
|
||||
File.Move(file.Value, tempPath);
|
||||
files[file.Value] = tempPath;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToRemoveShellShim,
|
||||
commandName,
|
||||
ex.Message
|
||||
),
|
||||
ex);
|
||||
}
|
||||
},
|
||||
commit: () => {
|
||||
foreach (var value in files.Values)
|
||||
{
|
||||
File.Delete(value);
|
||||
}
|
||||
},
|
||||
rollback: () => {
|
||||
foreach (var kvp in files)
|
||||
{
|
||||
File.Move(kvp.Value, kvp.Key);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
internal void CreateConfigFile(FilePath outputPath, FilePath entryPoint, string runner)
|
||||
{
|
||||
XDocument config;
|
||||
using (var resource = typeof(ShellShimRepository).Assembly.GetManifestResourceStream(LauncherConfigResourceName))
|
||||
{
|
||||
config = XDocument.Load(resource);
|
||||
}
|
||||
|
||||
var appSettings = config.Descendants("appSettings").First();
|
||||
appSettings.Add(new XElement("add", new XAttribute("key", "entryPoint"), new XAttribute("value", entryPoint.Value)));
|
||||
appSettings.Add(new XElement("add", new XAttribute("key", "runner"), new XAttribute("value", runner ?? string.Empty)));
|
||||
config.Save(outputPath.Value);
|
||||
}
|
||||
|
||||
private bool ShimExists(string commandName)
|
||||
{
|
||||
return GetShimFiles(commandName).Any(p => File.Exists(p.Value));
|
||||
}
|
||||
|
||||
private IEnumerable<FilePath> GetShimFiles(string commandName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(commandName))
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
yield return GetWindowsShimPath(commandName);
|
||||
yield return GetWindowsConfigPath(commandName);
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return GetPosixShimPath(commandName);
|
||||
}
|
||||
}
|
||||
|
||||
private FilePath GetPosixShimPath(string commandName)
|
||||
{
|
||||
return _shimsDirectory.WithFile(commandName);
|
||||
}
|
||||
|
||||
private FilePath GetWindowsShimPath(string commandName)
|
||||
{
|
||||
return new FilePath(_shimsDirectory.WithFile(commandName).Value + ".exe");
|
||||
}
|
||||
|
||||
private FilePath GetWindowsConfigPath(string commandName)
|
||||
{
|
||||
return new FilePath(GetWindowsShimPath(commandName).Value + ".config");
|
||||
}
|
||||
|
||||
private static void SetUserExecutionPermission(FilePath path)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CommandResult result = new CommandFactory()
|
||||
.Create("chmod", new[] { "u+x", path.Value })
|
||||
.CaptureStdOut()
|
||||
.CaptureStdErr()
|
||||
.Execute();
|
||||
|
||||
if (result.ExitCode != 0)
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(CommonLocalizableStrings.FailedSettingShimPermissions, result.StdErr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -70,8 +70,8 @@ namespace Microsoft.DotNet.ShellShim
|
|||
{
|
||||
_reporter.WriteLine(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.EnvironmentPathWindowsManualInstruction,
|
||||
_packageExecutablePath, _packageExecutablePath));
|
||||
CommonLocalizableStrings.EnvironmentPathWindowsManualInstructions,
|
||||
_packageExecutablePath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
24
src/dotnet/ToolPackage/CommandSettings.cs
Normal file
24
src/dotnet/ToolPackage/CommandSettings.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class CommandSettings
|
||||
{
|
||||
public CommandSettings(string name, string runner, FilePath executable)
|
||||
{
|
||||
Name = name ?? throw new ArgumentNullException(nameof(name));
|
||||
Runner = runner ?? throw new ArgumentNullException(nameof(runner));
|
||||
Executable = executable;
|
||||
}
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
public string Runner { get; private set; }
|
||||
|
||||
public FilePath Executable { get; private set; }
|
||||
}
|
||||
}
|
|
@ -9,10 +9,10 @@ namespace Microsoft.DotNet.ToolPackage
|
|||
internal interface IProjectRestorer
|
||||
{
|
||||
void Restore(
|
||||
FilePath projectPath,
|
||||
FilePath project,
|
||||
DirectoryPath assetJsonOutput,
|
||||
FilePath? nugetconfig,
|
||||
string source,
|
||||
string verbosity);
|
||||
FilePath? nugetConfig = null,
|
||||
string source = null,
|
||||
string verbosity = null);
|
||||
}
|
||||
}
|
||||
|
|
22
src/dotnet/ToolPackage/IToolPackage.cs
Normal file
22
src/dotnet/ToolPackage/IToolPackage.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
// 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.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal interface IToolPackage
|
||||
{
|
||||
string PackageId { get; }
|
||||
|
||||
string PackageVersion { get; }
|
||||
|
||||
DirectoryPath PackageDirectory { get; }
|
||||
|
||||
IReadOnlyList<CommandSettings> Commands { get; }
|
||||
|
||||
void Uninstall();
|
||||
}
|
||||
}
|
|
@ -1,18 +1,19 @@
|
|||
// 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.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal interface IToolPackageObtainer
|
||||
internal interface IToolPackageInstaller
|
||||
{
|
||||
ToolConfigurationAndExecutablePath ObtainAndReturnExecutablePath(
|
||||
IToolPackage InstallPackage(
|
||||
string packageId,
|
||||
string packageVersion = null,
|
||||
FilePath? nugetconfig = null,
|
||||
string targetframework = null,
|
||||
string targetFramework = null,
|
||||
FilePath? nugetConfig = null,
|
||||
string source = null,
|
||||
string verbosity = null);
|
||||
}
|
16
src/dotnet/ToolPackage/IToolPackageStore.cs
Normal file
16
src/dotnet/ToolPackage/IToolPackageStore.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
// 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.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal interface IToolPackageStore
|
||||
{
|
||||
DirectoryPath Root { get; }
|
||||
|
||||
IEnumerable<IToolPackage> GetInstalledPackages(string packageId);
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class PackageVersion
|
||||
{
|
||||
public PackageVersion(string packageVersion)
|
||||
{
|
||||
if (packageVersion == null)
|
||||
{
|
||||
Value = Path.GetRandomFileName();
|
||||
IsPlaceholder = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Value = packageVersion;
|
||||
IsPlaceholder = false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsPlaceholder { get; }
|
||||
public string Value { get; }
|
||||
public bool IsConcreteValue => !IsPlaceholder;
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class ToolConfigurationAndExecutablePath
|
||||
{
|
||||
public ToolConfigurationAndExecutablePath(
|
||||
ToolConfiguration toolConfiguration,
|
||||
FilePath executable)
|
||||
{
|
||||
Configuration = toolConfiguration;
|
||||
Executable = executable;
|
||||
}
|
||||
|
||||
public ToolConfiguration Configuration { get; }
|
||||
|
||||
public FilePath Executable { get; }
|
||||
}
|
||||
}
|
|
@ -18,21 +18,29 @@ namespace Microsoft.DotNet.ToolPackage
|
|||
|
||||
DotNetCliTool dotNetCliTool;
|
||||
|
||||
try
|
||||
{
|
||||
using (var fs = new FileStream(pathToXml, FileMode.Open))
|
||||
{
|
||||
var reader = XmlReader.Create(fs);
|
||||
|
||||
try
|
||||
{
|
||||
dotNetCliTool = (DotNetCliTool)serializer.Deserialize(reader);
|
||||
}
|
||||
catch (InvalidOperationException e) when (e.InnerException is XmlException)
|
||||
}
|
||||
catch (InvalidOperationException ex) when (ex.InnerException is XmlException)
|
||||
{
|
||||
throw new ToolConfigurationException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.ToolSettingsInvalidXml,
|
||||
e.InnerException.Message));
|
||||
ex.InnerException.Message),
|
||||
ex.InnerException);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
|
||||
{
|
||||
throw new ToolConfigurationException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToRetrieveToolConfiguration,
|
||||
ex.Message),
|
||||
ex);
|
||||
}
|
||||
|
||||
if (dotNetCliTool.Commands.Length != 1)
|
||||
|
|
|
@ -5,10 +5,18 @@ using System;
|
|||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class ToolConfigurationException : ArgumentException
|
||||
internal class ToolConfigurationException : Exception
|
||||
{
|
||||
public ToolConfigurationException()
|
||||
{
|
||||
}
|
||||
|
||||
public ToolConfigurationException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public ToolConfigurationException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,17 +5,17 @@ using System;
|
|||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class PackageObtainException : Exception
|
||||
internal class ToolPackageException : Exception
|
||||
{
|
||||
public PackageObtainException()
|
||||
public ToolPackageException()
|
||||
{
|
||||
}
|
||||
|
||||
public PackageObtainException(string message) : base(message)
|
||||
public ToolPackageException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public PackageObtainException(string message, Exception innerException) : base(message, innerException)
|
||||
public ToolPackageException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
171
src/dotnet/ToolPackage/ToolPackageInstaller.cs
Normal file
171
src/dotnet/ToolPackage/ToolPackageInstaller.cs
Normal file
|
@ -0,0 +1,171 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Configurer;
|
||||
using Microsoft.DotNet.Tools;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class ToolPackageInstaller : IToolPackageInstaller
|
||||
{
|
||||
public const string StagingDirectory = ".stage";
|
||||
|
||||
private readonly IToolPackageStore _store;
|
||||
private readonly IProjectRestorer _projectRestorer;
|
||||
private readonly FilePath? _tempProject;
|
||||
private readonly DirectoryPath _offlineFeed;
|
||||
|
||||
public ToolPackageInstaller(
|
||||
IToolPackageStore store,
|
||||
IProjectRestorer projectRestorer,
|
||||
FilePath? tempProject = null,
|
||||
DirectoryPath? offlineFeed = null)
|
||||
{
|
||||
_store = store ?? throw new ArgumentNullException(nameof(store));
|
||||
_projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
|
||||
_tempProject = tempProject;
|
||||
_offlineFeed = offlineFeed ?? new DirectoryPath(new CliFolderPathCalculator().CliFallbackFolderPath);
|
||||
}
|
||||
|
||||
public IToolPackage InstallPackage(
|
||||
string packageId,
|
||||
string packageVersion = null,
|
||||
string targetFramework = null,
|
||||
FilePath? nugetConfig = null,
|
||||
string source = null,
|
||||
string verbosity = null)
|
||||
{
|
||||
if (packageId == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(packageId));
|
||||
}
|
||||
|
||||
var packageRootDirectory = _store.Root.WithSubDirectories(packageId);
|
||||
string rollbackDirectory = null;
|
||||
|
||||
return TransactionalAction.Run<IToolPackage>(
|
||||
action: () => {
|
||||
try
|
||||
{
|
||||
|
||||
var stageDirectory = _store.Root.WithSubDirectories(StagingDirectory, Path.GetRandomFileName());
|
||||
Directory.CreateDirectory(stageDirectory.Value);
|
||||
rollbackDirectory = stageDirectory.Value;
|
||||
|
||||
var tempProject = CreateTempProject(
|
||||
packageId: packageId,
|
||||
packageVersion: packageVersion,
|
||||
targetFramework: targetFramework ?? BundledTargetFramework.GetTargetFrameworkMoniker(),
|
||||
restoreDirectory: stageDirectory);
|
||||
|
||||
try
|
||||
{
|
||||
_projectRestorer.Restore(
|
||||
tempProject,
|
||||
stageDirectory,
|
||||
nugetConfig,
|
||||
source,
|
||||
verbosity);
|
||||
}
|
||||
finally
|
||||
{
|
||||
File.Delete(tempProject.Value);
|
||||
}
|
||||
|
||||
packageVersion = Path.GetFileName(
|
||||
Directory.EnumerateDirectories(
|
||||
stageDirectory.WithSubDirectories(packageId).Value).Single());
|
||||
|
||||
var packageDirectory = packageRootDirectory.WithSubDirectories(packageVersion);
|
||||
if (Directory.Exists(packageDirectory.Value))
|
||||
{
|
||||
throw new ToolPackageException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.ToolPackageConflictPackageId,
|
||||
packageId,
|
||||
packageVersion));
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(packageRootDirectory.Value);
|
||||
Directory.Move(stageDirectory.Value, packageDirectory.Value);
|
||||
rollbackDirectory = packageDirectory.Value;
|
||||
|
||||
return new ToolPackageInstance(
|
||||
_store,
|
||||
packageId,
|
||||
packageVersion,
|
||||
packageDirectory);
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
|
||||
{
|
||||
throw new ToolPackageException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToInstallToolPackage,
|
||||
packageId,
|
||||
ex.Message),
|
||||
ex);
|
||||
}
|
||||
},
|
||||
rollback: () => {
|
||||
if (!string.IsNullOrEmpty(rollbackDirectory) && Directory.Exists(rollbackDirectory))
|
||||
{
|
||||
Directory.Delete(rollbackDirectory, true);
|
||||
}
|
||||
|
||||
// Delete the root if it is empty
|
||||
if (Directory.Exists(packageRootDirectory.Value) &&
|
||||
!Directory.EnumerateFileSystemEntries(packageRootDirectory.Value).Any())
|
||||
{
|
||||
Directory.Delete(packageRootDirectory.Value, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private FilePath CreateTempProject(
|
||||
string packageId,
|
||||
string packageVersion,
|
||||
string targetFramework,
|
||||
DirectoryPath restoreDirectory)
|
||||
{
|
||||
var tempProject = _tempProject ?? new DirectoryPath(Path.GetTempPath())
|
||||
.WithSubDirectories(Path.GetRandomFileName())
|
||||
.WithFile(Path.GetRandomFileName() + ".csproj");
|
||||
|
||||
if (Path.GetExtension(tempProject.Value) != "csproj")
|
||||
{
|
||||
tempProject = new FilePath(Path.ChangeExtension(tempProject.Value, "csproj"));
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(tempProject.GetDirectoryPath().Value);
|
||||
|
||||
var tempProjectContent = new XDocument(
|
||||
new XElement("Project",
|
||||
new XAttribute("Sdk", "Microsoft.NET.Sdk"),
|
||||
new XElement("PropertyGroup",
|
||||
new XElement("TargetFramework", targetFramework),
|
||||
new XElement("RestorePackagesPath", restoreDirectory.Value),
|
||||
new XElement("RestoreProjectStyle", "DotnetToolReference"), // without it, project cannot reference tool package
|
||||
new XElement("RestoreRootConfigDirectory", Directory.GetCurrentDirectory()), // config file probing start directory
|
||||
new XElement("DisableImplicitFrameworkReferences", "true"), // no Microsoft.NETCore.App in tool folder
|
||||
new XElement("RestoreFallbackFolders", "clear"), // do not use fallbackfolder, tool package need to be copied to tool folder
|
||||
new XElement("RestoreAdditionalProjectSources", // use fallbackfolder as feed to enable offline
|
||||
Directory.Exists(_offlineFeed.Value) ? _offlineFeed.Value : string.Empty),
|
||||
new XElement("RestoreAdditionalProjectFallbackFolders", string.Empty), // block other
|
||||
new XElement("RestoreAdditionalProjectFallbackFoldersExcludes", string.Empty), // block other
|
||||
new XElement("DisableImplicitNuGetFallbackFolder", "true")), // disable SDK side implicit NuGetFallbackFolder
|
||||
new XElement("ItemGroup",
|
||||
new XElement("PackageReference",
|
||||
new XAttribute("Include", packageId),
|
||||
new XAttribute("Version", packageVersion ?? "*") // nuget will restore * for latest
|
||||
))
|
||||
));
|
||||
|
||||
File.WriteAllText(tempProject.Value, tempProjectContent.ToString());
|
||||
return tempProject;
|
||||
}
|
||||
}
|
||||
}
|
174
src/dotnet/ToolPackage/ToolPackageInstance.cs
Normal file
174
src/dotnet/ToolPackage/ToolPackageInstance.cs
Normal file
|
@ -0,0 +1,174 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Tools;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
using NuGet.ProjectModel;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
// This is named "ToolPackageInstance" because "ToolPackage" would conflict with the namespace
|
||||
internal class ToolPackageInstance : IToolPackage
|
||||
{
|
||||
private IToolPackageStore _store;
|
||||
private Lazy<IReadOnlyList<CommandSettings>> _commands;
|
||||
|
||||
public ToolPackageInstance(
|
||||
IToolPackageStore store,
|
||||
string packageId,
|
||||
string packageVersion,
|
||||
DirectoryPath packageDirectory)
|
||||
{
|
||||
_store = store ?? throw new ArgumentNullException(nameof(store));
|
||||
PackageId = packageId ?? throw new ArgumentNullException(nameof(packageId));
|
||||
PackageVersion = packageVersion ?? throw new ArgumentNullException(nameof(packageVersion));
|
||||
PackageDirectory = packageDirectory;
|
||||
_commands = new Lazy<IReadOnlyList<CommandSettings>>(GetCommands);
|
||||
}
|
||||
|
||||
public string PackageId { get; private set; }
|
||||
|
||||
public string PackageVersion { get; private set; }
|
||||
|
||||
public DirectoryPath PackageDirectory { get; private set; }
|
||||
|
||||
public IReadOnlyList<CommandSettings> Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return _commands.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Uninstall()
|
||||
{
|
||||
var rootDirectory = PackageDirectory.GetParentPath();
|
||||
string tempPackageDirectory = null;
|
||||
|
||||
TransactionalAction.Run(
|
||||
action: () => {
|
||||
try
|
||||
{
|
||||
if (Directory.Exists(PackageDirectory.Value))
|
||||
{
|
||||
// Use the same staging directory for uninstall instead of temp
|
||||
// This prevents cross-device moves when temp is mounted to a different device
|
||||
var tempPath = _store
|
||||
.Root
|
||||
.WithSubDirectories(ToolPackageInstaller.StagingDirectory)
|
||||
.WithFile(Path.GetRandomFileName())
|
||||
.Value;
|
||||
Directory.Move(PackageDirectory.Value, tempPath);
|
||||
tempPackageDirectory = tempPath;
|
||||
}
|
||||
|
||||
if (Directory.Exists(rootDirectory.Value) &&
|
||||
!Directory.EnumerateFileSystemEntries(rootDirectory.Value).Any())
|
||||
{
|
||||
Directory.Delete(rootDirectory.Value, false);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
|
||||
{
|
||||
throw new ToolPackageException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToUninstallToolPackage,
|
||||
PackageId,
|
||||
ex.Message),
|
||||
ex);
|
||||
}
|
||||
},
|
||||
commit: () => {
|
||||
if (tempPackageDirectory != null)
|
||||
{
|
||||
Directory.Delete(tempPackageDirectory, true);
|
||||
}
|
||||
},
|
||||
rollback: () => {
|
||||
if (tempPackageDirectory != null)
|
||||
{
|
||||
Directory.CreateDirectory(rootDirectory.Value);
|
||||
Directory.Move(tempPackageDirectory, PackageDirectory.Value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private IReadOnlyList<CommandSettings> GetCommands()
|
||||
{
|
||||
const string AssetsFileName = "project.assets.json";
|
||||
const string ToolSettingsFileName = "DotnetToolSettings.xml";
|
||||
|
||||
try
|
||||
{
|
||||
var commands = new List<CommandSettings>();
|
||||
var lockFile = new LockFileFormat().Read(PackageDirectory.WithFile(AssetsFileName).Value);
|
||||
|
||||
var library = FindLibraryInLockFile(lockFile);
|
||||
var dotnetToolSettings = FindItemInTargetLibrary(library, ToolSettingsFileName);
|
||||
if (dotnetToolSettings == null)
|
||||
{
|
||||
throw new ToolPackageException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.ToolPackageMissingSettingsFile,
|
||||
PackageId));
|
||||
}
|
||||
|
||||
var toolConfigurationPath =
|
||||
PackageDirectory
|
||||
.WithSubDirectories(
|
||||
PackageId,
|
||||
library.Version.ToNormalizedString())
|
||||
.WithFile(dotnetToolSettings.Path);
|
||||
|
||||
var configuration = ToolConfigurationDeserializer.Deserialize(toolConfigurationPath.Value);
|
||||
|
||||
var entryPointFromLockFile = FindItemInTargetLibrary(library, configuration.ToolAssemblyEntryPoint);
|
||||
if (entryPointFromLockFile == null)
|
||||
{
|
||||
throw new ToolPackageException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.ToolPackageMissingEntryPointFile,
|
||||
PackageId,
|
||||
configuration.ToolAssemblyEntryPoint));
|
||||
}
|
||||
|
||||
// Currently only "dotnet" commands are supported
|
||||
commands.Add(new CommandSettings(
|
||||
configuration.CommandName,
|
||||
"dotnet",
|
||||
PackageDirectory
|
||||
.WithSubDirectories(
|
||||
PackageId,
|
||||
library.Version.ToNormalizedString())
|
||||
.WithFile(entryPointFromLockFile.Path)));
|
||||
|
||||
return commands;
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
|
||||
{
|
||||
throw new ToolPackageException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToRetrieveToolConfiguration,
|
||||
PackageId,
|
||||
ex.Message),
|
||||
ex);
|
||||
}
|
||||
}
|
||||
|
||||
private LockFileTargetLibrary FindLibraryInLockFile(LockFile lockFile)
|
||||
{
|
||||
return lockFile
|
||||
?.Targets?.SingleOrDefault(t => t.RuntimeIdentifier != null)
|
||||
?.Libraries?.SingleOrDefault(l => l.Name == PackageId);
|
||||
}
|
||||
|
||||
private static LockFileItem FindItemInTargetLibrary(LockFileTargetLibrary library, string targetRelativeFilePath)
|
||||
{
|
||||
return library
|
||||
?.ToolsAssemblies
|
||||
?.SingleOrDefault(t => LockFileMatcher.MatchesFile(t, targetRelativeFilePath));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Transactions;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class ToolPackageObtainTransaction : IEnlistmentNotification
|
||||
{
|
||||
private readonly Func<List<DirectoryPath>, ToolConfigurationAndExecutablePath> _obtainAndReturnExecutablePath;
|
||||
private readonly Action<List<DirectoryPath>> _rollback;
|
||||
private List<DirectoryPath> _locationOfPackageDuringTransaction = new List<DirectoryPath>();
|
||||
|
||||
public ToolPackageObtainTransaction(
|
||||
Func<List<DirectoryPath>, ToolConfigurationAndExecutablePath> obtainAndReturnExecutablePath,
|
||||
Action<List<DirectoryPath>> rollback)
|
||||
{
|
||||
_obtainAndReturnExecutablePath = obtainAndReturnExecutablePath ?? throw new ArgumentNullException(nameof(obtainAndReturnExecutablePath));
|
||||
_rollback = rollback ?? throw new ArgumentNullException(nameof(rollback));
|
||||
}
|
||||
|
||||
public ToolConfigurationAndExecutablePath ObtainAndReturnExecutablePath()
|
||||
{
|
||||
return _obtainAndReturnExecutablePath(_locationOfPackageDuringTransaction);
|
||||
}
|
||||
|
||||
public void Commit(Enlistment enlistment)
|
||||
{
|
||||
enlistment.Done();
|
||||
}
|
||||
|
||||
public void InDoubt(Enlistment enlistment)
|
||||
{
|
||||
Rollback(enlistment);
|
||||
}
|
||||
|
||||
public void Prepare(PreparingEnlistment preparingEnlistment)
|
||||
{
|
||||
preparingEnlistment.Done();
|
||||
}
|
||||
|
||||
public void Rollback(Enlistment enlistment)
|
||||
{
|
||||
_rollback(_locationOfPackageDuringTransaction);
|
||||
|
||||
enlistment.Done();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,278 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Transactions;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Tools;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
using NuGet.ProjectModel;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class ToolPackageObtainer : IToolPackageObtainer
|
||||
{
|
||||
private readonly Lazy<string> _bundledTargetFrameworkMoniker;
|
||||
private readonly Func<FilePath> _getTempProjectPath;
|
||||
private readonly IProjectRestorer _projectRestorer;
|
||||
private readonly DirectoryPath _toolsPath;
|
||||
private readonly DirectoryPath _offlineFeedPath;
|
||||
|
||||
public ToolPackageObtainer(
|
||||
DirectoryPath toolsPath,
|
||||
DirectoryPath offlineFeedPath,
|
||||
Func<FilePath> getTempProjectPath,
|
||||
Lazy<string> bundledTargetFrameworkMoniker,
|
||||
IProjectRestorer projectRestorer
|
||||
)
|
||||
{
|
||||
_getTempProjectPath = getTempProjectPath;
|
||||
_bundledTargetFrameworkMoniker = bundledTargetFrameworkMoniker;
|
||||
_projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
|
||||
_toolsPath = toolsPath;
|
||||
_offlineFeedPath = offlineFeedPath;
|
||||
}
|
||||
|
||||
public ToolConfigurationAndExecutablePath ObtainAndReturnExecutablePath(
|
||||
string packageId,
|
||||
string packageVersion = null,
|
||||
FilePath? nugetconfig = null,
|
||||
string targetframework = null,
|
||||
string source = null,
|
||||
string verbosity = null)
|
||||
{
|
||||
var stageDirectory = _toolsPath.WithSubDirectories(".stage", Path.GetRandomFileName());
|
||||
|
||||
var toolPackageObtainTransaction = new ToolPackageObtainTransaction(
|
||||
obtainAndReturnExecutablePath: (locationOfPackageDuringTransaction) =>
|
||||
{
|
||||
if (Directory.Exists(_toolsPath.WithSubDirectories(packageId).Value))
|
||||
{
|
||||
throw new PackageObtainException(
|
||||
string.Format(CommonLocalizableStrings.ToolPackageConflictPackageId, packageId));
|
||||
}
|
||||
|
||||
locationOfPackageDuringTransaction.Add(stageDirectory);
|
||||
var toolConfigurationAndExecutablePath = ObtainAndReturnExecutablePathInStageFolder(
|
||||
packageId,
|
||||
stageDirectory,
|
||||
packageVersion,
|
||||
nugetconfig,
|
||||
targetframework,
|
||||
source,
|
||||
verbosity);
|
||||
|
||||
DirectoryPath destinationDirectory = _toolsPath.WithSubDirectories(packageId);
|
||||
|
||||
Directory.Move(
|
||||
stageDirectory.Value,
|
||||
destinationDirectory.Value);
|
||||
|
||||
locationOfPackageDuringTransaction.Clear();
|
||||
locationOfPackageDuringTransaction.Add(destinationDirectory);
|
||||
|
||||
return toolConfigurationAndExecutablePath;
|
||||
},
|
||||
rollback: (locationOfPackageDuringTransaction) =>
|
||||
{
|
||||
foreach (DirectoryPath l in locationOfPackageDuringTransaction)
|
||||
{
|
||||
if (Directory.Exists(l.Value))
|
||||
{
|
||||
Directory.Delete(l.Value, recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
using (var transactionScope = new TransactionScope())
|
||||
{
|
||||
Transaction.Current.EnlistVolatile(toolPackageObtainTransaction, EnlistmentOptions.None);
|
||||
var toolConfigurationAndExecutablePath = toolPackageObtainTransaction.ObtainAndReturnExecutablePath();
|
||||
|
||||
transactionScope.Complete();
|
||||
return toolConfigurationAndExecutablePath;
|
||||
}
|
||||
}
|
||||
|
||||
private ToolConfigurationAndExecutablePath ObtainAndReturnExecutablePathInStageFolder(
|
||||
string packageId,
|
||||
DirectoryPath stageDirectory,
|
||||
string packageVersion = null,
|
||||
FilePath? nugetconfig = null,
|
||||
string targetframework = null,
|
||||
string source = null,
|
||||
string verbosity = null)
|
||||
{
|
||||
if (packageId == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(packageId));
|
||||
}
|
||||
|
||||
if (nugetconfig != null)
|
||||
{
|
||||
if (!File.Exists(nugetconfig.Value.Value))
|
||||
{
|
||||
throw new PackageObtainException(
|
||||
string.Format(CommonLocalizableStrings.NuGetConfigurationFileDoesNotExist,
|
||||
Path.GetFullPath(nugetconfig.Value.Value)));
|
||||
}
|
||||
}
|
||||
|
||||
if (targetframework == null)
|
||||
{
|
||||
targetframework = _bundledTargetFrameworkMoniker.Value;
|
||||
}
|
||||
|
||||
var packageVersionOrPlaceHolder = new PackageVersion(packageVersion);
|
||||
|
||||
DirectoryPath nugetSandboxDirectory =
|
||||
CreateNugetSandboxDirectory(packageVersionOrPlaceHolder, stageDirectory);
|
||||
|
||||
FilePath tempProjectPath = CreateTempProject(
|
||||
packageId,
|
||||
packageVersionOrPlaceHolder,
|
||||
targetframework,
|
||||
nugetSandboxDirectory);
|
||||
|
||||
_projectRestorer.Restore(tempProjectPath, nugetSandboxDirectory, nugetconfig, source, verbosity);
|
||||
|
||||
if (packageVersionOrPlaceHolder.IsPlaceholder)
|
||||
{
|
||||
var concreteVersion =
|
||||
new DirectoryInfo(
|
||||
Directory.GetDirectories(
|
||||
nugetSandboxDirectory.WithSubDirectories(packageId).Value).Single()).Name;
|
||||
DirectoryPath versioned =
|
||||
nugetSandboxDirectory.GetParentPath().WithSubDirectories(concreteVersion);
|
||||
|
||||
MoveToVersionedDirectory(versioned, nugetSandboxDirectory);
|
||||
|
||||
nugetSandboxDirectory = versioned;
|
||||
packageVersion = concreteVersion;
|
||||
}
|
||||
|
||||
LockFile lockFile = new LockFileFormat()
|
||||
.ReadWithLock(nugetSandboxDirectory.WithFile("project.assets.json").Value)
|
||||
.Result;
|
||||
|
||||
LockFileItem dotnetToolSettings = FindAssetInLockFile(lockFile, "DotnetToolSettings.xml", packageId);
|
||||
|
||||
if (dotnetToolSettings == null)
|
||||
{
|
||||
throw new PackageObtainException(
|
||||
string.Format(CommonLocalizableStrings.ToolPackageMissingSettingsFile, packageId));
|
||||
}
|
||||
|
||||
FilePath toolConfigurationPath =
|
||||
nugetSandboxDirectory
|
||||
.WithSubDirectories(packageId, packageVersion)
|
||||
.WithFile(dotnetToolSettings.Path);
|
||||
|
||||
ToolConfiguration toolConfiguration =
|
||||
ToolConfigurationDeserializer.Deserialize(toolConfigurationPath.Value);
|
||||
|
||||
var entryPointFromLockFile =
|
||||
FindAssetInLockFile(lockFile, toolConfiguration.ToolAssemblyEntryPoint, packageId);
|
||||
|
||||
if (entryPointFromLockFile == null)
|
||||
{
|
||||
throw new PackageObtainException(string.Format(CommonLocalizableStrings.ToolPackageMissingEntryPointFile,
|
||||
packageId, toolConfiguration.ToolAssemblyEntryPoint));
|
||||
}
|
||||
|
||||
return new ToolConfigurationAndExecutablePath(
|
||||
toolConfiguration,
|
||||
_toolsPath.WithSubDirectories(
|
||||
packageId,
|
||||
packageVersion,
|
||||
packageId,
|
||||
packageVersion)
|
||||
.WithFile(entryPointFromLockFile.Path));
|
||||
}
|
||||
|
||||
private static LockFileItem FindAssetInLockFile(
|
||||
LockFile lockFile,
|
||||
string targetRelativeFilePath, string packageId)
|
||||
{
|
||||
return lockFile
|
||||
.Targets?.SingleOrDefault(t => t.RuntimeIdentifier != null)
|
||||
?.Libraries?.SingleOrDefault(l => l.Name == packageId)
|
||||
?.ToolsAssemblies
|
||||
?.SingleOrDefault(t => LockFileMatcher.MatchesFile(t, targetRelativeFilePath));
|
||||
}
|
||||
|
||||
private static void MoveToVersionedDirectory(
|
||||
DirectoryPath versioned,
|
||||
DirectoryPath temporary)
|
||||
{
|
||||
if (Directory.Exists(versioned.Value))
|
||||
{
|
||||
Directory.Delete(versioned.Value, recursive: true);
|
||||
}
|
||||
|
||||
Directory.Move(temporary.Value, versioned.Value);
|
||||
}
|
||||
|
||||
private FilePath CreateTempProject(
|
||||
string packageId,
|
||||
PackageVersion packageVersion,
|
||||
string targetframework,
|
||||
DirectoryPath individualToolVersion)
|
||||
{
|
||||
FilePath tempProjectPath = _getTempProjectPath();
|
||||
if (Path.GetExtension(tempProjectPath.Value) != "csproj")
|
||||
{
|
||||
tempProjectPath = new FilePath(Path.ChangeExtension(tempProjectPath.Value, "csproj"));
|
||||
}
|
||||
|
||||
EnsureDirectoryExists(tempProjectPath.GetDirectoryPath());
|
||||
var tempProjectContent = new XDocument(
|
||||
new XElement("Project",
|
||||
new XAttribute("Sdk", "Microsoft.NET.Sdk"),
|
||||
new XElement("PropertyGroup",
|
||||
new XElement("TargetFramework", targetframework),
|
||||
new XElement("RestorePackagesPath", individualToolVersion.Value), // tool package will restore to tool folder
|
||||
new XElement("RestoreProjectStyle", "DotnetToolReference"), // without it, project cannot reference tool package
|
||||
new XElement("RestoreRootConfigDirectory", Directory.GetCurrentDirectory()), // config file probing start directory
|
||||
new XElement("DisableImplicitFrameworkReferences", "true"), // no Microsoft.NETCore.App in tool folder
|
||||
new XElement("RestoreFallbackFolders", "clear"), // do not use fallbackfolder, tool package need to be copied to tool folder
|
||||
new XElement("RestoreAdditionalProjectSources", // use fallbackfolder as feed to enable offline
|
||||
Directory.Exists(_offlineFeedPath.Value) ? _offlineFeedPath.Value : string.Empty),
|
||||
new XElement("RestoreAdditionalProjectFallbackFolders", string.Empty), // block other
|
||||
new XElement("RestoreAdditionalProjectFallbackFoldersExcludes", string.Empty), // block other
|
||||
new XElement("DisableImplicitNuGetFallbackFolder", "true")), // disable SDK side implicit NuGetFallbackFolder
|
||||
new XElement("ItemGroup",
|
||||
new XElement("PackageReference",
|
||||
new XAttribute("Include", packageId),
|
||||
new XAttribute("Version", packageVersion.IsConcreteValue ? packageVersion.Value : "*") // nuget will restore * for latest
|
||||
))
|
||||
));
|
||||
|
||||
|
||||
File.WriteAllText(tempProjectPath.Value,
|
||||
tempProjectContent.ToString());
|
||||
|
||||
return tempProjectPath;
|
||||
}
|
||||
|
||||
private DirectoryPath CreateNugetSandboxDirectory(
|
||||
PackageVersion packageVersion,
|
||||
DirectoryPath stageDirectory
|
||||
)
|
||||
{
|
||||
DirectoryPath individualToolVersion = stageDirectory.WithSubDirectories(packageVersion.Value);
|
||||
EnsureDirectoryExists(individualToolVersion);
|
||||
return individualToolVersion;
|
||||
}
|
||||
|
||||
private static void EnsureDirectoryExists(DirectoryPath path)
|
||||
{
|
||||
if (!Directory.Exists(path.Value))
|
||||
{
|
||||
Directory.CreateDirectory(path.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
src/dotnet/ToolPackage/ToolPackageStore.cs
Normal file
42
src/dotnet/ToolPackage/ToolPackageStore.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ToolPackage
|
||||
{
|
||||
internal class ToolPackageStore : IToolPackageStore
|
||||
{
|
||||
public ToolPackageStore(DirectoryPath root)
|
||||
{
|
||||
Root = root;
|
||||
}
|
||||
|
||||
public DirectoryPath Root { get; private set; }
|
||||
|
||||
public IEnumerable<IToolPackage> GetInstalledPackages(string packageId)
|
||||
{
|
||||
if (packageId == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(packageId));
|
||||
}
|
||||
|
||||
var packageRootDirectory = Root.WithSubDirectories(packageId);
|
||||
if (!Directory.Exists(packageRootDirectory.Value))
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var subdirectory in Directory.EnumerateDirectories(packageRootDirectory.Value))
|
||||
{
|
||||
var version = Path.GetFileName(subdirectory);
|
||||
yield return new ToolPackageInstance(
|
||||
this,
|
||||
packageId,
|
||||
version,
|
||||
packageRootDirectory.WithSubDirectories(version));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
94
src/dotnet/TransactionalAction.cs
Normal file
94
src/dotnet/TransactionalAction.cs
Normal file
|
@ -0,0 +1,94 @@
|
|||
// 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.Transactions;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
public sealed class TransactionalAction
|
||||
{
|
||||
private class EnlistmentNotification : IEnlistmentNotification
|
||||
{
|
||||
private Action _commit;
|
||||
private Action _rollback;
|
||||
|
||||
public EnlistmentNotification(Action commit, Action rollback)
|
||||
{
|
||||
_commit = commit;
|
||||
_rollback = rollback;
|
||||
}
|
||||
|
||||
public void Commit(Enlistment enlistment)
|
||||
{
|
||||
if (_commit != null)
|
||||
{
|
||||
_commit();
|
||||
_commit = null;
|
||||
}
|
||||
|
||||
enlistment.Done();
|
||||
}
|
||||
|
||||
public void InDoubt(Enlistment enlistment)
|
||||
{
|
||||
Rollback(enlistment);
|
||||
}
|
||||
|
||||
public void Prepare(PreparingEnlistment enlistment)
|
||||
{
|
||||
enlistment.Prepared();
|
||||
}
|
||||
|
||||
public void Rollback(Enlistment enlistment)
|
||||
{
|
||||
if (_rollback != null)
|
||||
{
|
||||
_rollback();
|
||||
_rollback = null;
|
||||
}
|
||||
|
||||
enlistment.Done();
|
||||
}
|
||||
}
|
||||
|
||||
public static T Run<T>(
|
||||
Func<T> action,
|
||||
Action commit = null,
|
||||
Action rollback = null)
|
||||
{
|
||||
if (action == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(action));
|
||||
}
|
||||
|
||||
// This automatically inherits any ambient transaction
|
||||
// If a transaction is inherited, completing this scope will be a no-op
|
||||
T result = default(T);
|
||||
using (var scope = new TransactionScope(
|
||||
TransactionScopeOption.Required,
|
||||
TimeSpan.Zero))
|
||||
{
|
||||
Transaction.Current.EnlistVolatile(
|
||||
new EnlistmentNotification(commit, rollback),
|
||||
EnlistmentOptions.None);
|
||||
|
||||
result = action();
|
||||
|
||||
scope.Complete();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void Run(
|
||||
Action action,
|
||||
Action commit = null,
|
||||
Action rollback = null)
|
||||
{
|
||||
Run<object>(
|
||||
action: () => { action(); return null; },
|
||||
commit: commit,
|
||||
rollback: rollback);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ path-to-application:
|
|||
vstest {LocalizableStrings.VsTestDefinition}
|
||||
store {LocalizableStrings.StoreDefinition}
|
||||
install {LocalizableStrings.InstallDefinition}
|
||||
uninstall {LocalizableStrings.UninstallDefinition}
|
||||
help {LocalizableStrings.HelpDefinition}
|
||||
|
||||
{LocalizableStrings.CommonOptions}:
|
||||
|
|
|
@ -270,4 +270,7 @@
|
|||
<data name="InstallDefinition" xml:space="preserve">
|
||||
<value>Installs an item into the development environment.</value>
|
||||
</data>
|
||||
<data name="UninstallDefinition" xml:space="preserve">
|
||||
<value>Uninstalls a tool from the development environment.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Nainstaluje položku do vývojového prostředí.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Installiert ein Element in der Entwicklungsumgebung.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Instala un elemento en el entorno de desarrollo.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Installe un élément dans l'environnement de développement.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Installa un elemento nell'ambiente di sviluppo.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">項目を開発環境にインストールします。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">개발 환경에 항목을 설치합니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Instaluje element w środowisku deweloperskim.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Instala um item no ambiente de desenvolvimento.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Устанавливает элемент в среде разработки.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">Bir öğeyi geliştirme ortamına yükler.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">将项目安装到开发环境中。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -257,6 +257,11 @@
|
|||
<target state="translated">將項目安裝至部署環境。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallDefinition">
|
||||
<source>Uninstalls a tool from the development environment.</source>
|
||||
<target state="new">Uninstalls a tool from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -18,9 +18,10 @@ namespace Microsoft.DotNet.Tools.Install.Tool
|
|||
{
|
||||
internal class InstallToolCommand : CommandBase
|
||||
{
|
||||
private readonly IToolPackageObtainer _toolPackageObtainer;
|
||||
private readonly IToolPackageStore _toolPackageStore;
|
||||
private readonly IToolPackageInstaller _toolPackageInstaller;
|
||||
private readonly IShellShimRepository _shellShimRepository;
|
||||
private readonly IEnvironmentPathInstruction _environmentPathInstruction;
|
||||
private readonly IShellShimMaker _shellShimMaker;
|
||||
private readonly IReporter _reporter;
|
||||
private readonly IReporter _errorReporter;
|
||||
|
||||
|
@ -35,8 +36,9 @@ namespace Microsoft.DotNet.Tools.Install.Tool
|
|||
public InstallToolCommand(
|
||||
AppliedOption appliedCommand,
|
||||
ParseResult parseResult,
|
||||
IToolPackageObtainer toolPackageObtainer = null,
|
||||
IShellShimMaker shellShimMaker = null,
|
||||
IToolPackageStore toolPackageStore = null,
|
||||
IToolPackageInstaller toolPackageInstaller = null,
|
||||
IShellShimRepository shellShimRepository = null,
|
||||
IEnvironmentPathInstruction environmentPathInstruction = null,
|
||||
IReporter reporter = null)
|
||||
: base(parseResult)
|
||||
|
@ -55,21 +57,20 @@ namespace Microsoft.DotNet.Tools.Install.Tool
|
|||
_verbosity = appliedCommand.SingleArgumentOrDefault("verbosity");
|
||||
|
||||
var cliFolderPathCalculator = new CliFolderPathCalculator();
|
||||
var offlineFeedPath = new DirectoryPath(cliFolderPathCalculator.CliFallbackFolderPath);
|
||||
_toolPackageObtainer = toolPackageObtainer ?? new ToolPackageObtainer(
|
||||
new DirectoryPath(cliFolderPathCalculator.ToolsPackagePath),
|
||||
offlineFeedPath,
|
||||
() => new DirectoryPath(Path.GetTempPath())
|
||||
.WithSubDirectories(Path.GetRandomFileName())
|
||||
.WithFile(Path.GetRandomFileName() + ".csproj"),
|
||||
new Lazy<string>(BundledTargetFramework.GetTargetFrameworkMoniker),
|
||||
new ProjectRestorer(reporter));
|
||||
|
||||
_toolPackageStore = toolPackageStore
|
||||
?? new ToolPackageStore(new DirectoryPath(cliFolderPathCalculator.ToolsPackagePath));
|
||||
|
||||
_toolPackageInstaller = toolPackageInstaller
|
||||
?? new ToolPackageInstaller(
|
||||
_toolPackageStore,
|
||||
new ProjectRestorer(_reporter));
|
||||
|
||||
_environmentPathInstruction = environmentPathInstruction
|
||||
?? EnvironmentPathFactory
|
||||
.CreateEnvironmentPathInstruction();
|
||||
?? EnvironmentPathFactory.CreateEnvironmentPathInstruction();
|
||||
|
||||
_shellShimMaker = shellShimMaker ?? new ShellShimMaker(cliFolderPathCalculator.ToolsShimPath);
|
||||
_shellShimRepository = shellShimRepository
|
||||
?? new ShellShimRepository(new DirectoryPath(cliFolderPathCalculator.ToolsShimPath));
|
||||
|
||||
_reporter = (reporter ?? Reporter.Output);
|
||||
_errorReporter = (reporter ?? Reporter.Error);
|
||||
|
@ -82,46 +83,78 @@ namespace Microsoft.DotNet.Tools.Install.Tool
|
|||
throw new GracefulException(LocalizableStrings.InstallToolCommandOnlySupportGlobal);
|
||||
}
|
||||
|
||||
try
|
||||
if (_configFilePath != null && !File.Exists(_configFilePath))
|
||||
{
|
||||
throw new GracefulException(
|
||||
string.Format(
|
||||
LocalizableStrings.NuGetConfigurationFileDoesNotExist,
|
||||
Path.GetFullPath(_configFilePath)));
|
||||
}
|
||||
|
||||
// Prevent installation if any version of the package is installed
|
||||
if (_toolPackageStore.GetInstalledPackages(_packageId).FirstOrDefault() != null)
|
||||
{
|
||||
_errorReporter.WriteLine(string.Format(LocalizableStrings.ToolAlreadyInstalled, _packageId).Red());
|
||||
return 1;
|
||||
}
|
||||
|
||||
FilePath? configFile = null;
|
||||
if (_configFilePath != null)
|
||||
{
|
||||
configFile = new FilePath(_configFilePath);
|
||||
}
|
||||
|
||||
using (var transactionScope = new TransactionScope())
|
||||
try
|
||||
{
|
||||
var toolConfigurationAndExecutablePath = _toolPackageObtainer.ObtainAndReturnExecutablePath(
|
||||
IToolPackage package = null;
|
||||
using (var scope = new TransactionScope(
|
||||
TransactionScopeOption.Required,
|
||||
TimeSpan.Zero))
|
||||
{
|
||||
package = _toolPackageInstaller.InstallPackage(
|
||||
packageId: _packageId,
|
||||
packageVersion: _packageVersion,
|
||||
nugetconfig: configFile,
|
||||
targetframework: _framework,
|
||||
targetFramework: _framework,
|
||||
nugetConfig: configFile,
|
||||
source: _source,
|
||||
verbosity: _verbosity);
|
||||
|
||||
var commandName = toolConfigurationAndExecutablePath.Configuration.CommandName;
|
||||
foreach (var command in package.Commands)
|
||||
{
|
||||
_shellShimRepository.CreateShim(command.Executable, command.Name);
|
||||
}
|
||||
|
||||
_shellShimMaker.CreateShim(
|
||||
toolConfigurationAndExecutablePath.Executable,
|
||||
commandName);
|
||||
scope.Complete();
|
||||
}
|
||||
|
||||
_environmentPathInstruction
|
||||
.PrintAddPathInstructionIfPathDoesNotExist();
|
||||
_environmentPathInstruction.PrintAddPathInstructionIfPathDoesNotExist();
|
||||
|
||||
_reporter.WriteLine(
|
||||
string.Format(LocalizableStrings.InstallationSucceeded, commandName));
|
||||
transactionScope.Complete();
|
||||
string.Format(
|
||||
LocalizableStrings.InstallationSucceeded,
|
||||
string.Join(", ", package.Commands.Select(c => c.Name)),
|
||||
package.PackageId,
|
||||
package.PackageVersion).Green());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
catch (PackageObtainException ex)
|
||||
catch (ToolPackageException ex)
|
||||
{
|
||||
if (Reporter.IsVerbose)
|
||||
{
|
||||
Reporter.Verbose.WriteLine(ex.ToString().Red());
|
||||
}
|
||||
|
||||
_errorReporter.WriteLine(ex.Message.Red());
|
||||
_errorReporter.WriteLine(string.Format(LocalizableStrings.ToolInstallationFailed, _packageId).Red());
|
||||
return 1;
|
||||
}
|
||||
catch (ToolConfigurationException ex)
|
||||
{
|
||||
if (Reporter.IsVerbose)
|
||||
{
|
||||
Reporter.Verbose.WriteLine(ex.ToString().Red());
|
||||
}
|
||||
|
||||
_errorReporter.WriteLine(
|
||||
string.Format(
|
||||
LocalizableStrings.InvalidToolConfiguration,
|
||||
|
@ -129,8 +162,21 @@ namespace Microsoft.DotNet.Tools.Install.Tool
|
|||
_errorReporter.WriteLine(string.Format(LocalizableStrings.ToolInstallationFailedContactAuthor, _packageId).Red());
|
||||
return 1;
|
||||
}
|
||||
catch (ShellShimException ex)
|
||||
{
|
||||
if (Reporter.IsVerbose)
|
||||
{
|
||||
Reporter.Verbose.WriteLine(ex.ToString().Red());
|
||||
}
|
||||
|
||||
return 0;
|
||||
_errorReporter.WriteLine(
|
||||
string.Format(
|
||||
LocalizableStrings.FailedToCreateToolShim,
|
||||
_packageId,
|
||||
ex.Message).Red());
|
||||
_errorReporter.WriteLine(string.Format(LocalizableStrings.ToolInstallationFailed, _packageId).Red());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,15 +144,12 @@
|
|||
<data name="FrameworkOptionDescription" xml:space="preserve">
|
||||
<value>The target framework to install the tool for.</value>
|
||||
</data>
|
||||
<data name="FailedToAddPackage" xml:space="preserve">
|
||||
<value>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</value>
|
||||
<data name="NuGetConfigurationFileDoesNotExist" xml:space="preserve">
|
||||
<value>NuGet configuration file '{0}' does not exist.</value>
|
||||
</data>
|
||||
<data name="InstallationSucceeded" xml:space="preserve">
|
||||
<value>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</value>
|
||||
<value>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</value>
|
||||
</data>
|
||||
<data name="GlobalOptionDescription" xml:space="preserve">
|
||||
<value>Install user wide.</value>
|
||||
|
@ -175,4 +172,10 @@ The installation succeeded. If there are no further instructions, you can type t
|
|||
<data name="ToolInstallationRestoreFailed" xml:space="preserve">
|
||||
<value>The tool package could not be restored.</value>
|
||||
</data>
|
||||
<data name="ToolAlreadyInstalled" xml:space="preserve">
|
||||
<value>Tool '{0}' is already installed.</value>
|
||||
</data>
|
||||
<data name="FailedToCreateToolShim" xml:space="preserve">
|
||||
<value>Failed to create shell shim for tool '{0}': {1}</value>
|
||||
</data>
|
||||
</root>
|
|
@ -14,27 +14,27 @@ namespace Microsoft.DotNet.Tools.Install.Tool
|
|||
{
|
||||
internal class ProjectRestorer : IProjectRestorer
|
||||
{
|
||||
private IReporter _reporter;
|
||||
private readonly IReporter _reporter;
|
||||
|
||||
public ProjectRestorer(IReporter reporter)
|
||||
public ProjectRestorer(IReporter reporter = null)
|
||||
{
|
||||
_reporter = reporter;
|
||||
}
|
||||
|
||||
public void Restore(
|
||||
FilePath projectPath,
|
||||
FilePath project,
|
||||
DirectoryPath assetJsonOutput,
|
||||
FilePath? nugetconfig,
|
||||
FilePath? nugetConfig = null,
|
||||
string source = null,
|
||||
string verbosity = null)
|
||||
{
|
||||
var argsToPassToRestore = new List<string>();
|
||||
|
||||
argsToPassToRestore.Add(projectPath.Value);
|
||||
if (nugetconfig != null)
|
||||
argsToPassToRestore.Add(project.Value);
|
||||
if (nugetConfig != null)
|
||||
{
|
||||
argsToPassToRestore.Add("--configfile");
|
||||
argsToPassToRestore.Add(nugetconfig.Value.Value);
|
||||
argsToPassToRestore.Add(nugetConfig.Value.Value);
|
||||
}
|
||||
|
||||
if (source != null)
|
||||
|
@ -65,7 +65,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool
|
|||
var result = command.Execute();
|
||||
if (result.ExitCode != 0)
|
||||
{
|
||||
throw new PackageObtainException(LocalizableStrings.ToolInstallationRestoreFailed);
|
||||
throw new ToolPackageException(LocalizableStrings.ToolInstallationRestoreFailed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
Instalace byla úspěšná. Pokud nejsou další pokyny, můžete přímo do jádra napsat následující příkaz k vyvolání: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Nepovedlo se přidat balíček.
|
||||
WorkingDirectory: {0}
|
||||
Argumenty: {1}
|
||||
Výstup: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">ID balíčku NuGet nástroje, který se má nainstalovat</target>
|
||||
|
@ -95,6 +84,21 @@ Výstup: {2}{3}</target>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
Die Installation war erfolgreich. Sofern keine weiteren Anweisungen vorliegen, können Sie für den Aufruf den folgenden Befehl direkt in der Shell eingeben: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Fehler beim Hinzufügen des Pakets.
|
||||
WorkingDirectory: {0}
|
||||
Argumente: {1}
|
||||
Ausgabe: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">NuGet-Paket-ID des zu installierenden Tools.</target>
|
||||
|
@ -95,6 +84,21 @@ Ausgabe: {2}{3}</target>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
La instalación se completó correctamente. Si no hay más instrucciones, puede escribir el comando siguiente en el shell directamente para invocar: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">No se pudo agregar el paquete.
|
||||
Directorio de trabajo: {0}
|
||||
Argumentos: {1}
|
||||
Salida: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">Id. del paquete de NuGet que se instalará.</target>
|
||||
|
@ -95,6 +84,21 @@ Salida: {2}{3}</target>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
L'installation a réussi. En l'absence d'instructions supplémentaires, vous pouvez taper directement la commande suivante dans l'interpréteur de commandes pour appeler : {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Échec de l'ajout du package.
|
||||
WorkingDirectory : {0}
|
||||
Arguments : {1}
|
||||
Sortie : {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">ID de package NuGet de l'outil à installer.</target>
|
||||
|
@ -95,6 +84,21 @@ Sortie : {2}{3}</target>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
L'installazione è riuscita. Se non ci sono altre istruzioni, è possibile digitare direttamente nella shell il comando seguente da richiamare: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Non è stato possibile aggiungere il pacchetto.
|
||||
Directory di lavoro: {0}
|
||||
Argomenti: {1}
|
||||
Output: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">ID pacchetto NuGet dello strumento da installare.</target>
|
||||
|
@ -95,6 +84,21 @@ Output: {2}{3}</target>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
インストールは成功しました。追加の指示がなければ、シェルに次のコマンドを直接入力して呼び出すことができます: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">パッケージを追加できませんでした。
|
||||
作業ディレクトリ: {0}
|
||||
引数: {1}
|
||||
出力: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">インストールするツールの NuGet パッケージ ID。</target>
|
||||
|
@ -95,6 +84,21 @@ Output: {2}{3}</source>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
설치했습니다. 추가 지침이 없는 경우 셸에 다음 명령을 직접 입력하여 {0}을(를) 호출할 수 있습니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">패키지를 추가하지 못했습니다.
|
||||
작업 디렉터리: {0}
|
||||
인수: {1}
|
||||
출력: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">설치할 도구의 NuGet 패키지 ID입니다.</target>
|
||||
|
@ -95,6 +84,21 @@ Output: {2}{3}</source>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
Instalacja powiodła się. Jeśli nie ma dodatkowych instrukcji, możesz wpisać następujące polecenie bezpośrednio w powłoce, aby wywołać: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Nie można dodać pakietu.
|
||||
Katalog roboczy: {0}
|
||||
Argumenty: {1}
|
||||
Dane wyjściowe: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">Identyfikator pakietu NuGet narzędzia do zainstalowania.</target>
|
||||
|
@ -95,6 +84,21 @@ Dane wyjściowe: {2}{3}</target>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
A instalação foi bem-sucedida. Se não houver outras instruções, digite o seguinte comando no shell diretamente para invocar: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Falha ao adicionar pacote.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">A ID do pacote NuGet da ferramenta a ser instalada.</target>
|
||||
|
@ -95,6 +84,21 @@ Output: {2}{3}</target>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
Установка завершена. Если других действий не требуется, вы можете непосредственно в оболочке ввести для вызова следующую команду: {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Не удалось добавить пакет.
|
||||
Рабочий каталог: {0}
|
||||
Аргументы: {1}
|
||||
Выходные данные: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">Идентификатор пакета NuGet устанавливаемого инструмента.</target>
|
||||
|
@ -95,6 +84,21 @@ Output: {2}{3}</source>
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
Yükleme başarılı oldu. Daha fazla yönerge yoksa, çağırmak için şu komutu doğrudan kabuğa yazabilirsiniz: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">Paket eklenemedi.
|
||||
WorkingDirectory: {0}
|
||||
Bağımsız değişkenler: {1}
|
||||
Çıkış: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">Yüklenecek aracın NuGet Paket Kimliği.</target>
|
||||
|
@ -95,6 +84,21 @@ Bağımsız değişkenler: {1}
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
安装成功。如果没有进一步的说明,则可直接在 shell 中键入以下命令进行调用: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">未能添加包。
|
||||
WorkingDirectory: {0}
|
||||
参数: {1}
|
||||
输出: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">要安装的工具的 NuGet 包 ID。</target>
|
||||
|
@ -95,6 +84,21 @@ WorkingDirectory: {0}
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
|
@ -13,23 +13,12 @@
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="InstallationSucceeded">
|
||||
<source>
|
||||
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</source>
|
||||
<target state="translated">
|
||||
<source>If there were no additional instructions, you can type the following command to invoke the tool: {0}
|
||||
Tool '{1}' (version '{2}') was successfully installed.</source>
|
||||
<target state="needs-review-translation">
|
||||
安裝已成功。如果沒有進一步指示,您可以直接在命令介面中鍵入下列命令,以叫用: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToAddPackage">
|
||||
<source>Failed to add package.
|
||||
WorkingDirectory: {0}
|
||||
Arguments: {1}
|
||||
Output: {2}{3}</source>
|
||||
<target state="translated">無法新增套件。
|
||||
WorkingDirectory: {0}
|
||||
引數: {1}
|
||||
輸出: {2}{3}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to install.</source>
|
||||
<target state="translated">要安裝之工具的 NuGet 套件識別碼。</target>
|
||||
|
@ -95,6 +84,21 @@ WorkingDirectory: {0}
|
|||
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolAlreadyInstalled">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateToolShim">
|
||||
<source>Failed to create shell shim for tool '{0}': {1}</source>
|
||||
<target state="new">Failed to create shell shim for tool '{0}': {1}</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="ToolInstallationRestoreFailed">
|
||||
<source>The tool package could not be restored.</source>
|
||||
<target state="new">The tool package could not be restored.</target>
|
||||
|
|
129
src/dotnet/commands/dotnet-uninstall/LocalizableStrings.resx
Normal file
129
src/dotnet/commands/dotnet-uninstall/LocalizableStrings.resx
Normal 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="UninstallFullCommandName" xml:space="preserve">
|
||||
<value>.NET Uninstall Command</value>
|
||||
</data>
|
||||
<data name="CommandDescription" xml:space="preserve">
|
||||
<value>Uninstalls an item from the development environment.</value>
|
||||
</data>
|
||||
<data name="UninstallArgumentDescription" xml:space="preserve">
|
||||
<value>The NuGet package identifier of the tool to uninstall.</value>
|
||||
</data>
|
||||
</root>
|
31
src/dotnet/commands/dotnet-uninstall/UninstallCommand.cs
Normal file
31
src/dotnet/commands/dotnet-uninstall/UninstallCommand.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
// 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;
|
||||
using Microsoft.DotNet.Tools.Uninstall.Tool;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Uninstall
|
||||
{
|
||||
public class UninstallCommand : DotNetTopLevelCommandBase
|
||||
{
|
||||
protected override string CommandName => "uninstall";
|
||||
protected override string FullCommandNameLocalized => LocalizableStrings.UninstallFullCommandName;
|
||||
protected override string ArgumentName => Constants.ToolPackageArgumentName;
|
||||
protected override string ArgumentDescriptionLocalized => LocalizableStrings.UninstallArgumentDescription;
|
||||
|
||||
internal override Dictionary<string, Func<AppliedOption, CommandBase>> SubCommands =>
|
||||
new Dictionary<string, Func<AppliedOption, CommandBase>>
|
||||
{
|
||||
["tool"] = options => new UninstallToolCommand(options["tool"], ParseResult)
|
||||
};
|
||||
|
||||
public static int Run(string[] args)
|
||||
{
|
||||
return new UninstallCommand().RunCommand(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Microsoft.DotNet.Cli.CommandLine;
|
||||
using LocalizableStrings = Microsoft.DotNet.Tools.Uninstall.LocalizableStrings;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
internal static class UninstallCommandParser
|
||||
{
|
||||
public static Command Uninstall()
|
||||
{
|
||||
return Create.Command(
|
||||
"uninstall",
|
||||
LocalizableStrings.CommandDescription,
|
||||
Accept.NoArguments(),
|
||||
CommonOptions.HelpOption(),
|
||||
UninstallToolCommandParser.UninstallTool());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
<?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 uninstall.</value>
|
||||
</data>
|
||||
<data name="SpecifyExactlyOnePackageId" xml:space="preserve">
|
||||
<value>Please specify one tool Package Id to uninstall.</value>
|
||||
</data>
|
||||
<data name="CommandDescription" xml:space="preserve">
|
||||
<value>Uninstalls a tool.</value>
|
||||
</data>
|
||||
<data name="GlobalOptionDescription" xml:space="preserve">
|
||||
<value>Uninstall user wide.</value>
|
||||
</data>
|
||||
<data name="UninstallToolCommandOnlySupportsGlobal" xml:space="preserve">
|
||||
<value>The --global switch (-g) is currently required because only user wide tools are supported.</value>
|
||||
</data>
|
||||
<data name="UninstallSucceeded" xml:space="preserve">
|
||||
<value>Tool '{0}' (version '{1}') was successfully uninstalled.</value>
|
||||
</data>
|
||||
<data name="ToolNotInstalled" xml:space="preserve">
|
||||
<value>Tool '{0}' is not currently installed.</value>
|
||||
</data>
|
||||
<data name="ToolHasMultipleVersionsInstalled" xml:space="preserve">
|
||||
<value>Tool '{0}' has multiple versions installed and cannot be uninstalled.</value>
|
||||
</data>
|
||||
<data name="FailedToUninstallTool" xml:space="preserve">
|
||||
<value>Failed to uninstall tool '{0}': {1}</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,125 @@
|
|||
// 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.IO;
|
||||
using System.Linq;
|
||||
using System.Transactions;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Cli.CommandLine;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Configurer;
|
||||
using Microsoft.DotNet.ShellShim;
|
||||
using Microsoft.DotNet.ToolPackage;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Uninstall.Tool
|
||||
{
|
||||
internal class UninstallToolCommand : CommandBase
|
||||
{
|
||||
private readonly AppliedOption _options;
|
||||
private readonly IToolPackageStore _toolPackageStore;
|
||||
private readonly IShellShimRepository _shellShimRepository;
|
||||
private readonly IReporter _reporter;
|
||||
private readonly IReporter _errorReporter;
|
||||
|
||||
public UninstallToolCommand(
|
||||
AppliedOption options,
|
||||
ParseResult result,
|
||||
IToolPackageStore toolPackageStore = null,
|
||||
IShellShimRepository shellShimRepository = null,
|
||||
IReporter reporter = null)
|
||||
: base(result)
|
||||
{
|
||||
var pathCalculator = new CliFolderPathCalculator();
|
||||
|
||||
_options = options ?? throw new ArgumentNullException(nameof(options));
|
||||
_toolPackageStore = toolPackageStore ?? new ToolPackageStore(
|
||||
new DirectoryPath(pathCalculator.ToolsPackagePath));
|
||||
_shellShimRepository = shellShimRepository ?? new ShellShimRepository(
|
||||
new DirectoryPath(pathCalculator.ToolsShimPath));
|
||||
_reporter = reporter ?? Reporter.Output;
|
||||
_errorReporter = reporter ?? Reporter.Error;
|
||||
}
|
||||
|
||||
public override int Execute()
|
||||
{
|
||||
if (!_options.ValueOrDefault<bool>("global"))
|
||||
{
|
||||
throw new GracefulException(LocalizableStrings.UninstallToolCommandOnlySupportsGlobal);
|
||||
}
|
||||
|
||||
var packageId = _options.Arguments.Single();
|
||||
IToolPackage package = null;
|
||||
|
||||
try
|
||||
{
|
||||
package = _toolPackageStore.GetInstalledPackages(packageId).SingleOrDefault();
|
||||
if (package == null)
|
||||
{
|
||||
_errorReporter.WriteLine(
|
||||
string.Format(
|
||||
LocalizableStrings.ToolNotInstalled,
|
||||
packageId).Red());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
_errorReporter.WriteLine(
|
||||
string.Format(
|
||||
LocalizableStrings.ToolHasMultipleVersionsInstalled,
|
||||
packageId).Red());
|
||||
return 1;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using (var scope = new TransactionScope(
|
||||
TransactionScopeOption.Required,
|
||||
TimeSpan.Zero))
|
||||
{
|
||||
foreach (var command in package.Commands)
|
||||
{
|
||||
_shellShimRepository.RemoveShim(command.Name);
|
||||
}
|
||||
|
||||
package.Uninstall();
|
||||
|
||||
scope.Complete();
|
||||
}
|
||||
|
||||
_reporter.WriteLine(
|
||||
string.Format(
|
||||
LocalizableStrings.UninstallSucceeded,
|
||||
package.PackageId,
|
||||
package.PackageVersion).Green());
|
||||
return 0;
|
||||
}
|
||||
catch (ToolPackageException ex)
|
||||
{
|
||||
if (Reporter.IsVerbose)
|
||||
{
|
||||
Reporter.Verbose.WriteLine(ex.ToString().Red());
|
||||
}
|
||||
|
||||
_errorReporter.WriteLine(ex.Message.Red());
|
||||
return 1;
|
||||
}
|
||||
catch (Exception ex) when (ex is ToolConfigurationException || ex is ShellShimException)
|
||||
{
|
||||
if (Reporter.IsVerbose)
|
||||
{
|
||||
Reporter.Verbose.WriteLine(ex.ToString().Red());
|
||||
}
|
||||
|
||||
_errorReporter.WriteLine(
|
||||
string.Format(
|
||||
LocalizableStrings.FailedToUninstallTool,
|
||||
packageId,
|
||||
ex.Message).Red());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
// 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.Uninstall.Tool.LocalizableStrings;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
internal static class UninstallToolCommandParser
|
||||
{
|
||||
public static Command UninstallTool()
|
||||
{
|
||||
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()),
|
||||
CommonOptions.HelpOption());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,57 @@
|
|||
<?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="PackageIdArgumentDescription">
|
||||
<source>NuGet Package Id of the tool to uninstall.</source>
|
||||
<target state="new">NuGet Package Id of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls a tool.</source>
|
||||
<target state="new">Uninstalls a tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="PackageIdArgumentName">
|
||||
<source>PACKAGE_ID</source>
|
||||
<target state="new">PACKAGE_ID</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="SpecifyExactlyOnePackageId">
|
||||
<source>Please specify one tool Package Id to uninstall.</source>
|
||||
<target state="new">Please specify one tool Package Id to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="GlobalOptionDescription">
|
||||
<source>Uninstall user wide.</source>
|
||||
<target state="new">Uninstall user wide.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallToolCommandOnlySupportsGlobal">
|
||||
<source>The --global switch (-g) is currently required because only user wide tools are supported.</source>
|
||||
<target state="new">The --global switch (-g) is currently required because only user wide tools are supported.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallSucceeded">
|
||||
<source>Tool '{0}' (version '{1}') was successfully uninstalled.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') was successfully uninstalled.</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="ToolHasMultipleVersionsInstalled">
|
||||
<source>Tool '{0}' has multiple versions installed and cannot be uninstalled.</source>
|
||||
<target state="new">Tool '{0}' has multiple versions installed and cannot be uninstalled.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallTool">
|
||||
<source>Failed to uninstall tool '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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="UninstallFullCommandName">
|
||||
<source>.NET Uninstall Command</source>
|
||||
<target state="new">.NET Uninstall Command</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UninstallArgumentDescription">
|
||||
<source>The NuGet package identifier of the tool to uninstall.</source>
|
||||
<target state="new">The NuGet package identifier of the tool to uninstall.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Uninstalls an item from the development environment.</source>
|
||||
<target state="new">Uninstalls an item from the development environment.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -41,6 +41,8 @@
|
|||
<EmbeddedResource Update="**\dotnet-sln\*.resx" Namespace="Microsoft.DotNet.Tools.Sln" />
|
||||
<EmbeddedResource Update="**\dotnet-store\*.resx" Namespace="Microsoft.DotNet.Tools.Store" />
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj" />
|
||||
|
|
|
@ -680,85 +680,21 @@
|
|||
{0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NuGetConfigurationFileDoesNotExist">
|
||||
<source>NuGet configuration file {0} does not exist.</source>
|
||||
<target state="translated">Konfigurační soubor NuGet {0} neexistuje.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathLinuxNeedLogout">
|
||||
<source>Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.</source>
|
||||
<target state="translated">Právě jste nainstalovali sadu .NET Core SDK, bude proto nutné před spuštěním nainstalovaného nástroje se odhlásit nebo restartovat relaci.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathLinuxManualInstruction">
|
||||
<source>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
If you are using bash. You can do this by running the following command:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</source>
|
||||
<target state="translated">Nejde najít cestu ke spustitelnému souboru nástrojů. Zkontrolujte, jestli v cestě (PATH) máte přidaný {0}.
|
||||
Pokud používáte bash, můžete to provést spuštěním následujícího příkazu:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathOSXNeedReopen">
|
||||
<source>Since you just installed the .NET Core SDK, you will need to reopen terminal before running the tool you installed.</source>
|
||||
<target state="translated">Právě jste nainstalovali sadu .NET Core SDK, bude proto nutné před spuštěním nainstalovaného nástroje znovu otevřít terminál.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathOSXManualInstruction">
|
||||
<source>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
If you are using bash, You can do this by running the following command:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</source>
|
||||
<target state="translated">Nejde najít cestu ke spustitelnému souboru nástrojů. Zkontrolujte, jestli v cestě (PATH) máte přidaný {0}.
|
||||
Pokud používáte bash, můžete to provést spuštěním následujícího příkazu:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailInstallToolSameName">
|
||||
<source>Failed to install tool {0}. A command with the same name already exists.</source>
|
||||
<target state="translated">Instalace nástroje {0} byla neúspěšná. Už existuje příkaz se stejným názvem.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailInstallToolPermission">
|
||||
<source>Failed to change permission:
|
||||
Error: {0}
|
||||
Output: {1}</source>
|
||||
<target state="translated">Změna oprávnění byla neúspěšná:
|
||||
Chyba: {0}
|
||||
Výstup: {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathWindowsNeedReopen">
|
||||
<source>Since you just installed the .NET Core SDK, you will need to reopen the Command Prompt window before running the tool you installed.</source>
|
||||
<target state="translated">Právě jste nainstalovali sadu .NET Core SDK, bude proto nutné před spuštěním nainstalovaného nástroje znovu otevřít okno příkazového řádku.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathWindowsManualInstruction">
|
||||
<source>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
You can do this by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{1}"</source>
|
||||
<target state="translated">Nejde najít cestu ke spustitelnému souboru nástrojů. Zkontrolujte, jestli v cestě (PATH) máte přidaný {0}.
|
||||
Můžete to provést spuštěním následujícího příkazu:
|
||||
|
||||
setx PATH "%PATH%;{1}"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolPackageMissingEntryPointFile">
|
||||
<source>Package '{0}' is missing entry point file {1}.</source>
|
||||
<target state="translated">V balíčku {0} chybí soubor vstupního bodu {1}.</target>
|
||||
|
@ -795,8 +731,122 @@ setx PATH "%PATH%;{1}"</target>
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolPackageConflictPackageId">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<source>Tool '{0}' (version '{1}') is already installed.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ShellShimConflict">
|
||||
<source>Command '{0}' conflicts with an existing command from another tool.</source>
|
||||
<target state="new">Command '{0}' conflicts with an existing command from another tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotCreateShimForEmptyExecutablePath">
|
||||
<source>Cannot create shell shim for an empty executable path.</source>
|
||||
<target state="new">Cannot create shell shim for an empty executable path.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotCreateShimForEmptyCommand">
|
||||
<source>Cannot create shell shim for an empty command.</source>
|
||||
<target state="new">Cannot create shell shim for an empty command.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToRetrieveToolConfiguration">
|
||||
<source>Failed to retrieve tool configuration: {0}</source>
|
||||
<target state="new">Failed to retrieve tool configuration: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateShellShim">
|
||||
<source>Failed to create tool shim for command '{0}': {1}</source>
|
||||
<target state="new">Failed to create tool shim for command '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToRemoveShellShim">
|
||||
<source>Failed to remove tool shim for command '{0}': {1}</source>
|
||||
<target state="new">Failed to remove tool shim for command '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedSettingShimPermissions">
|
||||
<source>Failed to set user executable permissions for shell shim: {0}</source>
|
||||
<target state="new">Failed to set user executable permissions for shell shim: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToInstallToolPackage">
|
||||
<source>Failed to install tool package '{0}': {1}</source>
|
||||
<target state="new">Failed to install tool package '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallToolPackage">
|
||||
<source>Failed to uninstall tool package '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool package '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathLinuxManualInstructions">
|
||||
<source>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</source>
|
||||
<target state="new">Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathOSXManualInstructions">
|
||||
<source>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</source>
|
||||
<target state="new">Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathWindowsManualInstructions">
|
||||
<source>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
|
||||
You can add the directory to the PATH by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{0}"
|
||||
</source>
|
||||
<target state="new">Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
|
||||
You can add the directory to the PATH by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{0}"
|
||||
</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -680,85 +680,21 @@
|
|||
{0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NuGetConfigurationFileDoesNotExist">
|
||||
<source>NuGet configuration file {0} does not exist.</source>
|
||||
<target state="translated">Die NuGet-Konfigurationsdatei "{0}" ist nicht vorhanden.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathLinuxNeedLogout">
|
||||
<source>Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.</source>
|
||||
<target state="translated">Da Sie gerade das .NET Core SDK installiert haben, müssen Sie sich abmelden oder Ihre Sitzung neu starten, bevor Sie das installierte Tool ausführen.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathLinuxManualInstruction">
|
||||
<source>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
If you are using bash. You can do this by running the following command:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</source>
|
||||
<target state="translated">Der Pfad für die Toolausführung wurde nicht gefunden. Stellen Sie sicher, dass "{0}" zu PATH hinzugefügt wurde.
|
||||
Bei Verwendung von Bash können Sie hierzu den folgenden Befehl ausführen:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathOSXNeedReopen">
|
||||
<source>Since you just installed the .NET Core SDK, you will need to reopen terminal before running the tool you installed.</source>
|
||||
<target state="translated">Da Sie gerade das .NET Core SDK installiert haben, müssen Sie das Terminal neu öffnen, bevor Sie das installierte Tool ausführen.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathOSXManualInstruction">
|
||||
<source>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
If you are using bash, You can do this by running the following command:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</source>
|
||||
<target state="translated">Der Pfad für die Toolausführung wurde nicht gefunden. Stellen Sie sicher, dass "{0}" zu PATH hinzugefügt wurde.
|
||||
Bei Verwendung von Bash können Sie hierzu den folgenden Befehl ausführen:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailInstallToolSameName">
|
||||
<source>Failed to install tool {0}. A command with the same name already exists.</source>
|
||||
<target state="translated">Fehler beim Installieren von Tool "{0}". Es ist bereits ein Befehl mit diesem Namen vorhanden.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailInstallToolPermission">
|
||||
<source>Failed to change permission:
|
||||
Error: {0}
|
||||
Output: {1}</source>
|
||||
<target state="translated">Fehler beim Ändern der Berechtigung:
|
||||
Fehler: {0}
|
||||
Ausgabe: {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathWindowsNeedReopen">
|
||||
<source>Since you just installed the .NET Core SDK, you will need to reopen the Command Prompt window before running the tool you installed.</source>
|
||||
<target state="translated">Da Sie gerade das .NET Core SDK installiert haben, müssen Sie das Eingabeaufforderungsfenster neu öffnen, bevor Sie das installierte Tool ausführen.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathWindowsManualInstruction">
|
||||
<source>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
You can do this by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{1}"</source>
|
||||
<target state="translated">Der Pfad für die Toolausführung wurde nicht gefunden. Stellen Sie sicher, dass "{0}" zu PATH hinzugefügt wurde.
|
||||
Sie können hierzu den folgenden Befehl ausführen:
|
||||
|
||||
setx PATH "%PATH%;{1}"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolPackageMissingEntryPointFile">
|
||||
<source>Package '{0}' is missing entry point file {1}.</source>
|
||||
<target state="translated">Im Paket "{0}" fehlt die Einstiegspunktdatei "{1}".</target>
|
||||
|
@ -795,8 +731,122 @@ setx PATH "%PATH%;{1}"</target>
|
|||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ToolPackageConflictPackageId">
|
||||
<source>Tool '{0}' is already installed.</source>
|
||||
<target state="new">Tool '{0}' is already installed.</target>
|
||||
<source>Tool '{0}' (version '{1}') is already installed.</source>
|
||||
<target state="new">Tool '{0}' (version '{1}') is already installed.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="ShellShimConflict">
|
||||
<source>Command '{0}' conflicts with an existing command from another tool.</source>
|
||||
<target state="new">Command '{0}' conflicts with an existing command from another tool.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotCreateShimForEmptyExecutablePath">
|
||||
<source>Cannot create shell shim for an empty executable path.</source>
|
||||
<target state="new">Cannot create shell shim for an empty executable path.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotCreateShimForEmptyCommand">
|
||||
<source>Cannot create shell shim for an empty command.</source>
|
||||
<target state="new">Cannot create shell shim for an empty command.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToRetrieveToolConfiguration">
|
||||
<source>Failed to retrieve tool configuration: {0}</source>
|
||||
<target state="new">Failed to retrieve tool configuration: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToCreateShellShim">
|
||||
<source>Failed to create tool shim for command '{0}': {1}</source>
|
||||
<target state="new">Failed to create tool shim for command '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToRemoveShellShim">
|
||||
<source>Failed to remove tool shim for command '{0}': {1}</source>
|
||||
<target state="new">Failed to remove tool shim for command '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedSettingShimPermissions">
|
||||
<source>Failed to set user executable permissions for shell shim: {0}</source>
|
||||
<target state="new">Failed to set user executable permissions for shell shim: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToInstallToolPackage">
|
||||
<source>Failed to install tool package '{0}': {1}</source>
|
||||
<target state="new">Failed to install tool package '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="FailedToUninstallToolPackage">
|
||||
<source>Failed to uninstall tool package '{0}': {1}</source>
|
||||
<target state="new">Failed to uninstall tool package '{0}': {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathLinuxManualInstructions">
|
||||
<source>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</source>
|
||||
<target state="new">Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathOSXManualInstructions">
|
||||
<source>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</source>
|
||||
<target state="new">Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="EnvironmentPathWindowsManualInstructions">
|
||||
<source>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
|
||||
You can add the directory to the PATH by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{0}"
|
||||
</source>
|
||||
<target state="new">Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
|
||||
You can add the directory to the PATH by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{0}"
|
||||
</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue