Merge branch 'master' into merges/release/2.1.3xx-to-master

This commit is contained in:
Nick Guerrera 2018-02-21 15:58:55 -08:00 committed by GitHub
commit 47ded461b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
198 changed files with 8582 additions and 3466 deletions

View file

@ -57,6 +57,7 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj
<Import Project="build/BundledTools.props" />
<Import Project="build/BundledSdks.props" />
<Import Project="build/BundledTemplates.props" />
<Import Project="build/BundledDotnetTools.props" />
<Import Project="build/BuildDefaults.props" />
<Import Project="build/BundledRuntimes.props" />

View file

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

View file

@ -9,7 +9,7 @@ Looking for V1 of the .NET Core tooling?
If you are looking for the v2.0 release of the .NET Core tools (CLI, MSBuild and the new csproj), head over to https://dot.net/core and download!
> **Note:** the release/2.1.3xx branch of the CLI repo is based on an upcoming update of the SDK and is considered pre-release. For production-level usage, please use the
> **Note:** the master branch of the CLI repo is based on an upcoming update of the SDK and is considered pre-release. For production-level usage, please use the
> released version of the tools available at https://dot.net/core
Found an issue?
@ -59,7 +59,7 @@ To download the .NET Core runtime **without** the SDK, visit https://github.com/
> want to install the latest released versions, check out the [preceding section](#looking-for-v1-of-the-net-core-tooling).
> In order to be able to restore these pre-release packages, you may need to add a NuGet feed pointing to https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. Other feeds may also be necessary depending on what kind of project you are working with.
| Platform | Latest Daily Build<br>*release/2.1.3xx*<br>[![][version-badge]][version] |
| Platform | Latest Daily Build<br>*master*<br>[![][version-badge]][version] |
| -------- | :-------------------------------------: |
| **Windows x64** | [Installer][win-x64-installer] - [Checksum][win-x64-installer-checksum]<br>[zip][win-x64-zip] - [Checksum][win-x64-zip-checksum] |
| **Windows x86** | [Installer][win-x86-installer] - [Checksum][win-x86-installer-checksum]<br>[zip][win-x86-zip] - [Checksum][win-x86-zip-checksum] |
@ -69,7 +69,7 @@ To download the .NET Core runtime **without** the SDK, visit https://github.com/
| **RHEL 6** | [tar.gz][rhel-6-targz] - [Checksum][rhel-6-targz-checksum] |
| **Alpine 3.6** | [tar.gz][alpine-3.6-targz] - [Checksum][alpine-3.6-targz-checksum] |
| Latest Coherent Build<sup>2</sup><br>*release/2.1.3xx* |
| Latest Coherent Build<sup>2</sup><br>*master* |
|:------:|
| [![][coherent-version-badge]][coherent-version] |
@ -77,42 +77,41 @@ Reference notes:
> **1**: *Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing these directly from the .deb files (via dpkg or similar), then you'll need to install the [corresponding Host, Host FX Resolver, and Shared Framework packages](https://github.com/dotnet/core-setup#daily-builds) before installing the Sdk package.*
> <br><br>**2**: *A 'coherent' build is defined as a build where the Runtime version matches between the CLI and Asp.NET.*
[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/latest.version
[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/latest.coherent.version
[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/latest.version
[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/latest.coherent.version
[comment]: # (The latest versions are always the same across all platforms. Just need one to show, so picking win-x64's svg.)
[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/win_x64_Release_version_badge.svg
[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/win_x64_Release_coherent_badge.svg
[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/win_x64_Release_version_badge.svg
[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/win_x64_Release_coherent_badge.svg
[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.exe
[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.exe.sha
[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip
[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip.sha
[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.exe
[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.exe.sha
[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.zip
[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.zip.sha
[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.exe
[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.exe.sha
[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.zip
[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.zip.sha
[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.exe
[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.exe.sha
[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.zip
[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.zip.sha
[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.pkg
[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.pkg.sha
[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz
[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz.sha
[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.pkg
[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.pkg.sha
[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.tar.gz
[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.tar.gz.sha
[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-x64.tar.gz
[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-x64.tar.gz.sha
[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-x64.tar.gz
[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-x64.tar.gz.sha
[linux-DEB-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.deb
[linux-DEB-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.deb.sha
[linux-DEB-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.deb
[linux-DEB-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.deb.sha
[rhel-7-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel-x64.rpm
[rhel-7-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel-x64.rpm.sha
[rhel-7-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel-x64.rpm
[rhel-7-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel-x64.rpm.sha
[rhel-6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel.6-x64.tar.gz
[rhel-6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha
[rhel-6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel.6-x64.tar.gz
[rhel-6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha
[alpine-3.6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz
[alpine-3.6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz.sha
[alpine-3.6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-alpine.3.6-x64.tar.gz
[alpine-3.6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-alpine.3.6-x64.tar.gz.sha
# Debian daily feed

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.Docker.Sdk">
<PropertyGroup Label="Globals">
<ProjectVersion>2.0</ProjectVersion>
<DockerTargetOS>Linux</DockerTargetOS>
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
<DockerServiceUrl>http://localhost:{ServicePort}</DockerServiceUrl>
<DockerServiceName>testwebapplication</DockerServiceName>
</PropertyGroup>
<ItemGroup>
<None Include="docker-compose.yml" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,8 @@
version: '3.0'
services:
testwebapplication:
image: testwebapplication
build:
context: .
dockerfile: testwebapplication/Dockerfile

View file

@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Channel>release/2.1</Channel>
<BranchName>release/2.1.3xx</BranchName>
<Channel>master</Channel>
<BranchName>master</BranchName>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,27 @@
<Project ToolsVersion="15.0" DefaultTargets="ExtractDotnetToolsToOutput">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
<Target Name="ExtractDotnetToolsToOutput"
DependsOnTargets="EnsureDotnetToolsRestored">
<Message Text="Restore DotnetTools $(TemplateFillInPackageName) from $(DotnetToolsNuPkgPath) to $(DotnetToolsLayoutDirectory)."
Importance="High" />
</Target>
<Target Name="EnsureDotnetToolsRestored"
Condition="!Exists('$(DotnetToolsNuPkgPath)/$(TemplateFillInPackageName.ToLower())')">
<PropertyGroup>
<DotnetToolsRestoreAdditionalParameters>/p:TargetFramework=$(CliTargetFramework)</DotnetToolsRestoreAdditionalParameters>
<DotnetToolsRestoreAdditionalParameters>$(DotnetToolsRestoreAdditionalParameters) /p:TemplateFillInPackageName=$(TemplateFillInPackageName)</DotnetToolsRestoreAdditionalParameters>
<DotnetToolsRestoreAdditionalParameters>$(DotnetToolsRestoreAdditionalParameters) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion)</DotnetToolsRestoreAdditionalParameters>
<DotnetToolsRestoreAdditionalParameters>$(DotnetToolsRestoreAdditionalParameters) /p:RestorePackagesPath=$(DotnetToolsLayoutDirectory)</DotnetToolsRestoreAdditionalParameters>
<DotnetToolsRestoreAdditionalParameters Condition=" $(DotnetToolsRestoreProjectStyle) != '' " >$(DotnetToolsRestoreAdditionalParameters) /p:RestoreProjectStyle=$(DotnetToolsRestoreProjectStyle)</DotnetToolsRestoreAdditionalParameters>
</PropertyGroup>
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
AdditionalParameters="$(DotnetToolsRestoreAdditionalParameters)" />
</Target>
</Project>

View file

@ -0,0 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<BundledDotnetTools Include="dotnet-watch" Version="$(AspNetCoreVersion)" />
<BundledDotnetTools Include="dotnet-dev-certs" Version="$(AspNetCoreVersion)" />
</ItemGroup>
</Project>

View file

@ -2,9 +2,11 @@
<ItemGroup>
<BundledSdk Include="NuGet.Build.Tasks.Pack" Version="$(NuGetBuildTasksPackPackageVersion)" />
<BundledSdk Include="Microsoft.NET.Sdk" Version="$(MicrosoftNETSdkPackageVersion)" />
<BundledSdk Include="Microsoft.NET.Sdk.Razor" Version="$(MicrosoftNETSdkRazorPackageVersion)" />
<BundledSdk Include="Microsoft.NET.Sdk.Web" Version="$(MicrosoftNETSdkWebPackageVersion)" />
<BundledSdk Include="Microsoft.NET.Sdk.Publish" Version="$(MicrosoftNETSdkPublishPackageVersion)" />
<BundledSdk Include="Microsoft.NET.Sdk.Web.ProjectSystem" Version="$(MicrosoftNETSdkWebProjectSystemPackageVersion)" />
<BundledSdk Include="FSharp.NET.Sdk" Version="1.0.4-bundled-0100" />
<BundledSdk Include="Microsoft.Docker.Sdk" Version="1.1.0" />
</ItemGroup>
</Project>

View file

@ -11,26 +11,26 @@
<Copy SourceFiles="@(TemplateContent)"
DestinationFiles="@(TemplateContent->'$(TemplateLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
<Message Text="Copied template $(TemplatePackageName) from $(TemplateNuPkgPath) to $(TemplateLayoutDirectory)."
<Message Text="Copied template $(TemplateFillInPackageName) from $(TemplateNuPkgPath) to $(TemplateLayoutDirectory)."
Importance="High" />
</Target>
<Target Name="GetTemplateItemsToCopy">
<ItemGroup>
<TemplateContent Include="$(TemplateNuPkgPath)/$(TemplatePackageName.ToLower()).$(TemplatePackageVersion.ToLower()).nupkg" />
<TemplateContent Include="$(TemplateNuPkgPath)/$(TemplateFillInPackageName.ToLower()).$(TemplateFillInPackageVersion.ToLower()).nupkg" />
</ItemGroup>
</Target>
<Target Name="EnsureTemplateRestored"
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplatePackageName.ToLower()).nuspec')">
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplateFillInPackageName.ToLower()).nuspec')">
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
AdditionalParameters="/p:TemplatePackageName=$(TemplatePackageName) /p:TemplatePackageVersion=$(TemplatePackageVersion)" />
AdditionalParameters="/p:TargetFramework=netcoreapp1.0 /p:TemplateFillInPackageName=$(TemplateFillInPackageName) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion)" />
</Target>
<Target Name="PrepareBundledTemplateProps">
<PropertyGroup>
<TemplateNuPkgPath>$(NuGetPackagesDir)/$(TemplatePackageName.ToLower())/$(TemplatePackageVersion.ToLower())</TemplateNuPkgPath>
<TemplateNuPkgPath>$(NuGetPackagesDir)/$(TemplateFillInPackageName.ToLower())/$(TemplateFillInPackageVersion.ToLower())</TemplateNuPkgPath>
</PropertyGroup>
</Target>
</Project>

30
build/CLI_Baseline.csv Normal file
View file

@ -0,0 +1,30 @@
sdk\*\microsoft.testplatform.vstestconsole.translationlayer.xml,unsigned,oss
sdk\*\sdks\nuget.build.tasks.pack\*\nuget.build.tasks.pack.xml,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.min.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\bootstrap.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\bootstrap.min.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\glyphicons-halflings-regular.ttf,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.min.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.min.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.unobtrusive.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.unobtrusive.min.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\npm.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\site.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\site.min.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\app.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\app.test.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\configurestore.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\counter.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\fetchdata.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\home.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\index.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\karma.conf.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\layout.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\navmenu.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\protractor.conf.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\registerserviceworker.js,unsigned,oss
sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\weatherforecasts.js,unsigned,oss
1 sdk\*\microsoft.testplatform.vstestconsole.translationlayer.xml unsigned oss
2 sdk\*\sdks\nuget.build.tasks.pack\*\nuget.build.tasks.pack.xml unsigned oss
3 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.js unsigned oss
4 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.js unsigned oss
5 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.min.js unsigned oss
6 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\bootstrap.js unsigned oss
7 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\bootstrap.min.js unsigned oss
8 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\glyphicons-halflings-regular.ttf unsigned oss
9 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.js unsigned oss
10 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.min.js unsigned oss
11 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.js unsigned oss
12 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.min.js unsigned oss
13 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.unobtrusive.js unsigned oss
14 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.unobtrusive.min.js unsigned oss
15 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\npm.js unsigned oss
16 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\site.js unsigned oss
17 sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\site.min.js unsigned oss
18 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\app.js unsigned oss
19 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\app.test.js unsigned oss
20 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\configurestore.js unsigned oss
21 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\counter.js unsigned oss
22 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\fetchdata.js unsigned oss
23 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\home.js unsigned oss
24 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\index.js unsigned oss
25 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\karma.conf.js unsigned oss
26 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\layout.js unsigned oss
27 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\navmenu.js unsigned oss
28 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\protractor.conf.js unsigned oss
29 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\registerserviceworker.js unsigned oss
30 sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\weatherforecasts.js unsigned oss

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MicrosoftAspNetCoreAppPackageVersion>2.1.0-preview1-28275</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview1-26116-04</MicrosoftNETCoreAppPackageVersion>
<MicrosoftAspNetCoreAppPackageVersion>2.1.0-preview2-30106</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview2-26131-06</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
<MicrosoftBuildPackageVersion>15.6.82</MicrosoftBuildPackageVersion>
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
@ -10,14 +10,14 @@
<MicrosoftBuildLocalizationPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildLocalizationPackageVersion>
<MicrosoftBuildUtilitiesCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildUtilitiesCorePackageVersion>
<MicrosoftFSharpCompilerPackageVersion>10.1.4-rtm-180213-0</MicrosoftFSharpCompilerPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>2.7.0-beta3-62615-05</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>2.8.0-beta1-62608-01</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
<MicrosoftNETSdkPackageVersion>2.1.300-preview1-62608-07</MicrosoftNETSdkPackageVersion>
<MicrosoftNETSdkPackageVersion>2.1.300-preview2-62607-04</MicrosoftNETSdkPackageVersion>
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
<MicrosoftNETSdkWebPackageVersion>2.1.0-release21-20180126-1326543</MicrosoftNETSdkWebPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>2.1.0-preview2-30119</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftNETSdkWebPackageVersion>2.1.0-rel-20180215-1390388</MicrosoftNETSdkWebPackageVersion>
<MicrosoftNETSdkPublishPackageVersion>$(MicrosoftNETSdkWebPackageVersion)</MicrosoftNETSdkPublishPackageVersion>
<MicrosoftNETSdkWebProjectSystemPackageVersion>$(MicrosoftNETSdkWebPackageVersion)</MicrosoftNETSdkWebProjectSystemPackageVersion>
<MicrosoftDotNetCommonItemTemplatesPackageVersion>1.0.1-beta3-20180104-1263555</MicrosoftDotNetCommonItemTemplatesPackageVersion>
@ -28,12 +28,12 @@
<MicrosoftTemplateEngineCliLocalizationPackageVersion>$(MicrosoftTemplateEngineCliPackageVersion)</MicrosoftTemplateEngineCliLocalizationPackageVersion>
<MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>$(MicrosoftTemplateEngineCliPackageVersion)</MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>
<MicrosoftTemplateEngineUtilsPackageVersion>$(MicrosoftTemplateEngineCliPackageVersion)</MicrosoftTemplateEngineUtilsPackageVersion>
<MicrosoftDotNetPlatformAbstractionsPackageVersion>2.1.0-preview1-26116-04</MicrosoftDotNetPlatformAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>2.1.0-preview1-26116-04</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftDotNetPlatformAbstractionsPackageVersion>2.1.0-preview2-26131-06</MicrosoftDotNetPlatformAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>2.1.0-preview2-26131-06</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftDotNetCliCommandLinePackageVersion>0.1.1-alpha-174</MicrosoftDotNetCliCommandLinePackageVersion>
<MicrosoftDotNetProjectJsonMigrationPackageVersion>1.2.1-alpha-002133</MicrosoftDotNetProjectJsonMigrationPackageVersion>
<MicrosoftDotNetToolsMigrateCommandPackageVersion>$(MicrosoftDotNetProjectJsonMigrationPackageVersion)</MicrosoftDotNetToolsMigrateCommandPackageVersion>
<MicrosoftDotNetArchivePackageVersion>0.2.0-beta-000059</MicrosoftDotNetArchivePackageVersion>
<MicrosoftDotNetArchivePackageVersion>0.2.0-beta-62606-02</MicrosoftDotNetArchivePackageVersion>
<MicrosoftDiaSymReaderNativePackageVersion>1.6.0-beta2-25304</MicrosoftDiaSymReaderNativePackageVersion>
<NuGetBuildTasksPackageVersion>4.7.0-preview1-4927</NuGetBuildTasksPackageVersion>
<NuGetBuildTasksPackPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetBuildTasksPackPackageVersion>

View file

@ -97,23 +97,25 @@
of our build against Microsoft.NETCore.App to find the correct NETStandard.Library version
-->
<ItemGroup>
<_NETStandardLibraryVersions Include="@(PackageDefinitions->'%(Version)')"
<_NETStandardLibraryPackageVersions Include="@(PackageDefinitions->'%(Version)')"
Condition="%(PackageDefinitions.Name) == 'NetStandard.Library'" />
<_NETCorePlatformsImplicitPackageVersion Include="@(PackageDefinitions->'%(Version)')"
<_NETCorePlatformsPackageVersions Include="@(PackageDefinitions->'%(Version)')"
Condition="%(PackageDefinitions.Name) == 'Microsoft.NETCore.Platforms'" />
</ItemGroup>
<Error Condition="@(_NETStandardLibraryVersions->Distinct()->Count()) != 1"
<Error Condition="@(_NETStandardLibraryPackageVersions->Distinct()->Count()) != 1"
Text="Failed to determine the NETStandard.Library version pulled in Microsoft.NETCore.App" />
<Error Condition="@(_NETCorePlatformsPackageVersions->Distinct()->Count()) != 1"
Text="Failed to determine the Microsoft.NETCore.Platforms version pulled in Microsoft.NETCore.App" />
<PropertyGroup>
<_NETCoreAppPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</_NETCoreAppPackageVersion>
<_NETStandardPackageVersion>@(_NETStandardLibraryVersions->Distinct())</_NETStandardPackageVersion>
<_NETCorePlatformsImplicitPackageVersion>@(_NETCorePlatformsImplicitPackageVersion->Distinct())</_NETCorePlatformsImplicitPackageVersion>
<_NETStandardLibraryPackageVersion>@(_NETStandardLibraryPackageVersions->Distinct())</_NETStandardLibraryPackageVersion>
<_NETCorePlatformsPackageVersion>@(_NETCorePlatformsPackageVersions->Distinct())</_NETCorePlatformsPackageVersion>
<!-- Use only major and minor in target framework version -->
<_NETCoreAppTargetFrameworkVersion>$(_NETCoreAppPackageVersion.Split('.')[0]).$(_NETCoreAppPackageVersion.Split('.')[1])</_NETCoreAppTargetFrameworkVersion>
<_NETStandardTargetFrameworkVersion>$(_NETStandardPackageVersion.Split('.')[0]).$(_NETStandardPackageVersion.Split('.')[1])</_NETStandardTargetFrameworkVersion>
<_NETStandardTargetFrameworkVersion>$(_NETStandardLibraryPackageVersion.Split('.')[0]).$(_NETStandardLibraryPackageVersion.Split('.')[1])</_NETStandardTargetFrameworkVersion>
<BundledVersionsPropsContent>
<![CDATA[
@ -133,8 +135,8 @@ Copyright (c) .NET Foundation. All rights reserved.
<BundledNETCoreAppTargetFrameworkVersion>$(_NETCoreAppTargetFrameworkVersion)</BundledNETCoreAppTargetFrameworkVersion>
<BundledNETCoreAppPackageVersion>$(_NETCoreAppPackageVersion)</BundledNETCoreAppPackageVersion>
<BundledNETStandardTargetFrameworkVersion>$(_NETStandardTargetFrameworkVersion)</BundledNETStandardTargetFrameworkVersion>
<BundledNETStandardPackageVersion>$(_NETStandardPackageVersion)</BundledNETStandardPackageVersion>
<NETCorePlatformsImplicitPackageVersion>$(_NETCorePlatformsImplicitPackageVersion)</NETCorePlatformsImplicitPackageVersion>
<BundledNETStandardPackageVersion>$(_NETStandardLibraryPackageVersion)</BundledNETStandardPackageVersion>
<BundledNETCorePlatformsPackageVersion>$(_NETCorePlatformsPackageVersion)</BundledNETCorePlatformsPackageVersion>
</PropertyGroup>
</Project>
]]>

View file

@ -20,7 +20,7 @@
<![CDATA[
<add key="BlobFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
<add key="aspnetcore-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
<add key="websdkfeed" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
<add key="roslyn" value="https://dotnet.myget.org/f/roslyn/api/v3/index.json" />
@ -30,6 +30,7 @@
<add key="vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
<add key="nuget-build" value="https://dotnet.myget.org/F/nuget-build/api/v3/index.json" />
<add key="dotnet-corefxlab" value="https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
<add key="container-tools" value="https://www.myget.org/F/container-tools-for-visual-studio/api/v3/index.json" />
]]>
</NugetConfigCLIFeeds>

View file

@ -3,7 +3,7 @@
<VersionMajor>2</VersionMajor>
<VersionMinor>1</VersionMinor>
<VersionPatch>300</VersionPatch>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview1</ReleaseSuffix>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview2</ReleaseSuffix>
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
<SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>

View file

@ -10,6 +10,7 @@
<ItemGroup>
<PackageReference Include="$(DependencyPackageName)" Version="$(DependencyPackageVersion)" />
<PackageReference Condition="'$(DependencyPackageName)' == 'Microsoft.NET.Sdk.Web'" Include="Microsoft.NET.Sdk" Version="$(MicrosoftNETSdkPackageVersion)" />
<PackageReference Condition="'$(DependencyPackageName)' == 'Microsoft.NET.Sdk.Web'" Include="Microsoft.NET.Sdk.Razor" Version="$(MicrosoftNETSdkRazorPackageVersion)" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -3,12 +3,11 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="$(TemplatePackageName)" Version="$(TemplatePackageVersion)" />
<PackageReference Include="$(TemplateFillInPackageName)" Version="$(TemplateFillInPackageVersion)" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -15,6 +15,7 @@
<PreTestProjectsToExclude Condition=" 'Non-test projects in test directory' != 'consider moving elsewhere' "
Include="test/ArgumentsReflector/ArgumentsReflector.csproj;
test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj;
test/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj;
test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj;
test/Performance/Performance.csproj;
test/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj" />

View file

@ -14,6 +14,9 @@ namespace Microsoft.DotNet.Cli.Utils
// command loaded from project tools nuget package
ProjectToolsPackage,
// command loaded from bundled DotnetTools nuget package
DotnetToolsPackage,
// command loaded from the same directory as the executing assembly
BaseDirectory,

View file

@ -44,6 +44,7 @@ namespace Microsoft.DotNet.Cli.Utils
var compositeCommandResolver = new CompositeCommandResolver();
compositeCommandResolver.AddCommandResolver(new MuxerCommandResolver());
compositeCommandResolver.AddCommandResolver(new DotnetToolsCommandResolver());
compositeCommandResolver.AddCommandResolver(new RootedCommandResolver());
compositeCommandResolver.AddCommandResolver(
new ProjectToolsCommandResolver(packagedCommandSpecFactory, environment));

View file

@ -0,0 +1,89 @@
// 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.Reflection;
using System.Collections.Generic;
using Microsoft.DotNet.PlatformAbstractions;
namespace Microsoft.DotNet.Cli.Utils
{
public class DotnetToolsCommandResolver : ICommandResolver
{
private string _dotnetToolPath;
public DotnetToolsCommandResolver(string dotnetToolPath = null)
{
if (dotnetToolPath == null)
{
_dotnetToolPath = Path.Combine(ApplicationEnvironment.ApplicationBasePath,
"DotnetTools");
}
else
{
_dotnetToolPath = dotnetToolPath;
}
}
public CommandSpec Resolve(CommandResolverArguments arguments)
{
if (string.IsNullOrEmpty(arguments.CommandName))
{
return null;
}
var packageId = new DirectoryInfo(Path.Combine(_dotnetToolPath, arguments.CommandName));
if (!packageId.Exists)
{
return null;
}
var version = packageId.GetDirectories()[0];
var dll = version.GetDirectories("tools")[0]
.GetDirectories()[0] // TFM
.GetDirectories()[0] // RID
.GetFiles($"{arguments.CommandName}.dll")[0];
return CreatePackageCommandSpecUsingMuxer(
dll.FullName,
arguments.CommandArguments,
CommandResolutionStrategy.DotnetToolsPackage);
}
private CommandSpec CreatePackageCommandSpecUsingMuxer(
string commandPath,
IEnumerable<string> commandArguments,
CommandResolutionStrategy commandResolutionStrategy)
{
var arguments = new List<string>();
var muxer = new Muxer();
var host = muxer.MuxerPath;
if (host == null)
{
throw new Exception(LocalizableStrings.UnableToLocateDotnetMultiplexer);
}
arguments.Add(commandPath);
if (commandArguments != null)
{
arguments.AddRange(commandArguments);
}
return CreateCommandSpec(host, arguments, commandResolutionStrategy);
}
private CommandSpec CreateCommandSpec(
string commandPath,
IEnumerable<string> commandArguments,
CommandResolutionStrategy commandResolutionStrategy)
{
var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(commandArguments);
return new CommandSpec(commandPath, escapedArgs, commandResolutionStrategy);
}
}
}

View file

@ -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>";
}
}

View file

@ -24,6 +24,8 @@ namespace Microsoft.DotNet.Cli.Utils
return OSX;
case Platform.Linux:
return Linux;
case Platform.FreeBSD:
return FreeBSD;
default:
throw new InvalidOperationException("Unknown Platform");
}
@ -62,6 +64,8 @@ namespace Microsoft.DotNet.Cli.Utils
StaticLib = ".a"
};
public static PlatformFileNameSuffixes FreeBSD { get; } = Linux;
public struct PlatformFileNameSuffixes
{
public string DynamicLib { get; internal set; }

View file

@ -216,7 +216,7 @@
</trans-unit>
<trans-unit id="IgnoringPreferCLIRuntimeFile">
<source>{0}: Ignoring prefercliruntime file as the tool target framework ({1}) has a different major version than the current CLI runtime ({2})</source>
<target state="translated">{0}: Die Datei "prefercliruntime" wird ignoriert, da das Tool-Ziellaufwerk ({1}) eine andere Hauptversion aufweist als die aktuelle CLI-Laufzeit ({2}).</target>
<target state="translated">{0}: Die Datei "prefercliruntime" wird ignoriert, da das Tool-Ziellaufwerk ({1}) eine andere Hauptversion aufweist als die aktuelle CLI-Runtime ({2}).</target>
<note />
</trans-unit>
<trans-unit id="CouldNotFindToolRuntimeConfigFile">

View file

@ -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)
@ -47,5 +52,15 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
{
Directory.CreateDirectory(path);
}
public void Delete(string path, bool recursive)
{
Directory.Delete(path, recursive);
}
public void Move(string source, string destination)
{
Directory.Move(source, destination);
}
}
}

View file

@ -45,5 +45,15 @@ 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);
}
}
}

View file

@ -11,10 +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);
}
}

View file

@ -24,5 +24,9 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
void CreateEmptyFile(string path);
void WriteAllText(string path, string content);
void Move(string source, string destination);
void Delete(string path);
}
}

View file

@ -8,6 +8,7 @@ using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyModel, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Tests.Utilities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Tests.ComponentMocks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyModel.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Configurer, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Configurer.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
@ -15,3 +16,5 @@ using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("dotnet-test.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100039ac461fa5c82c7dd2557400c4fd4e9dcdf7ac47e3d572548c04cd4673e004916610f4ea5cbf86f2b1ca1cb824f2a7b3976afecfcf4eb72d9a899aa6786effa10c30399e6580ed848231fec48374e41b3acf8811931343fc2f73acf72dae745adbcb7063cc4b50550618383202875223fc75401351cd89c44bf9b50e7fa3796")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.ShellShim.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.ToolPackage.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View file

@ -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

View file

@ -520,69 +520,95 @@
<data name="NoRestoreDescription" xml:space="preserve">
<value>Does not do an implicit restore when executing the command.</value>
</data>
<data name="CannotBeNullOrWhitespace" xml:space="preserve">
<value>Cannot be null or whitespace.</value>
</data>
<data name="ContainInvalidCharacters" xml:space="preserve">
<value>Contains one or more invalid characters: {0}</value>
</data>
<data name="NuGetConfigurationFileDoesNotExist" xml:space="preserve">
<value>NuGet configuration file {0} does not exist.</value>
</data>
<data name="ToolSettingInvalidRunner" xml:space="preserve">
<value>The tool's settings file has non "dotnet" as runner.</value>
</data>
<data name="ToolSettingMoreThanOneCommand" xml:space="preserve">
<value>The tool's settings file has more than one command defined.</value>
</data>
<data name="ToolSettingsContainError" xml:space="preserve">
<value>The tool's settings file contains error.
{0}</value>
</data>
<data name="ToolSettingsInvalidXml" xml:space="preserve">
<value>The tool's settings file is invalid xml.
{0}</value>
<value>Invalid XML: {0}</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="ToolSettingsMissingCommandName" xml:space="preserve">
<value>Tool defines a command with a missing name setting.</value>
</data>
<data name="ToolSettingsMissingEntryPoint" xml:space="preserve">
<value>Command '{0}' is missing an entry point setting.</value>
</data>
<data name="ToolSettingsInvalidCommandName" xml:space="preserve">
<value>Command '{0}' contains one or more of the following invalid characters: {1}.</value>
</data>
<data name="ToolSettingsMoreThanOneCommand" xml:space="preserve">
<value>More than one command is defined for the tool.</value>
</data>
<data name="ToolSettingsUnsupportedRunner" xml:space="preserve">
<value>Command '{0}' uses unsupported runner '{1}'."</value>
</data>
<data 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 &lt;&lt; EOF &gt;&gt; ~/.bash_profile
cat &lt;&lt; \EOF &gt;&gt; ~/.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 &lt;&lt; EOF &gt;&gt; ~/.bash_profile
cat &lt;&lt; \EOF &gt;&gt; ~/.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>
@ -590,4 +616,7 @@ Output: {1}</value>
<data name="ToolPackageMissingSettingsFile" xml:space="preserve">
<value>Package '{0}' is missing tool settings file DotnetToolSettings.xml.</value>
</data>
</root>
<data name="ToolPackageConflictPackageId" xml:space="preserve">
<value>Tool '{0}' (version '{1}') is already installed.</value>
</data>
</root>

View file

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

View file

@ -17,5 +17,7 @@ using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("dotnet-sln-remove.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet-msbuild.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet-run.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Tests.Utilities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Tests.ComponentMocks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.ToolPackage.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.ShellShim.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View file

@ -9,7 +9,7 @@ using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.ShellShim
{
public class DoNothingEnvironmentPath : IEnvironmentPath
internal class DoNothingEnvironmentPath : IEnvironmentPath
{
public void AddPackageExecutablePathToUserPath()
{

View file

@ -1,12 +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.ToolPackage
namespace Microsoft.DotNet.ShellShim
{
internal interface IPackageToProjectFileAdder
internal interface IShellShimRepository
{
void Add(FilePath projectPath, string packageId);
void CreateShim(FilePath targetExecutablePath, string commandName);
void RemoveShim(string commandName);
}
}

View file

@ -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));
}
}
}

View file

@ -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));
}
}
}

View 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)
{
}
}
}

View file

@ -1,120 +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.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Xml.Linq;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Tools;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ShellShim
{
public class ShellShimMaker
{
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(string packageExecutablePath, string shellCommandName)
{
FilePath shimPath = GetShimPath(shellCommandName);
if (!Directory.Exists(shimPath.GetDirectoryPath().Value))
{
Directory.CreateDirectory(shimPath.GetDirectoryPath().Value);
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
CreateConfigFile(shimPath.Value + ".config", entryPoint: packageExecutablePath, runner: "dotnet");
using (var shim = File.Create(shimPath.Value))
using (var exe = typeof(ShellShimMaker).Assembly.GetManifestResourceStream(LauncherExeResourceName))
{
exe.CopyTo(shim);
}
}
else
{
var packageExecutable = new FilePath(packageExecutablePath);
var script = new StringBuilder();
script.AppendLine("#!/bin/sh");
script.AppendLine($"dotnet {packageExecutable.ToQuotedString()} \"$@\"");
File.WriteAllText(shimPath.Value, script.ToString());
SetUserExecutionPermissionToShimFile(shimPath);
}
}
public void EnsureCommandNameUniqueness(string shellCommandName)
{
if (File.Exists(Path.Combine(_pathToPlaceShim, shellCommandName)))
{
throw new GracefulException(
string.Format(CommonLocalizableStrings.FailInstallToolSameName,
shellCommandName));
}
}
internal void CreateConfigFile(string outputPath, string 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)));
appSettings.Add(new XElement("add", new XAttribute("key", "runner"), new XAttribute("value", runner ?? string.Empty)));
config.Save(outputPath);
}
public void Remove(string shellCommandName)
{
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 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));
}
}
}
}

View 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));
}
}
}
}

View file

@ -70,8 +70,8 @@ namespace Microsoft.DotNet.ShellShim
{
_reporter.WriteLine(
string.Format(
CommonLocalizableStrings.EnvironmentPathWindowsManualInstruction,
_packageExecutablePath, _packageExecutablePath));
CommonLocalizableStrings.EnvironmentPathWindowsManualInstructions,
_packageExecutablePath));
}
}
}

View 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; }
}
}

View file

@ -1,6 +1,7 @@
// 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.Collections.Generic;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ToolPackage
@ -8,9 +9,10 @@ namespace Microsoft.DotNet.ToolPackage
internal interface IProjectRestorer
{
void Restore(
FilePath projectPath,
DirectoryPath assetJsonOutput,
FilePath? nugetconfig,
string source);
FilePath project,
DirectoryPath assetJsonOutput,
FilePath? nugetConfig = null,
string source = null,
string verbosity = null);
}
}

View 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();
}
}

View file

@ -0,0 +1,20 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ToolPackage
{
internal interface IToolPackageInstaller
{
IToolPackage InstallPackage(
string packageId,
string packageVersion = null,
string targetFramework = null,
FilePath? nugetConfig = null,
string source = null,
string verbosity = null);
}
}

View 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);
}
}

View file

@ -1,28 +0,0 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.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;
}
}

View file

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

View file

@ -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; }
}
}

View file

@ -18,46 +18,48 @@ namespace Microsoft.DotNet.ToolPackage
DotNetCliTool dotNetCliTool;
using (var fs = new FileStream(pathToXml, FileMode.Open))
try
{
var reader = XmlReader.Create(fs);
try
using (var fs = new FileStream(pathToXml, FileMode.Open))
{
var reader = XmlReader.Create(fs);
dotNetCliTool = (DotNetCliTool)serializer.Deserialize(reader);
}
catch (InvalidOperationException e) when (e.InnerException is XmlException)
{
throw new ToolConfigurationException(
string.Format(CommonLocalizableStrings.ToolSettingsInvalidXml, e.InnerException.Message));
}
}
catch (InvalidOperationException ex) when (ex.InnerException is XmlException)
{
throw new ToolConfigurationException(
string.Format(
CommonLocalizableStrings.ToolSettingsInvalidXml,
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)
{
throw new ToolConfigurationException(
CommonLocalizableStrings.ToolSettingMoreThanOneCommand);
throw new ToolConfigurationException(CommonLocalizableStrings.ToolSettingsMoreThanOneCommand);
}
if (dotNetCliTool.Commands[0].Runner != "dotnet")
{
throw new ToolConfigurationException(
CommonLocalizableStrings.ToolSettingInvalidRunner);
string.Format(
CommonLocalizableStrings.ToolSettingsUnsupportedRunner,
dotNetCliTool.Commands[0].Name,
dotNetCliTool.Commands[0].Runner));
}
var commandName = dotNetCliTool.Commands[0].Name;
var toolAssemblyEntryPoint = dotNetCliTool.Commands[0].EntryPoint;
try
{
return new ToolConfiguration(commandName, toolAssemblyEntryPoint);
}
catch (ArgumentException e)
{
throw new ToolConfigurationException(
string.Format(CommonLocalizableStrings.ToolSettingsContainError,
e.Message));
}
return new ToolConfiguration(
dotNetCliTool.Commands[0].Name,
dotNetCliTool.Commands[0].EntryPoint);
}
}
}

View file

@ -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)
{
}
}
}

View file

@ -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)
{
}
}

View 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;
}
}
}

View 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));
}
}
}

View file

@ -1,242 +0,0 @@
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using Microsoft.DotNet.Tools;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Configurer;
using Microsoft.Extensions.EnvironmentAbstractions;
using NuGet.ProjectModel;
namespace Microsoft.DotNet.ToolPackage
{
internal class ToolPackageObtainer
{
private readonly Lazy<string> _bundledTargetFrameworkMoniker;
private readonly Func<FilePath> _getTempProjectPath;
private readonly IPackageToProjectFileAdder _packageToProjectFileAdder;
private readonly IProjectRestorer _projectRestorer;
private readonly DirectoryPath _toolsPath;
private readonly DirectoryPath _offlineFeedPath;
public ToolPackageObtainer(
DirectoryPath toolsPath,
DirectoryPath offlineFeedPath,
Func<FilePath> getTempProjectPath,
Lazy<string> bundledTargetFrameworkMoniker,
IPackageToProjectFileAdder packageToProjectFileAdder,
IProjectRestorer projectRestorer
)
{
_getTempProjectPath = getTempProjectPath;
_bundledTargetFrameworkMoniker = bundledTargetFrameworkMoniker;
_projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
_packageToProjectFileAdder = packageToProjectFileAdder ??
throw new ArgumentNullException(nameof(packageToProjectFileAdder));
_toolsPath = toolsPath;
_offlineFeedPath = offlineFeedPath;
}
public ToolConfigurationAndExecutablePath ObtainAndReturnExecutablePath(
string packageId,
string packageVersion = null,
FilePath? nugetconfig = null,
string targetframework = null,
string source = 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 toolDirectory =
CreateIndividualToolVersionDirectory(packageId, packageVersionOrPlaceHolder);
FilePath tempProjectPath = CreateTempProject(
packageId,
packageVersionOrPlaceHolder,
targetframework,
toolDirectory);
if (packageVersionOrPlaceHolder.IsPlaceholder)
{
InvokeAddPackageRestore(
nugetconfig,
tempProjectPath,
packageId);
}
_projectRestorer.Restore(tempProjectPath, toolDirectory, nugetconfig, source);
if (packageVersionOrPlaceHolder.IsPlaceholder)
{
var concreteVersion =
new DirectoryInfo(
Directory.GetDirectories(
toolDirectory.WithSubDirectories(packageId).Value).Single()).Name;
DirectoryPath versioned =
toolDirectory.GetParentPath().WithSubDirectories(concreteVersion);
MoveToVersionedDirectory(versioned, toolDirectory);
toolDirectory = versioned;
packageVersion = concreteVersion;
}
LockFile lockFile = new LockFileFormat()
.ReadWithLock(toolDirectory.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 =
toolDirectory
.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,
toolDirectory.WithSubDirectories(
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
),
packageVersion.IsConcreteValue
? new XElement("ItemGroup",
new XElement("PackageReference",
new XAttribute("Include", packageId),
new XAttribute("Version", packageVersion.Value)
))
: null));
File.WriteAllText(tempProjectPath.Value,
tempProjectContent.ToString());
return tempProjectPath;
}
private void InvokeAddPackageRestore(
FilePath? nugetconfig,
FilePath tempProjectPath,
string packageId)
{
if (nugetconfig != null)
{
File.Copy(
nugetconfig.Value.Value,
tempProjectPath
.GetDirectoryPath()
.WithFile("nuget.config")
.Value);
}
_packageToProjectFileAdder.Add(tempProjectPath, packageId);
}
private DirectoryPath CreateIndividualToolVersionDirectory(
string packageId,
PackageVersion packageVersion)
{
DirectoryPath individualTool = _toolsPath.WithSubDirectories(packageId);
DirectoryPath individualToolVersion = individualTool.WithSubDirectories(packageVersion.Value);
EnsureDirectoryExists(individualToolVersion);
return individualToolVersion;
}
private static void EnsureDirectoryExists(DirectoryPath path)
{
if (!Directory.Exists(path.Value))
{
Directory.CreateDirectory(path.Value);
}
}
}
}

View 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));
}
}
}
}

View 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);
}
}
}

View file

@ -29,6 +29,7 @@ path-to-application:
vstest {LocalizableStrings.VsTestDefinition}
store {LocalizableStrings.StoreDefinition}
install {LocalizableStrings.InstallDefinition}
uninstall {LocalizableStrings.UninstallDefinition}
help {LocalizableStrings.HelpDefinition}
{LocalizableStrings.CommonOptions}:

View file

@ -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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Zobrazí nainstalované sady SDK.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Zobrazí nainstalované moduly runtime.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -79,7 +79,7 @@
</trans-unit>
<trans-unit id="PublishDefinition">
<source>Publishes a .NET project for deployment (including the runtime).</source>
<target state="translated">Veröffentlicht ein .NET-Projekt für die Bereitstellung (einschließlich Laufzeit).</target>
<target state="translated">Veröffentlicht ein .NET-Projekt für die Bereitstellung (einschließlich Runtime).</target>
<note />
</trans-unit>
<trans-unit id="RunDefinition">
@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Die installierten SDKs anzeigen.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Die installierten Runtimes anzeigen.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -249,12 +249,17 @@
</trans-unit>
<trans-unit id="StoreDefinition">
<source>Stores the specified assemblies in the runtime store.</source>
<target state="translated">Speichert die angegebenen Assemblys im Laufzeitspeicher.</target>
<target state="translated">Speichert die angegebenen Assemblys im Runtimespeicher.</target>
<note />
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Muestra los SDK instalados.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Muestra los runtimes instalados.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Affichez les SDK installés.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Affichez les runtimes installés.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Visualizza gli SDK installati.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Visualizza i runtime installati.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">インストール済み SDK を表示します。</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">インストール済みランタイムを表示します。</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">설치된 SDK를 표시합니다.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">설치된 런타임을 표시합니다.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Wyświetl zainstalowane zestawy SDK.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Wyświetl zainstalowane środowiska uruchomieniowe.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Exiba os SDKs instalados.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Exiba os runtimes instalados.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Отображение установленных пакетов SDK.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Отображение установленных сред выполнения.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">Yüklü SDKları görüntüleyin.</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">Yüklü çalışma zamanlarını görüntüleyin.</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">显示安装的 SDK。</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">显示安装的运行时。</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -199,12 +199,12 @@
</trans-unit>
<trans-unit id="SDKListSdksCommandDefinition">
<source>Display the installed SDKs.</source>
<target state="new">Display the installed SDKs.</target>
<target state="translated">顯示已安裝的 SDK。</target>
<note />
</trans-unit>
<trans-unit id="SDKListRuntimesCommandDefinition">
<source>Display the installed runtimes.</source>
<target state="new">Display the installed runtimes.</target>
<target state="translated">顯示已安裝的執行階段。</target>
<note />
</trans-unit>
<trans-unit id="SDKDiagnosticsCommandDefinition">
@ -254,7 +254,12 @@
</trans-unit>
<trans-unit id="InstallDefinition">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<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>

View file

@ -2,8 +2,10 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Transactions;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
@ -14,18 +16,31 @@ using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.Tools.Install.Tool
{
public class InstallToolCommand : CommandBase
internal class InstallToolCommand : CommandBase
{
private static string _packageId;
private static string _packageVersion;
private static string _configFilePath;
private static string _framework;
private static string _source;
private static bool _global;
private readonly IToolPackageStore _toolPackageStore;
private readonly IToolPackageInstaller _toolPackageInstaller;
private readonly IShellShimRepository _shellShimRepository;
private readonly IEnvironmentPathInstruction _environmentPathInstruction;
private readonly IReporter _reporter;
private readonly IReporter _errorReporter;
private readonly string _packageId;
private readonly string _packageVersion;
private readonly string _configFilePath;
private readonly string _framework;
private readonly string _source;
private readonly bool _global;
private readonly string _verbosity;
public InstallToolCommand(
AppliedOption appliedCommand,
ParseResult parseResult)
ParseResult parseResult,
IToolPackageStore toolPackageStore = null,
IToolPackageInstaller toolPackageInstaller = null,
IShellShimRepository shellShimRepository = null,
IEnvironmentPathInstruction environmentPathInstruction = null,
IReporter reporter = null)
: base(parseResult)
{
if (appliedCommand == null)
@ -39,6 +54,26 @@ namespace Microsoft.DotNet.Tools.Install.Tool
_framework = appliedCommand.ValueOrDefault<string>("framework");
_source = appliedCommand.ValueOrDefault<string>("source");
_global = appliedCommand.ValueOrDefault<bool>("global");
_verbosity = appliedCommand.SingleArgumentOrDefault("verbosity");
var cliFolderPathCalculator = new CliFolderPathCalculator();
_toolPackageStore = toolPackageStore
?? new ToolPackageStore(new DirectoryPath(cliFolderPathCalculator.ToolsPackagePath));
_toolPackageInstaller = toolPackageInstaller
?? new ToolPackageInstaller(
_toolPackageStore,
new ProjectRestorer(_reporter));
_environmentPathInstruction = environmentPathInstruction
?? EnvironmentPathFactory.CreateEnvironmentPathInstruction();
_shellShimRepository = shellShimRepository
?? new ShellShimRepository(new DirectoryPath(cliFolderPathCalculator.ToolsShimPath));
_reporter = (reporter ?? Reporter.Output);
_errorReporter = (reporter ?? Reporter.Error);
}
public override int Execute()
@ -48,78 +83,99 @@ namespace Microsoft.DotNet.Tools.Install.Tool
throw new GracefulException(LocalizableStrings.InstallToolCommandOnlySupportGlobal);
}
var cliFolderPathCalculator = new CliFolderPathCalculator();
var offlineFeedPath = new DirectoryPath(cliFolderPathCalculator.CliFallbackFolderPath);
var toolConfigurationAndExecutablePath = ObtainPackage(
executablePackagePath: new DirectoryPath(cliFolderPathCalculator.ToolsPackagePath),
offlineFeedPath: offlineFeedPath);
var shellShimMaker = new ShellShimMaker(cliFolderPathCalculator.ToolsShimPath);
var commandName = toolConfigurationAndExecutablePath.Configuration.CommandName;
shellShimMaker.EnsureCommandNameUniqueness(commandName);
shellShimMaker.CreateShim(
toolConfigurationAndExecutablePath.Executable.Value,
commandName);
EnvironmentPathFactory
.CreateEnvironmentPathInstruction()
.PrintAddPathInstructionIfPathDoesNotExist();
Reporter.Output.WriteLine(
string.Format(LocalizableStrings.InstallationSucceeded, commandName));
return 0;
}
private static ToolConfigurationAndExecutablePath ObtainPackage(
DirectoryPath executablePackagePath,
DirectoryPath offlineFeedPath)
{
try
{
FilePath? configFile = null;
if (_configFilePath != null)
{
configFile = new FilePath(_configFilePath);
}
var toolPackageObtainer =
new ToolPackageObtainer(
executablePackagePath,
offlineFeedPath,
() => new DirectoryPath(Path.GetTempPath())
.WithSubDirectories(Path.GetRandomFileName())
.WithFile(Path.GetRandomFileName() + ".csproj"),
new Lazy<string>(BundledTargetFramework.GetTargetFrameworkMoniker),
new PackageToProjectFileAdder(),
new ProjectRestorer());
return toolPackageObtainer.ObtainAndReturnExecutablePath(
packageId: _packageId,
packageVersion: _packageVersion,
nugetconfig: configFile,
targetframework: _framework,
source: _source);
}
catch (PackageObtainException ex)
if (_configFilePath != null && !File.Exists(_configFilePath))
{
throw new GracefulException(
message:
string.Format(LocalizableStrings.InstallFailedNuget,
ex.Message),
innerException: ex);
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);
}
try
{
IToolPackage package = null;
using (var scope = new TransactionScope(
TransactionScopeOption.Required,
TimeSpan.Zero))
{
package = _toolPackageInstaller.InstallPackage(
packageId: _packageId,
packageVersion: _packageVersion,
targetFramework: _framework,
nugetConfig: configFile,
source: _source,
verbosity: _verbosity);
foreach (var command in package.Commands)
{
_shellShimRepository.CreateShim(command.Executable, command.Name);
}
scope.Complete();
}
_environmentPathInstruction.PrintAddPathInstructionIfPathDoesNotExist();
_reporter.WriteLine(
string.Format(
LocalizableStrings.InstallationSucceeded,
string.Join(", ", package.Commands.Select(c => c.Name)),
package.PackageId,
package.PackageVersion).Green());
return 0;
}
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)
{
throw new GracefulException(
message:
if (Reporter.IsVerbose)
{
Reporter.Verbose.WriteLine(ex.ToString().Red());
}
_errorReporter.WriteLine(
string.Format(
LocalizableStrings.InstallFailedPackage,
ex.Message),
innerException: ex);
LocalizableStrings.InvalidToolConfiguration,
ex.Message).Red());
_errorReporter.WriteLine(string.Format(LocalizableStrings.ToolInstallationFailedContactAuthor, _packageId).Red());
return 1;
}
catch (ShellShimException ex)
{
if (Reporter.IsVerbose)
{
Reporter.Verbose.WriteLine(ex.ToString().Red());
}
_errorReporter.WriteLine(
string.Format(
LocalizableStrings.FailedToCreateToolShim,
_packageId,
ex.Message).Red());
_errorReporter.WriteLine(string.Format(LocalizableStrings.ToolInstallationFailed, _packageId).Red());
return 1;
}
}
}

View file

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

View file

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

View file

@ -1,47 +0,0 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.ToolPackage;
using Microsoft.DotNet.Tools;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.Tools.Install.Tool
{
internal class PackageToProjectFileAdder : IPackageToProjectFileAdder
{
public void Add(FilePath projectPath, string packageId)
{
if (packageId == null)
{
throw new ArgumentNullException(nameof(packageId));
}
var argsToPassToRestore = new List<string>
{
projectPath.Value,
"package",
packageId,
"--no-restore"
};
var command = new DotNetCommandFactory(alwaysRunOutOfProc: true)
.Create(
"add",
argsToPassToRestore)
.CaptureStdOut()
.CaptureStdErr();
var result = command.Execute();
if (result.ExitCode != 0)
{
throw new PackageObtainException(
string.Format(
LocalizableStrings.FailedToAddPackage,
result.StartInfo.WorkingDirectory, result.StartInfo.Arguments, result.StdErr, result.StdOut));
}
}
}
}

View file

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

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Určuje zdroj balíčku NuGet, který se použije při instalaci.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">ID balíčku NuGet nástroje, který se má nainstalovat</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Nainstaluje nástroj, který se bude používat na příkazovém řádku.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">Konfigurační soubor NuGet, který se použije.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">Cílová architektura, pro kterou se má nástroj nainstalovat</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Verze balíčku nástroje v NuGetu</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Zadejte prosím jedno ID balíčku nástroje, který se má nainstalovat.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Instalovat pro všechny uživatele</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Příkaz Instalovat rozhraní .NET</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">Přepínač --global (-g) se aktuálně vyžaduje, protože se podporují jenom nástroje pro všechny uživatele.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Gibt eine NuGet-Paketquelle für die Installation an.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">NuGet-Paket-ID des zu installierenden Tools.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Installiert ein Tool zur Verwendung über die Befehlszeile.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">Die zu verwendende NuGet-Konfigurationsdatei.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">Das Zielframework, für das das Tool installiert wird.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Die Version des Toolpakets in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Geben Sie eine Toolpaket-ID für die Installation an.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Benutzerweite Installation.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET-Installationsbefehl</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">Die Option --global (-g) ist aktuell erforderlich, weil nur benutzerweite Tools unterstützt werden.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Especifica el origen de un paquete NuGet para usarlo durante la instalación.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">ORIGEN</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">Id. del paquete de NuGet que se instalará.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Instala una herramienta para usarla en la línea de comandos.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">Archivo de configuración de NuGet que debe usarse.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">La plataforma de destino para la que se instala la herramienta.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Versión del paquete de la herramienta en NuGet.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Especifique un id. de paquete para instalar.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Instale para todos los usuarios.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Comando para la instalación de .NET</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">El conmutador --global (g) se requiere actualmente porque solo se admiten herramientas para todos los usuarios.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Spécifie un package NuGet source à utiliser durant l'installation.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">ID de package NuGet de l'outil à installer.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Installe un outil à utiliser sur la ligne de commande.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">Fichier de configuration NuGet à utiliser.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">Framework cible pour lequel l'outil doit être installé.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Version du package d'outils dans NuGet.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Spécifiez un ID de package d'outil à installer.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Effectuez l'installation à l'échelle des utilisateurs.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Commande d'installation .NET</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">Le commutateur --global (-g) est obligatoire, car seuls les outils à l'échelle des utilisateurs sont pris en charge.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Consente di specificare un'origine pacchetto NuGet da usare durante l'installazione.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">ORIGINE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">ID pacchetto NuGet dello strumento da installare.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Installa uno strumento da usare sulla riga di comando.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">File di configurazione NuGet da usare.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">Framework di destinazione per cui installare lo strumento.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Versione del pacchetto dello strumento in NuGet.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Specificare un ID pacchetto dello strumento da installare.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Esegue l'installazione a livello di utente.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Comando di installazione .NET</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">L'opzione --global (-g) è attualmente obbligatoria perché sono supportati solo gli strumenti a livello di utente.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">インストール中に使用する NuGet パッケージを指定します。</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">インストールするツールの NuGet パッケージ ID。</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">コマンド ラインで使用するツールをインストールします。</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">使用する NuGet 構成ファイル。</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">ツールをインストールするターゲット フレームワーク。</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">NuGet のツール パッケージのバージョン。</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">インストールするツール パッケージの ID を指定してください。</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">ユーザー全体をインストールします。</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET インストール コマンド</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">サポートされているのはユーザー全体のツールだけなので、現在 --global スイッチ (-g) が必要です。</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">설치 중 사용할 NuGet 패키지 소스를 지정합니다.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">설치할 도구의 NuGet 패키지 ID입니다.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">명령줄에서 사용할 도구를 설치합니다.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">사용할 NuGet 구성 파일입니다.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">도구를 설치할 대상 프레임워크입니다.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">NuGet의 도구 패키지 버전입니다.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">설치할 도구 패키지 ID를 하나 지정하세요.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">사용자 전체 도구를 설치합니다.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET 설치 명령</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">사용자 전체 도구만 지원되므로 -global 스위치(-g)가 필요합니다.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Określa źródło pakietu NuGet do użycia podczas instalacji.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">ŹRÓDŁO</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">Identyfikator pakietu NuGet narzędzia do zainstalowania.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Instaluje narzędzie do użytku w wierszu polecenia.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">Plik konfiguracji programu NuGet do użycia.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">Docelowa platforma, dla której ma zostać zainstalowane narzędzie.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Wersja pakietu narzędzia w pakiecie NuGet.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Określ jeden identyfikator pakietu narzędzia do zainstalowania.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Zainstaluj dla użytkownika.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Polecenie instalacji platformy .NET</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">Obecnie jest wymagany przełącznik --global (-g), ponieważ obsługiwane są tylko narzędzia użytkownika.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Especifica uma origem do pacote NuGet a ser usada durante a instalação.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">ORIGEM</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">A ID do pacote NuGet da ferramenta a ser instalada.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Instala uma ferramenta para uso na linha de comando.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">O arquivo de configuração do NuGet a ser usado.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">A estrutura de destino para a qual instalar a ferramenta.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Versão do pacote da ferramenta no NuGet.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Especifique uma ID de Pacote da ferramenta a ser instalada.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Instale para todo o usuário.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Comando de instalação do .NET</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">A opção --global (-g) é obrigatória, pois somente ferramentas para todo o usuário são compatíveis.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Задает источник пакета NuGet, используемый во время установки.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">Идентификатор пакета NuGet устанавливаемого инструмента.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Устанавливает инструмент для использования в командной строке.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">Используемый файл конфигурации NuGet.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">Целевая платформа для установки инструмента.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">Версия пакета инструмента в NuGet.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Укажите один идентификатор пакета устанавливаемого инструмента.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Установка на уровне пользователя.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Команда установки .NET</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">Параметр "--global switch (-g)" сейчас обязателен, так как поддерживаются только инструменты уровня пользователя.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">Yükleme sırasında kullanılacak bir NuGet paket kaynağı belirtir.</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">Yüklenecek aracın NuGet Paket Kimliği.</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">Komut satırında kullanılacak bir araç yükler.</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">Kullanılacak NuGet yapılandırma dosyası.</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">Aracın yükleneceği hedef çerçeve.</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">NuGetteki araç paketinin sürümü.</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">Lütfen yüklenecek araç Paketi Kimliğini belirtin.</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">Kullanıcı için yükleyin.</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET Yükleme Komutu</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">Yalnızca kullanıcı için araçlar desteklendiğinden --global anahtarı (-g) şu anda gereklidir.</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">指定安装期间使用的 NuGet 包源。</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">要安装的工具的 NuGet 包 ID。</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">安装在命令行上使用的工具。</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">要使用的 NuGet 配置文件。</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">要安装工具的目标框架。</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">NuGet 中工具包的版本。</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">请指定一个要安装的工具包 ID。</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">安装用户范围。</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET 安装命令</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">目前需要 --global 开关 (-g),因为仅支持用户范围工具。</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,113 +4,104 @@
<body>
<trans-unit id="SourceOptionDescription">
<source>Specifies a NuGet package source to use during installation.</source>
<target state="new">Specifies a NuGet package source to use during installation.</target>
<target state="translated">指定於安裝期間要使用的 NuGet 套件來源。</target>
<note />
</trans-unit>
<trans-unit id="SourceOptionName">
<source>SOURCE</source>
<target state="new">SOURCE</target>
<target state="translated">SOURCE</target>
<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="new">
The installation succeeded. If there are no further instructions, you can type the following command in shell directly to invoke: {0}</target>
<note />
</trans-unit>
<trans-unit id="FailedToAddPackage">
<source>Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to add package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="FailedToRestorePackage">
<source>Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</source>
<target state="new">Failed to restore package.
WorkingDirectory: {0}
Arguments: {1}
Output: {2}{3}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedNuget">
<source>Install failed. Failed to download package:
NuGet returned:
{0}</source>
<target state="new">Install failed. Failed to download package:
NuGet returned:
{0}</target>
<note />
</trans-unit>
<trans-unit id="InstallFailedPackage">
<source>Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</source>
<target state="new">Install failed. The settings file in the tool's NuGet package is not valid. Please contact the owner of the NuGet package.
The error was:
{0}</target>
<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="PackageIdArgumentDescription">
<source>NuGet Package Id of the tool to install.</source>
<target state="new">NuGet Package Id of the tool to install.</target>
<target state="translated">要安裝之工具的 NuGet 套件識別碼。</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs a tool for use on the command line.</source>
<target state="new">Installs a tool for use on the command line.</target>
<target state="translated">安裝工具以用於命令列。</target>
<note />
</trans-unit>
<trans-unit id="ConfigFileOptionDescription">
<source>The NuGet configuration file to use.</source>
<target state="new">The NuGet configuration file to use.</target>
<target state="translated">要使用的 NuGet 組態檔。</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to install the tool for.</source>
<target state="new">The target framework to install the tool for.</target>
<target state="translated">要為工具安裝的目標 Framework。</target>
<note />
</trans-unit>
<trans-unit id="VersionOptionDescription">
<source>Version of the tool package in NuGet.</source>
<target state="new">Version of the tool package in NuGet.</target>
<target state="translated">NuGet 中的工具套件版本。</target>
<note />
</trans-unit>
<trans-unit id="PackageIdArgumentName">
<source>PACKAGE_ID</source>
<target state="new">PACKAGE_ID</target>
<target state="translated">PACKAGE_ID</target>
<note />
</trans-unit>
<trans-unit id="SpecifyExactlyOnePackageId">
<source>Please specify one tool Package Id to install.</source>
<target state="new">Please specify one tool Package Id to install.</target>
<target state="translated">請指定一個要安裝的工具套件識別碼。</target>
<note />
</trans-unit>
<trans-unit id="GlobalOptionDescription">
<source>Install user wide.</source>
<target state="new">Install user wide.</target>
<target state="translated">為全部使用者安裝。</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET 安裝命令</target>
<note />
</trans-unit>
<trans-unit id="InstallToolCommandOnlySupportGlobal">
<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>
<target state="translated">因為只支援適用於全體使用者的工具,所以目前必須有 --global 參數 (-g)。</target>
<note />
</trans-unit>
<trans-unit id="InvalidToolConfiguration">
<source>The settings file in the tool's NuGet package is invalid: {0}</source>
<target state="new">The settings file in the tool's NuGet package is invalid: {0}</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailed">
<source>Tool '{0}' failed to install.</source>
<target state="new">Tool '{0}' failed to install.</target>
<note />
</trans-unit>
<trans-unit id="ToolInstallationFailedContactAuthor">
<source>Tool '{0}' failed to install. Please contact the tool author for assistance.</source>
<target state="new">Tool '{0}' failed to install. Please contact the tool author for assistance.</target>
<note />
</trans-unit>
<trans-unit id="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>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Příkaz Instalovat rozhraní .NET</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Nainstaluje položku do vývojového prostředí.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET-Installationsbefehl</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Installiert ein Element in der Entwicklungsumgebung.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Comando para la instalación de .NET</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Instala un elemento en el entorno de desarrollo.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Commande d'installation .NET</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Installe un élément dans l'environnement de développement.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Comando di installazione .NET</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Installa un elemento nell'ambiente di sviluppo.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET インストール コマンド</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">項目を開発環境にインストールします。</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">.NET 설치 명령</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">개발 환경에 항목을 설치합니다.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Polecenie instalacji .NET</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Instaluje element w środowisku deweloperskim.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Comando de instalação do .NET</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Instala um item no ambiente de desenvolvimento.</target>
<note />
</trans-unit>
</body>

View file

@ -4,12 +4,12 @@
<body>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="new">.NET Install Command</target>
<target state="translated">Команда установки .NET</target>
<note />
</trans-unit>
<trans-unit id="CommandDescription">
<source>Installs an item into the development environment.</source>
<target state="new">Installs an item into the development environment.</target>
<target state="translated">Устанавливает элемент в среде разработки.</target>
<note />
</trans-unit>
</body>

Some files were not shown because too many files have changed in this diff Show more