Merge pull request #8822 from livarcocc/merge_master_3xx
Merge master into release/2.1.3xx
This commit is contained in:
commit
67c4562f43
378 changed files with 14675 additions and 4596 deletions
|
@ -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" />
|
||||
|
|
|
@ -8,6 +8,7 @@ Documents Index
|
|||
- [.NET Core native pre-requisities document](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md)
|
||||
- [Roadmap and OS support](https://github.com/dotnet/core/blob/master/roadmap.md)
|
||||
- [Comprehensive CLI documentation](https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/)
|
||||
- [ASP.NET Core Command Line Tools](general/aspnetcore-tools.md)
|
||||
|
||||
## Working with the CLI repo
|
||||
|
||||
|
|
10
Documentation/general/aspnetcore-tools.md
Normal file
10
Documentation/general/aspnetcore-tools.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
ASP.NET Core Command Line Tools
|
||||
===============================
|
||||
|
||||
The .NET Core CLI includes some commands that are specific to ASP.NET Core projects.
|
||||
|
||||
- dotnet dev-certs
|
||||
- dotnet user-secrets
|
||||
- dotnet sql-cache
|
||||
|
||||
For more information on these tools, see <https://github.com/aspnet/DotNetTools>.
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2020
|
||||
|
@ -232,8 +233,14 @@ 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("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-install-tool.Tests", "test\dotnet-install-tool.Tests\dotnet-install-tool.Tests.csproj", "{8FE9D802-57F3-493B-9E14-72DF905E3838}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.MSBuildSdkResolver.Tests", "test\Microsoft.DotNet.MSBuildSdkResolver.Tests\Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj", "{B7C82980-F01D-4B8A-A746-BFA0032CB152}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -1642,6 +1649,30 @@ Global
|
|||
{91BFE800-1624-4A58-A1CE-339705A8FFD0}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{91BFE800-1624-4A58-A1CE-339705A8FFD0}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
||||
{91BFE800-1624-4A58-A1CE-339705A8FFD0}.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
|
||||
{EDF19BE6-F20F-4AD0-8E3B-E837030726A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EDF19BE6-F20F-4AD0-8E3B-E837030726A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EDF19BE6-F20F-4AD0-8E3B-E837030726A5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
@ -1666,6 +1697,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
|
||||
{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
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.MinSizeRel|x86.Build.0 = Debug|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1739,7 +1818,10 @@ Global
|
|||
{E7C72EF2-8480-48B4-AAE8-A596F1A6048E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{E84C08C9-70D7-48B0-9507-ADB8B9A2694C} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{91BFE800-1624-4A58-A1CE-339705A8FFD0} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{E442F4C1-08DB-470F-B9A6-197444CD0295} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{EDF19BE6-F20F-4AD0-8E3B-E837030726A5} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||
{8FE9D802-57F3-493B-9E14-72DF905E3838} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
{B7C82980-F01D-4B8A-A746-BFA0032CB152} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5}
|
||||
|
|
73
README.md
73
README.md
|
@ -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?
|
||||
|
@ -23,9 +23,9 @@ This project has adopted the code of conduct defined by the [Contributor Covenan
|
|||
Build Status
|
||||
------------
|
||||
|
||||
|Windows x64|Windows x86|macOS|Linux x64 Archive|Linux Native Installers|RHEL 6 Archive|Alpine 3.6 Archive|
|
||||
|:------:|:------:|:------:|:------:|:------:|:------:|:------:|
|
||||
|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][linux-build-badge]][linux-build]|[![][linuxnative-build-badge]][linuxnative-build]|[![][rhel6-build-badge]][rhel6-build]|[![][alpine3.6-build-badge]][alpine3.6-build]|
|
||||
|Windows x64|Windows x86|macOS|Linux x64 Archive|Linux arm Archive|Linux Native Installers|RHEL 6 Archive|Alpine 3.6 Archive|
|
||||
|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|
|
||||
|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][linux-build-badge]][linux-build]|[![][linux-arm-build-badge]][linux-arm-build]|[![][linuxnative-build-badge]][linuxnative-build]|[![][rhel6-build-badge]][rhel6-build]|[![][alpine3.6-build-badge]][alpine3.6-build]|
|
||||
|
||||
[win-x64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6902/badge
|
||||
[win-x64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6902
|
||||
|
@ -39,6 +39,9 @@ Build Status
|
|||
[linux-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6899/badge
|
||||
[linux-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6899
|
||||
|
||||
[linux-arm-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8721/badge
|
||||
[linux-arm-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=8721
|
||||
|
||||
[linuxnative-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/7254/badge
|
||||
[linuxnative-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=7254
|
||||
|
||||
|
@ -59,17 +62,17 @@ 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] |
|
||||
| **macOS** | [Installer][osx-installer] - [Checksum][osx-installer-checksum]<br>[tar.gz][osx-targz] - [Checksum][osx-targz-checksum] |
|
||||
| **Linux x64** | [DEB Installer][linux-DEB-installer] - [Checksum][linux-DEB-installer-checksum]<br>_see installer note below_<sup>1</sup><br>[tar.gz][linux-targz] - [Checksum][linux-targz-checksum] |
|
||||
| **RHEL 7.2** | [Installer][rhel-7-installer] - [Checksum][rhel-7-installer-checksum]<br>[tar.gz][linux-targz] - [Checksum][linux-targz-checksum] |
|
||||
| **Linux x64** | [DEB Installer][linux-DEB-installer] - [Checksum][linux-DEB-installer-checksum]<br>[RPM Installer][linux-RPM-installer] - [Checksum][linux-RPM-installer-checksum]<br>_see installer note below_<sup>1</sup><br>[tar.gz][linux-targz] - [Checksum][linux-targz-checksum] |
|
||||
| **Linux arm** | [tar.gz][linux-arm-targz] - [Checksum][linux-arm-targz-checksum] |
|
||||
| **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 +80,44 @@ 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-arm-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm.tar.gz
|
||||
[linux-arm-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm.tar.gz.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
|
||||
[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
|
||||
|
||||
[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
|
||||
[linux-RPM-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.rpm
|
||||
[linux-RPM-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.rpm.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
|
||||
[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
|
||||
|
||||
[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
|
||||
|
||||
|
|
13
TestAssets/TestProjects/docker-compose/docker-compose.dcproj
Normal file
13
TestAssets/TestProjects/docker-compose/docker-compose.dcproj
Normal 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>
|
|
@ -0,0 +1,8 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
testwebapplication:
|
||||
image: testwebapplication
|
||||
build:
|
||||
context: .
|
||||
dockerfile: testwebapplication/Dockerfile
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<ItemGroup Condition=" '$(IncludeSharedFrameworksForBackwardsCompatibilityTests)' == 'true' ">
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive"
|
||||
Condition="!Exists('$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)')">
|
||||
Condition="!Exists('$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)') And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl)/$(BackwardsCompatibility110CombinedFrameworkHostCompressedFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)</DownloadFileName>
|
||||
<ExtractDestination>$(BackwardsCompatibleSharedFrameworksPublishDirectory)</ExtractDestination>
|
||||
|
@ -34,21 +34,21 @@
|
|||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile"
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile)') And '$(OSName)' != 'linux'">
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedFrameworkVersion)/$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedHostInstallerFile"
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedHostInstallerFile)') And '$(OSName)' != 'linux'">
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedHostInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedHostVersion)/$(BackwardsCompatibility110DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110DownloadedSharedHostInstallerFile)</DownloadFileName>
|
||||
<ExtractDestintation></ExtractDestintation>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedHostFxrInstallerFile"
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedHostFxrInstallerFile)') And '$(OSName)' != 'linux'">
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedHostFxrInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110HostFxrVersion)/$(BackwardsCompatibility110DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110DownloadedHostFxrInstallerFile)</DownloadFileName>
|
||||
<ExtractDestintation></ExtractDestintation>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
'$(HostRid)' == 'opensuse.42.1-x64' ">$(HostRid)</HostMonikerRid>
|
||||
<HostMonikerRid Condition=" '$(HostMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</HostMonikerRid>
|
||||
<HostMonikerRidForFileName>$(HostMonikerRid)</HostMonikerRidForFileName>
|
||||
<HostMonikerRidForFileName Condition=" '$(IsDebianBaseDistro)' == 'true' ">$(Architecture)</HostMonikerRidForFileName>
|
||||
<HostMonikerRidForFileName Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">$(Architecture)</HostMonikerRidForFileName>
|
||||
|
||||
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
|
||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<PropertyGroup>
|
||||
<CLITargets Condition=" '$(CLITargets)' == '' ">Prepare;Compile;Test;Package;Publish</CLITargets>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<!-- Currently, 'arm*' SDK's do not include the LZMA for performance upon extraction of the NuGet archive. -->
|
||||
<!-- https://github.com/dotnet/cli/issues/8800 -->
|
||||
<IncludeNuGetPackageArchive Condition=" $(Architecture.StartsWith('arm')) ">false</IncludeNuGetPackageArchive>
|
||||
<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' AND ($(Rid.StartsWith('rhel.6')) OR $(Rid.StartsWith('alpine.3.6')))">true</SkipBuildingInstallers>
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
|
||||
|
|
|
@ -10,16 +10,14 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<IsLinux Condition = " '$(HostOSName)' != 'win' AND '$(HostOSName)' != 'osx' ">True</IsLinux>
|
||||
<Rid Condition=" '$(Rid)' == '' AND '$(IsLinux)' != 'True' ">$(HostRid)</Rid>
|
||||
<Architecture Condition=" '$(Architecture)' == '' AND '$(IsLinux)' != 'True' ">x64</Architecture>
|
||||
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSName)</OSName>
|
||||
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSPlatform)</OSPlatform>
|
||||
|
||||
<Rid Condition=" '$(Rid)' == '' AND '$(IsLinux)' == 'True' ">linux-x64</Rid>
|
||||
<Architecture Condition=" '$(Architecture)' == '' AND '$(IsLinux)' == 'True' ">x64</Architecture>
|
||||
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' == 'True' ">linux</OSName>
|
||||
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' == 'True' ">linux</OSPlatform>
|
||||
|
||||
<Architecture Condition=" '$(Architecture)' == '' ">x64</Architecture>
|
||||
<Rid Condition=" '$(Rid)' == '' ">$(OSName)-$(Architecture)</Rid>
|
||||
|
||||
<BuildInfoPropsContent>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
|
|
28
build/BundledDotnetTools.proj
Normal file
28
build/BundledDotnetTools.proj
Normal file
|
@ -0,0 +1,28 @@
|
|||
<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>--runtime any</DotnetToolsRestoreAdditionalParameters>
|
||||
<DotnetToolsRestoreAdditionalParameters>$(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>
|
8
build/BundledDotnetTools.props
Normal file
8
build/BundledDotnetTools.props
Normal file
|
@ -0,0 +1,8 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<BundledDotnetTools Include="dotnet-dev-certs" Version="$(AspNetCoreVersion)" />
|
||||
<BundledDotnetTools Include="dotnet-sql-cache" Version="$(AspNetCoreVersion)" />
|
||||
<BundledDotnetTools Include="dotnet-user-secrets" Version="$(AspNetCoreVersion)" />
|
||||
<BundledDotnetTools Include="dotnet-watch" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<!-- Use the "x64" Rid when downloading Linux shared framework 'DEB' installer files. -->
|
||||
<SharedFrameworkInstallerFileRid>$(CoreSetupRid)</SharedFrameworkInstallerFileRid>
|
||||
<SharedFrameworkInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' ">x64</SharedFrameworkInstallerFileRid>
|
||||
<SharedFrameworkInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">x64</SharedFrameworkInstallerFileRid>
|
||||
|
||||
<DownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host$(InstallerStartSuffix)-$(SharedHostVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension)</DownloadedSharedHostInstallerFileName>
|
||||
<DownloadedSharedHostInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedSharedHostInstallerFileName)</DownloadedSharedHostInstallerFile>
|
||||
|
@ -25,11 +25,10 @@
|
|||
|
||||
<!-- Use the portable "linux-x64" Rid when downloading Linux shared framework compressed file. -->
|
||||
<SharedFrameworkRid>$(CoreSetupRid)</SharedFrameworkRid>
|
||||
<SharedFrameworkRid Condition=" '$(UsePortableLinuxSharedFramework)' == 'true' ">linux-x64</SharedFrameworkRid>
|
||||
<SharedFrameworkRid Condition=" '$(UsePortableLinuxSharedFramework)' == 'true' ">linux-$(Architecture)</SharedFrameworkRid>
|
||||
<CombinedFrameworkHostCompressedFileName>dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension)</CombinedFrameworkHostCompressedFileName>
|
||||
|
||||
<AspNetCoreSharedFxInstallerRid>$(SharedFrameworkRid)</AspNetCoreSharedFxInstallerRid>
|
||||
<AspNetCoreSharedFxInstallerRid Condition="'$(SharedFrameworkRid)' == 'alpine.3.6-x64'">linux-x64</AspNetCoreSharedFxInstallerRid>
|
||||
<AspNetCoreSharedFxInstallerRid Condition="'$(SharedFrameworkRid)' == 'rhel.6-x64'">linux-x64</AspNetCoreSharedFxInstallerRid>
|
||||
<AspNetCoreSharedFxArchiveRid>$(AspNetCoreSharedFxInstallerRid)</AspNetCoreSharedFxArchiveRid>
|
||||
<AspNetCoreSharedFxInstallerRid Condition="'$(InstallerExtension)' == '.deb' OR '$(InstallerExtension)' == '.rpm'">x64</AspNetCoreSharedFxInstallerRid>
|
||||
|
@ -56,7 +55,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<_DownloadAndExtractItem Include="AspNetCoreSharedFxArchiveFile"
|
||||
Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)')">
|
||||
Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)') And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(AspNetCoreSharedFxArchiveFile)</DownloadFileName>
|
||||
<ExtractDestination>$(AspNetCoreSharedFxPublishDirectory)</ExtractDestination>
|
||||
|
@ -70,42 +69,42 @@
|
|||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedRuntimeDepsInstallerFile"
|
||||
Condition="'$(IsDebianBaseDistro)' == 'true' And '$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedRuntimeDepsInstallerFile)') And '$(InstallerExtension)' != ''">
|
||||
Condition="('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') And '$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedRuntimeDepsInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(DownloadedRuntimeDepsInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedRuntimeDepsInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedSharedFrameworkInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedSharedHostInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedHostFxrInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedAspNetCoreSharedFxInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' AND !Exists($(DownloadedAspNetCoreSharedFxInstallerFile)) And '$(InstallerExtension)' != ''">
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' AND !Exists($(DownloadedAspNetCoreSharedFxInstallerFile)) And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(DownloadedAspNetCoreSharedFxInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedAspNetCoreSharedFxInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="AspNetCoreSharedFxBaseRuntimeVersionFile"
|
||||
Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)')">
|
||||
Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)') And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(AspNetCoreSharedFxBaseRuntimeVersionFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
30
build/CLI_Baseline.csv
Normal 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,23 +1,23 @@
|
|||
<?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-30338</MicrosoftAspNetCoreAppPackageVersion>
|
||||
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview2-26313-01</MicrosoftNETCoreAppPackageVersion>
|
||||
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
|
||||
<MicrosoftBuildPackageVersion>15.6.82</MicrosoftBuildPackageVersion>
|
||||
<MicrosoftBuildPackageVersion>15.7.0-preview-000066</MicrosoftBuildPackageVersion>
|
||||
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
|
||||
<MicrosoftBuildRuntimePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildRuntimePackageVersion>
|
||||
<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-beta2-62713-01</MicrosoftCodeAnalysisCSharpPackageVersion>
|
||||
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
|
||||
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
|
||||
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
|
||||
<MicrosoftNETSdkPackageVersion>2.1.300-preview1-62608-07</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETSdkPackageVersion>2.1.300-preview2-62716-01</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
|
||||
<MicrosoftNETSdkWebPackageVersion>2.1.0-release21-20180126-1326543</MicrosoftNETSdkWebPackageVersion>
|
||||
<MicrosoftNETSdkRazorPackageVersion>$(MicrosoftAspNetCoreAppPackageVersion)</MicrosoftNETSdkRazorPackageVersion>
|
||||
<MicrosoftNETSdkWebPackageVersion>2.1.300-preview2-20180306-1448279</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-26313-01</MicrosoftDotNetPlatformAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsDependencyModelPackageVersion>2.1.0-preview2-26313-01</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-62628-01</MicrosoftDotNetArchivePackageVersion>
|
||||
<MicrosoftDiaSymReaderNativePackageVersion>1.6.0-beta2-25304</MicrosoftDiaSymReaderNativePackageVersion>
|
||||
<NuGetBuildTasksPackageVersion>4.7.0-preview1-4927</NuGetBuildTasksPackageVersion>
|
||||
<NuGetBuildTasksPackPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetBuildTasksPackPackageVersion>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<LinuxDistrosNeedNativeInstaller Include="rhel.7-x64">
|
||||
<DockerFolder>rhel</DockerFolder>
|
||||
<InstallerExtension>rpm</InstallerExtension>
|
||||
<DistroNameInInstaller>rhel-x64</DistroNameInInstaller>
|
||||
<DistroNameInInstaller>x64</DistroNameInInstaller>
|
||||
</LinuxDistrosNeedNativeInstaller>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -97,23 +97,27 @@
|
|||
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>
|
||||
|
||||
<_NETCoreSdkIsPreview Condition=" '$(DropSuffix)' == '' ">true</_NETCoreSdkIsPreview>
|
||||
|
||||
<BundledVersionsPropsContent>
|
||||
<![CDATA[
|
||||
|
@ -133,8 +137,10 @@ 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>
|
||||
<NETCoreSdkVersion>$(SdkVersion)</NETCoreSdkVersion>
|
||||
<_NETCoreSdkIsPreview>$(_NETCoreSdkIsPreview)</_NETCoreSdkIsPreview>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
]]>
|
||||
|
|
|
@ -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="roslyn" value="https://dotnet.myget.org/f/roslyn/api/v3/index.json" />
|
||||
<add key="symreader-native" value="https://dotnet.myget.org/f/symreader-native/api/v3/index.json" />
|
||||
|
@ -29,6 +29,8 @@
|
|||
<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" />
|
||||
<add key="dotnet-msbuild" value="https://dotnet.myget.org/F/msbuild/api/v3/index.json" />
|
||||
]]>
|
||||
</NugetConfigCLIFeeds>
|
||||
|
||||
|
|
|
@ -11,8 +11,13 @@
|
|||
<Import Project="$(MSBuildThisFileDirectory)/package/CopySandBoxPackageOut.targets" />
|
||||
|
||||
<Target Name="GenerateInstallers"
|
||||
Condition=" '$(SkipBuildingInstallers)' != 'true' "
|
||||
DependsOnTargets="Prepare;Layout;GeneratePkgs;GenerateDebs;GenerateMsis;GenerateRpms" />
|
||||
Condition=" '$(SkipBuildingInstallers)' != 'true' And !$(Architecture.StartsWith('arm')) "
|
||||
DependsOnTargets="Prepare;
|
||||
Layout;
|
||||
GeneratePkgs;
|
||||
GenerateDebs;
|
||||
GenerateMsis;
|
||||
GenerateRpms" />
|
||||
|
||||
<Target Name="Package"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework;
|
||||
|
@ -21,9 +26,13 @@
|
|||
GenerateNugetPackages;
|
||||
GenerateSymbolsNugetPackages;
|
||||
GenerateArchives;
|
||||
GenerateInstallers" />
|
||||
GenerateInstallers" />
|
||||
|
||||
<Target Name="GenerateInstallersAndCopyOutOfSandBox"
|
||||
DependsOnTargets="SandBoxPrepare;Layout;GenerateDebs;GenerateRpms;CopySandBoxPackageOut" />
|
||||
DependsOnTargets="SandBoxPrepare;
|
||||
Layout;
|
||||
GenerateDebs;
|
||||
GenerateRpms;
|
||||
CopySandBoxPackageOut" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<ItemGroup>
|
||||
<CliVersionBadgeToUpload Include="$(VersionBadge)" />
|
||||
<CliVersionBadgeToUpload Include="$(CoherentBadge)"
|
||||
Condition=" '$(Coherent)' == 'true' " />
|
||||
Condition=" '$(Coherent)' == 'true' And !$(Architecture.StartsWith('arm')) " />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<Target Name="Test"
|
||||
Condition=" '$(CLIBUILD_SKIP_TESTS)' != 'true' "
|
||||
Condition=" '$(CLIBUILD_SKIP_TESTS)' != 'true' And !$(Architecture.StartsWith('arm')) "
|
||||
DependsOnTargets="TestsForBuildItself;BuildTests;">
|
||||
|
||||
<!-- Make ure the test packages directory exists so that it's not an error to have it as a package source -->
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -145,6 +145,8 @@
|
|||
|
||||
<Target Name="SetupRpmProps">
|
||||
<PropertyGroup>
|
||||
<RuntimeDepsPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeDepsPackageVersion>
|
||||
<RuntimeDepsPackageName>dotnet-runtime-deps-$(RuntimeDepsPackageVersion)</RuntimeDepsPackageName>
|
||||
<RpmPackageVersion>$(SdkVersion)</RpmPackageVersion>
|
||||
<InputRoot>$(OutputDirectory)/sdk</InputRoot>
|
||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
|
@ -216,6 +218,7 @@
|
|||
Outputs="$(RpmTestResultsXmlFile)" >
|
||||
|
||||
<!-- Install Dependencies and SDK Packages -->
|
||||
<Exec Command="sudo yum -y install $(DownloadedRuntimeDepsInstallerFile)" />
|
||||
<Exec Command="sudo yum -y install $(DownloadedSharedHostInstallerFile)" />
|
||||
<Exec Command="sudo yum -y install $(DownloadedHostFxrInstallerFile)" />
|
||||
<Exec Command="sudo yum -y install $(DownloadedSharedFrameworkInstallerFile)" />
|
||||
|
@ -239,5 +242,6 @@
|
|||
<Exec Command="sudo yum remove -y $(SharedFxRpmPackageName)" />
|
||||
<Exec Command="sudo yum remove -y $(HostFxrRpmPackageName)" />
|
||||
<Exec Command="sudo yum remove -y $(HostRpmPackageName)" />
|
||||
<Exec Command="sudo yum remove -y $(RuntimeDepsPackageName)" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<Target Name="GenerateCoherentBadge"
|
||||
DependsOnTargets="Init; EvaluateRuntimeCoherence"
|
||||
Condition=" '$(Coherent)' == 'true' ">
|
||||
Condition=" '$(Coherent)' == 'true' And !$(Architecture.StartsWith('arm')) ">
|
||||
<Message Text="$(CoherentBadge)" />
|
||||
|
||||
<ReplaceFileContents
|
||||
|
@ -32,7 +32,7 @@
|
|||
<VersionBadgeMoniker>$(OSName)_$(Architecture)</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'rhel.6-x64' ">rhel.6_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'alpine.3.6-x64' ">alpine.3.6_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(IslinuxPortable)' == 'true' ">linux_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(IslinuxPortable)' == 'true' ">linux_$(Architecture)</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(IsBuildingAndPublishingAllLinuxDistrosNativeInstallers)' == 'true' ">all_linux_distros_native_installer</VersionBadgeMoniker>
|
||||
|
||||
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="EvaluateRuntimeCoherence"
|
||||
Condition="!$(Architecture.StartsWith('arm'))"
|
||||
DependsOnTargets="ReadAspNetCoreSharedRuntimeVersionFile;
|
||||
CompareRuntimeVersions" />
|
||||
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||
<Clean>False</Clean>
|
||||
<MsbuildArgs>/p:TargetFramework=netstandard1.5</MsbuildArgs>
|
||||
<MsbuildArgs>/p:TargetFramework=netstandard2.0</MsbuildArgs>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.InternalAbstractions">
|
||||
<Name>Microsoft.DotNet.InternalAbstractions</Name>
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -55,7 +55,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{ "linux_x64", false },
|
||||
{ "rhel.6_x64", false },
|
||||
{ "alpine.3.6_x64", false },
|
||||
{ "all_linux_distros_native_installer", false}
|
||||
{ "all_linux_distros_native_installer", false},
|
||||
{ "linux_arm", false}
|
||||
};
|
||||
|
||||
if (!badges.ContainsKey(VersionBadgeMoniker))
|
||||
|
|
14
netci.groovy
14
netci.groovy
|
@ -9,7 +9,7 @@ def project = GithubProject
|
|||
def branch = GithubBranchName
|
||||
def isPR = true
|
||||
|
||||
def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Windows_NT_ES:x64:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'RHEL6:x64:Debug', 'Alpine3.6:x64:Debug']
|
||||
def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Windows_NT_ES:x64:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'RHEL6:x64:Debug', 'Alpine3.6:x64:Debug', 'Linux:arm:Debug']
|
||||
|
||||
def static getBuildJobName(def configuration, def os, def architecture) {
|
||||
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
|
||||
|
@ -44,7 +44,12 @@ set DOTNET_CLI_UI_LANGUAGE=es
|
|||
}
|
||||
else if (os == 'Linux') {
|
||||
osUsedForMachineAffinity = 'Ubuntu16.04';
|
||||
buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --targets Default"
|
||||
if (architecture == 'arm') {
|
||||
buildCommand = "./build.sh --linux-portable --skip-prereqs --architecture ${architecture} --configuration ${configuration} --targets Default /p:CLIBUILD_SKIP_TESTS=true"
|
||||
}
|
||||
else {
|
||||
buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --targets Default"
|
||||
}
|
||||
}
|
||||
else if (os == 'RHEL6') {
|
||||
osUsedForMachineAffinity = 'Ubuntu16.04';
|
||||
|
@ -75,7 +80,10 @@ set DOTNET_CLI_UI_LANGUAGE=es
|
|||
|
||||
Utilities.setMachineAffinity(newJob, osUsedForMachineAffinity, 'latest-or-auto')
|
||||
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
|
||||
Utilities.addMSTestResults(newJob, '**/*.trx')
|
||||
// ARM CI runs are build only.
|
||||
if (architecture != 'arm') {
|
||||
Utilities.addMSTestResults(newJob, '**/*.trx')
|
||||
}
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${architecture} ${configuration} Build")
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ if($Help)
|
|||
Write-Output ""
|
||||
Write-Output "Options:"
|
||||
Write-Output " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||
Write-Output " -Architecture <ARCHITECTURE> Build the specified architecture (x64 or x86 (supported only on Windows), default: x64)"
|
||||
Write-Output " -Architecture <ARCHITECTURE> Build the specified architecture (x64, x86, or arm , default: x64)"
|
||||
Write-Output " -NoPackage Skip packaging targets"
|
||||
Write-Output " -NoBuild Skip building the product"
|
||||
Write-Output " -Help Display this help message"
|
||||
|
@ -82,8 +82,15 @@ $env:VSTEST_TRACE_BUILD=1
|
|||
# install a stage0
|
||||
$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1"
|
||||
|
||||
Write-Output "$dotnetInstallPath -version ""2.2.0-preview1-007799"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
|
||||
Invoke-Expression "$dotnetInstallPath -version ""2.2.0-preview1-007799"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
|
||||
$InstallArchitecture = $Architecture
|
||||
if($Architecture.StartsWith("arm", [StringComparison]::OrdinalIgnoreCase))
|
||||
{
|
||||
$InstallArchitecture = "x64"
|
||||
}
|
||||
|
||||
Write-Output "$dotnetInstallPath -version ""2.2.0-preview1-007799"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$InstallArchitecture"""
|
||||
Invoke-Expression "$dotnetInstallPath -version ""2.2.0-preview1-007799"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$InstallArchitecture"""
|
||||
|
||||
if ($LastExitCode -ne 0)
|
||||
{
|
||||
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
|
||||
|
|
13
run-build.sh
13
run-build.sh
|
@ -96,7 +96,7 @@ while [[ $# > 0 ]]; do
|
|||
;;
|
||||
--linux-portable)
|
||||
LINUX_PORTABLE_INSTALL_ARGS="--runtime-id linux-x64"
|
||||
CUSTOM_BUILD_ARGS="/p:Rid=\"linux-x64\" /p:OSName=\"linux\" /p:IslinuxPortable=\"true\""
|
||||
CUSTOM_BUILD_ARGS="/p:OSName=\"linux\" /p:IslinuxPortable=\"true\""
|
||||
;;
|
||||
--stage0)
|
||||
STAGE0_SOURCE_DIR=$2
|
||||
|
@ -107,7 +107,7 @@ while [[ $# > 0 ]]; do
|
|||
echo ""
|
||||
echo "Options:"
|
||||
echo " --configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||
echo " --architecture <ARCHITECTURE> Build the specified architecture (x64 or x86 (supported only on Windows), default: x64)"
|
||||
echo " --architecture <ARCHITECTURE> Build the specified architecture (x64 or arm , default: x64)"
|
||||
echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install"
|
||||
echo " --nopackage Skip packaging targets"
|
||||
echo " --nobuild Skip building, showing the command that would be used to build"
|
||||
|
@ -140,6 +140,7 @@ done
|
|||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE
|
||||
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||
|
||||
# Disable first run since we want to control all package sources
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
|
||||
# Enable verbose VS Test Console logging
|
||||
|
@ -151,8 +152,14 @@ export VSTEST_TRACE_BUILD=1
|
|||
export DOTNET_MULTILEVEL_LOOKUP=0
|
||||
|
||||
# Install a stage 0
|
||||
INSTALL_ARCHITECTURE=$ARCHITECTURE
|
||||
archlower="$(echo $ARCHITECTURE | awk '{print tolower($0)}')"
|
||||
if [[ $archlower == 'arm'* ]]; then
|
||||
INSTALL_ARCHITECTURE="x64"
|
||||
fi
|
||||
|
||||
if [ "$STAGE0_SOURCE_DIR" == "" ]; then
|
||||
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --version "2.2.0-preview1-007799" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS)
|
||||
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --version "2.2.0-preview1-007799" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$INSTALL_ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS)
|
||||
else
|
||||
echo "Copying bootstrap cli from $STAGE0_SOURCE_DIR"
|
||||
cp -r $STAGE0_SOURCE_DIR/* "$DOTNET_INSTALL_DIR"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Description>SLN file reader/writer</Description>
|
||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||
<TargetFramework>netstandard1.6</TargetFramework>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<DebugType>portable</DebugType>
|
||||
<AssemblyName>Microsoft.DotNet.Cli.Sln.Internal</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="System.Collections.Specialized" Version="4.0.1" />
|
||||
<PackageReference Include="System.Text.RegularExpressions" Version="4.1.0" />
|
||||
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
|
||||
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
|
||||
<PackageReference Include="XliffTasks" Version="$(XliffTasksPackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -2,16 +2,35 @@
|
|||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Utils
|
||||
{
|
||||
public class GracefulException : Exception
|
||||
{
|
||||
public bool IsUserError { get; } = true;
|
||||
public string VerboseMessage { get; } = string.Empty;
|
||||
|
||||
public GracefulException(string message) : base(message)
|
||||
{
|
||||
Data.Add(ExceptionExtensions.CLI_User_Displayed_Exception, true);
|
||||
}
|
||||
|
||||
|
||||
public GracefulException(IEnumerable<string> messages, IEnumerable<string> verboseMessages = null,
|
||||
bool isUserError = true)
|
||||
: base(string.Join(Environment.NewLine, messages))
|
||||
{
|
||||
IsUserError = isUserError;
|
||||
if (verboseMessages != null)
|
||||
{
|
||||
VerboseMessage = string.Join(Environment.NewLine, VerboseMessage);
|
||||
}
|
||||
|
||||
Data.Add(ExceptionExtensions.CLI_User_Displayed_Exception, true);
|
||||
}
|
||||
|
||||
public GracefulException(string format, params string[] args) : this(string.Format(format, args))
|
||||
{
|
||||
}
|
||||
|
|
|
@ -241,6 +241,12 @@
|
|||
<data name="DotNetCommandLineTools" xml:space="preserve">
|
||||
<value>.NET Command Line Tools</value>
|
||||
</data>
|
||||
<data name="DotNetSdkInfoLabel" xml:space="preserve">
|
||||
<value>.NET Core SDK (reflecting any global.json):</value>
|
||||
</data>
|
||||
<data name="DotNetRuntimeInfoLabel" xml:space="preserve">
|
||||
<value>Runtime Environment:</value>
|
||||
</data>
|
||||
<data name="WriteLineForwarderSetPreviously" xml:space="preserve">
|
||||
<value>WriteLine forwarder set previously</value>
|
||||
</data>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Version>$(SdkVersion)</Version>
|
||||
<TargetFrameworks>netstandard1.5;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.5</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
|
||||
<WarningsAsErrors>true</WarningsAsErrors>
|
||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
|
@ -27,11 +27,12 @@
|
|||
<PackageReference Include="XliffTasks" Version="$(XliffTasksPackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
|
||||
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETStandard' ">
|
||||
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
|
||||
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">Spustitelný soubor příkazu {0} se nenašel. Projekt se nepodařilo obnovit nebo jeho obnovení nebylo úspěšné. Spusťte příkaz dotnet restore.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -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">
|
||||
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">Der für "{0}" auszuführende Befehl wurde nicht gefunden. Das Projekt wurde möglicherweise nicht wiederhergestellt, oder bei der Wiederherstellung ist ein Fehler aufgetreten. Führen Sie "dotnet restore" aus.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">No se encontró el comando ejecutable para "{0}". Puede que el proyecto no se haya restaurado o que la restauración no haya tenido éxito. Ejecute "dotnet restore"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">La commande exécutable pour "{0}" est introuvable. Le projet n'a peut-être pas été restauré, ou la restauration n'a pas fonctionné - exécutez 'dotnet restore'</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">L'eseguibile del comando per "{0}" non è stato trovato. È possibile che il progetto non sia stato ripristinato o che il ripristino non sia riuscito. Eseguire `dotnet restore`</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">"{0}" で実行可能なコマンドが見つかりませんでした。プロジェクトが復元されていない可能性があるか、または復元に失敗しました。`dotnet restore` を実行します。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">"{0}"에 대해 실행 가능한 명령을 찾지 못했습니다. 프로젝트가 복원되지 않았거나 복원이 실패했을 수 있습니다. 'dotnet restore'를 실행하세요.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">Nie znaleziono pliku wykonywalnego polecenia dla elementu „{0}”. Projekt mógł nie zostać przywrócony lub przywracanie zakończyło się niepowodzeniem — uruchom polecenie „dotnet restore”</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">O comando executável para "{0}" não foi encontrado. O projeto pode não ter sido restaurado ou a restauração falhou – execute `dotnet restore`</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">Исполняемый файл команды для "{0}" не найден. Возможно, проект не был восстановлен или его восстановление завершилось сбоем. Запустите команду "dotnet restore".</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">"{0}" için komut yürütülebilir dosyası bulunamadı. Proje geri yüklenmemiş veya geri yükleme başarısız olmuş olabilir - `dotnet restore` çalıştırın</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">找不到可为“{0}”执行的命令。可能未还原项目或还原失败 - 运行 `dotnet restore`</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -234,6 +234,16 @@
|
|||
<target state="translated">找不到 "{0}" 的命令可執行檔。該專案可能尚未還原或還原失敗 - 請執行 `dotnet restore`</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetSdkInfoLabel">
|
||||
<source>.NET Core SDK (reflecting any global.json):</source>
|
||||
<target state="new">.NET Core SDK (reflecting any global.json):</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="DotNetRuntimeInfoLabel">
|
||||
<source>Runtime Environment:</source>
|
||||
<target state="new">Runtime Environment:</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -4,25 +4,19 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.PlatformAbstractions;
|
||||
using NuGet.Common;
|
||||
|
||||
namespace Microsoft.DotNet.Configurer
|
||||
{
|
||||
public class CliFolderPathCalculator
|
||||
{
|
||||
// ToolsShimFolderName ToolPackageFolderName cannot be the same
|
||||
// or if the PackageId is the same as CommandName, they will conflict on unix.
|
||||
private const string ToolsShimFolderName = "tools";
|
||||
private const string ToolPackageFolderName = "toolspkgs";
|
||||
private const string DotnetProfileDirectoryName = ".dotnet";
|
||||
private const string ToolsShimFolderName = "tools";
|
||||
|
||||
public string CliFallbackFolderPath => Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_FALLBACKFOLDER") ??
|
||||
Path.Combine(new DirectoryInfo(AppContext.BaseDirectory).Parent.FullName, "NuGetFallbackFolder");
|
||||
|
||||
public string ToolsShimPath => Path.Combine(DotnetUserProfileFolderPath, ToolsShimFolderName);
|
||||
public string ToolsPackagePath => Path.Combine(DotnetUserProfileFolderPath, ToolPackageFolderName);
|
||||
public string ToolsPackagePath => ToolPackageFolderPathCalculator.GetToolPackageFolderPath(ToolsShimPath);
|
||||
public BashPathUnderHomeDirectory ToolsShimPathInUnix
|
||||
{
|
||||
get
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||
<TargetFramework>netstandard1.5</TargetFramework>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<WarningsAsErrors>true</WarningsAsErrors>
|
||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
|
|
|
@ -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.IO;
|
||||
|
||||
namespace Microsoft.DotNet.Configurer
|
||||
{
|
||||
public static class ToolPackageFolderPathCalculator
|
||||
{
|
||||
private const string NestedToolPackageFolderName = ".store";
|
||||
public static string GetToolPackageFolderPath(string toolsShimPath)
|
||||
{
|
||||
return Path.Combine(toolsShimPath, NestedToolPackageFolderName);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -64,9 +64,11 @@ Tuto chybu můžete opravit pomocí některé z těchto možností:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Nainstaloval se vývojový certifikát ASP.NET Core HTTPS. Další informace najdete na https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
Úspěšně se podařilo nainstalovat certifikát pro vývoj ASP.NET Core HTTPS Development Certificate.
|
||||
Pokud chcete certifikátu důvěřovat (platí jenom pro Windows a macOS), nainstalujte nejprve nástroj dev-certs. To uděláte tak, že spustíte dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final a potom dotnet-dev-certs https --trust.
|
||||
Další informace o konfiguraci protokolu HTTPS najdete na webu https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Im Folgenden finden Sie einige Optionen, um diesen Fehler zu beheben:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Installiertes ASP.NET Core-HTTPS-Entwicklungszertifikat. Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
Das ASP.NET Core-HTTPS-Entwicklungszertifikat wurde erfolgreich installiert.
|
||||
Um dem Zertifikat zu vertrauen (nur Windows und macOS), installieren Sie zuerst das Tool "dev-certs", indem Sie "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" und anschließend "dotnet-dev-certs https --trust" ausführen.
|
||||
Weitere Informationen zur Konfiguration von HTTPS finden Sie unter https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -63,9 +63,11 @@ Estas son algunas opciones para corregir este error:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Se instaló el certificado de desarrollo HTTPS de ASP.NET Core. Para más información, vaya a https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
El certificado de desarrollo HTTPS de ASP.NET Core se ha instalado correctamente.
|
||||
Para confiar en el certificado (solo Windows y macOS), instale primero la herramienta dev-certs ejecutando "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" y, después, ejecute "dotnet-dev-certs https --trust".
|
||||
Para obtener más información sobre la configuración HTTPS, vea https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Voici quelques options pour corriger cette erreur :
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Certificat de développement HTTPS ASP.NET Core installé. Pour plus d’informations, accédez à https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
Le certificat de développement ASP.NET Core HTTPS a été installé.
|
||||
Pour approuver le certificat (Windows et macOS uniquement), installez d'abord l'outil dev-certs en exécutant 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final', puis exécutez 'dotnet-dev-certs https --trust'.
|
||||
Pour plus d'informations sur la configuration de HTTPS, consultez https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Ecco alcune opzioni per correggere questo errore:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Il certificato di sviluppo HTTPS di ASP.NET Core è stato installato. Per altre informazioni, vedere https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
Il certificato di sviluppo HTTPS di ASP.NET Core è stato installato.
|
||||
Per considerare attendibile il certificato (solo Windows e macOS), installare prima lo strumento dev-certs eseguendo 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' e quindi eseguire 'dotnet-dev-certs https --trust'.
|
||||
Per altre informazioni sulla configurazione di HTTPS, vedere https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Here are some options to fix this error:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
ASP.NET Core HTTPS 開発証明書をインストールしました。詳しくは、https://go.microsoft.com/fwlink/?linkid=84805 をご覧ください</target>
|
||||
ASP.NET Core HTTPS 開発証明書が正常にインストールされました。
|
||||
証明書を信頼する (Windows および macOS のみ) には、まず 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' を実行して dev-certs ツールをインストールし、次に 'dotnet-dev-certs https --trust' を実行します。
|
||||
HTTPS を構成する方法の詳細については、https://go.microsoft.com/fwlink/?linkid=848054 をご覧ください。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -15,12 +15,12 @@ The .NET Core tools collect usage data in order to help us improve your experien
|
|||
Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry</source>
|
||||
<target state="translated">.NET Core를 시작합니다.
|
||||
---------------------
|
||||
.NET Core에 대한 자세한 내용은 https://aka.ms/dotnet-docs를 참조하세요. 사용 가능한 명령을 보려면 ‘dotnet --help’를 사용하거나 https://aka.ms/dotnet-cli-docs를 방문하세요.
|
||||
.NET Core에 대한 자세한 내용은 https://aka.ms/dotnet-docs를 참조하세요. 사용 가능한 명령을 보려면 'dotnet --help'를 사용하거나 https://aka.ms/dotnet-cli-docs를 방문하세요.
|
||||
|
||||
원격 분석
|
||||
---------
|
||||
.NET Core 도구는 사용자 환경 개선을 위해 사용량 데이터를 수집합니다. 데이터는 익명이며 명령줄 인수를 포함하지 않습니다. Microsoft에서 데이터를 수집하여 커뮤니티와 공유합니다.
|
||||
자주 사용하는 셸에서 DOTNET_CLI_TELEMETRY_OPTOUT 환경 변수를 ‘1’ 또는 'true'로 설정하여 원격 분석을 옵트아웃할 수 있습니다.
|
||||
자주 사용하는 셸에서 DOTNET_CLI_TELEMETRY_OPTOUT 환경 변수를 '1' 또는 'true'로 설정하여 원격 분석을 옵트아웃할 수 있습니다.
|
||||
|
||||
.NET Core CLI 도구 원격 분석에 대한 자세한 내용은 https://aka.ms/dotnet-cli-telemetry에서 확인할 수 있습니다.</target>
|
||||
<note />
|
||||
|
@ -64,9 +64,11 @@ Here are some options to fix this error:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
설치된 ASP.NET Core HTTPS 개발 인증서. 자세한 내용은 https://go.microsoft.com/fwlink/?linkid=84805을(를) 참조하세요.</target>
|
||||
ASP.NET Core HTTPS 개발 인증서를 설치했습니다.
|
||||
인증서를 신뢰하려면(Windows 및 macOS만 해당) 먼저 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final'을 실행하여 dev-certs 도구를 설치한 다음, 'dotnet-dev-certs https --trust'를 실행하세요.
|
||||
HTTPS 구성에 대한 자세한 내용은 https://go.microsoft.com/fwlink/?linkid=848054를 참조하세요.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Oto kilka opcji naprawiania tego błędu:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Zainstalowany certyfikat programistyczny HTTPS ASP.NET Core. Aby uzyskać więcej informacji, przejdź na adres https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
Pomyślnie zainstalowano certyfikat deweloperski protokołu HTTPS programu ASP.NET Core.
|
||||
Aby ufać temu certyfikatowi (dotyczy tylko systemów Windows i macOS), najpierw zainstaluj narzędzie dev-certs, uruchamiając polecenie „dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final”, a następnie uruchom polecenie „dotnet-dev-certs https --trust”.
|
||||
Aby uzyskać więcej informacji dotyczących konfigurowania protokołu HTTPS, zobacz https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Aqui estão algumas opções para corrigir este erro:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Certificado de desenvolvimento de HTTPS do ASP.NET Core instalado. Para obter mais informações, vá para https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
Certificado de Desenvolvimento HTTPS ASP.NET Core instalado com êxito.
|
||||
Para confiar no certificado (apenas Windows e macOS), primeiramente instale a ferramenta dev-certs executando ‘dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final’ e, em seguida, execute ‘dotnet-dev-certs https --trust’.
|
||||
Para saber mais sobre configuração de HTTPS, acesse https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Here are some options to fix this error:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
Установлен сертификат для HTTPS-разработки на ASP.NET Core. Дополнительные сведения: https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
Сертификат разработки HTTPS для ASP.NET Core установлен.
|
||||
Чтобы сделать сертификат доверенным (только Windows и macOS), сначала установите инструмент dev-certs, выполнив команду "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final", а затем выполните "dotnet-dev-certs https --trust".
|
||||
Дополнительные сведения о настройке HTTPS: https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Bu hatayı düzeltmek için bazı seçenekler:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
ASP.NET Core HTTPS geliştirme sertifikası yüklendi. Daha fazla bilgi için bkz. https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
ASP.NET Core HTTPS Geliştirme Sertifikası başarıyla yüklendi.
|
||||
Sertifikaya güvenmek için (yalnızca Windows ve macOS) önce 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final', sonra 'dotnet-dev-certs https --trust' komutlarını çalıştırarak dev-certs aracını yükleyin.
|
||||
HTTPS yapılandırması hakkında daha fazla bilgi için bkz. https://go.microsoft.com/fwlink/?linkid=848054.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Here are some options to fix this error:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
安装 ASP.NET Core HTTPS 开发证书。有关详细信息,请转到 https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
已成功安装 ASP.NET Core HTTPS 开发证书。
|
||||
要信任证书(仅限 Windows 和 macOS),请首先通过运行 "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" 安装 dev-certs 工具,然后运行 "dotnet-dev-certs https --trust"。
|
||||
有关配置 HTTPS 的详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=848054。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -64,9 +64,11 @@ Here are some options to fix this error:
|
|||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
|
||||
<target state="needs-review-translation">ASP.NET Core
|
||||
<target state="translated">ASP.NET Core
|
||||
------------
|
||||
已安裝 ASP.NET Core HTTPS 開發憑證。如需詳細資訊,請前往 https://go.microsoft.com/fwlink/?linkid=84805</target>
|
||||
已成功安裝 ASP.NET Core HTTPS 開發憑證。
|
||||
若要信任此憑證 (僅限 Windows 與 macOS),請先執行 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' 安裝 dev-certs 工具,然後再執行 'dotnet-dev-certs https --trust'。
|
||||
如需如何設定 HTTPS 的詳細資訊,請參閱 https://go.microsoft.com/fwlink/?linkid=848054。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
|
|
|
@ -34,6 +34,11 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
return $"\"{Value}\"";
|
||||
}
|
||||
|
||||
public string ToXmlEncodeString()
|
||||
{
|
||||
return System.Net.WebUtility.HtmlEncode(Value);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return ToQuotedString();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
|
||||
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETStandard' ">
|
||||
<PackageReference Include="System.AppContext" Version="4.1.0" />
|
||||
<PackageReference Include="System.Collections" Version="4.0.11" />
|
||||
<PackageReference Include="System.IO" Version="4.1.0" />
|
||||
|
|
|
@ -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")]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// The netstandard1.5 adaptation here acts a proof-of-concept for cross-platform
|
||||
// portability of the underlying hostfxr API and gives us build and test coverage
|
||||
// on non-Windows machines. It also ships with msbuild on Mono.
|
||||
#if NETSTANDARD1_5
|
||||
#if NETSTANDARD2_0
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -50,4 +50,4 @@ namespace Microsoft.DotNet.MSBuildSdkResolver
|
|||
}
|
||||
}
|
||||
|
||||
#endif // NETSTANDARD1_5
|
||||
#endif // NETSTANDARD2_0
|
||||
|
|
|
@ -176,7 +176,7 @@ namespace Microsoft.DotNet.MSBuildSdkResolver
|
|||
var environmentProvider = new EnvironmentProvider(_getEnvironmentVariable);
|
||||
var dotnetExe = environmentProvider.GetCommandPath("dotnet");
|
||||
|
||||
#if NETSTANDARD1_5
|
||||
#if NETSTANDARD2_0
|
||||
if (dotnetExe != null && !Interop.RunningOnWindows)
|
||||
{
|
||||
// e.g. on Linux the 'dotnet' command from PATH is a symlink so we need to
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Version>$(SdkVersion)</Version>
|
||||
<TargetFrameworks>netstandard1.5;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard1.5</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFrameworks>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
|
||||
<WarningsAsErrors>true</WarningsAsErrors>
|
||||
|
@ -19,11 +19,16 @@
|
|||
<PackageReference Include="Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.5'">
|
||||
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
|
||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
|
||||
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ResolveHostfxrCopyLocalContent" Condition="'$(TargetFramework)' == 'net46'" DependsOnTargets="RunResolvePackageDependencies" BeforeTargets="AssignTargetPaths">
|
||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ResolveHostfxrCopyLocalContent" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" DependsOnTargets="RunResolvePackageDependencies" BeforeTargets="AssignTargetPaths">
|
||||
<ItemGroup>
|
||||
<Content Include="@(FileDefinitions->'%(ResolvedPath)')" Condition="'%(FileDefinitions.Path)' == 'runtimes/win-x86/native/hostfxr.dll'">
|
||||
<Link>x86/hostfxr.dll</Link>
|
||||
|
|
|
@ -18,9 +18,11 @@ 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;
|
||||
using Microsoft.DotNet.Tools.Update;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
|
@ -149,6 +151,14 @@ namespace Microsoft.DotNet.Cli
|
|||
{
|
||||
Command = InstallCommand.Run
|
||||
},
|
||||
["uninstall"] = new BuiltInCommandMetadata
|
||||
{
|
||||
Command = UninstallCommand.Run
|
||||
},
|
||||
["update"] = new BuiltInCommandMetadata
|
||||
{
|
||||
Command = UpdateCommand.Run
|
||||
},
|
||||
["internal-reportinstallsuccess"] = new BuiltInCommandMetadata
|
||||
{
|
||||
Command = InternalReportinstallsuccess.Run
|
||||
|
|
|
@ -520,74 +520,112 @@
|
|||
<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 << EOF >> ~/.bash_profile
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</value>
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathLinuxNeedLogout" xml:space="preserve">
|
||||
<value>Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathOSXManualInstruction" xml:space="preserve">
|
||||
<value>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
If you are using bash, You can do this by running the following command:
|
||||
<data name="EnvironmentPathOSXManualInstructions" xml:space="preserve">
|
||||
<value>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
If you are using bash, you can add it to your profile by running the following command:
|
||||
|
||||
cat << EOF >> ~/.bash_profile
|
||||
cat << \EOF >> ~/.bash_profile
|
||||
# Add .NET Core SDK tools
|
||||
export PATH="$PATH:{1}"
|
||||
EOF</value>
|
||||
export PATH="$PATH:{0}"
|
||||
EOF
|
||||
|
||||
You can add it to the current session by running the following command:
|
||||
|
||||
export PATH="$PATH:{0}"
|
||||
</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathOSXNeedReopen" xml:space="preserve">
|
||||
<value>Since you just installed the .NET Core SDK, you will need to reopen terminal before running the tool you installed.</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathWindowsManualInstruction" xml:space="preserve">
|
||||
<value>Cannot find the tools executable path. Please ensure {0} is added to your PATH.
|
||||
You can do this by running the following command:
|
||||
<data name="EnvironmentPathWindowsManualInstructions" xml:space="preserve">
|
||||
<value>Tools directory '{0}' is not currently on the PATH environment variable.
|
||||
|
||||
setx PATH "%PATH%;{1}"</value>
|
||||
You can add the directory to the PATH by running the following command:
|
||||
|
||||
setx PATH "%PATH%;{0}"
|
||||
</value>
|
||||
</data>
|
||||
<data name="EnvironmentPathWindowsNeedReopen" xml:space="preserve">
|
||||
<value>Since you just installed the .NET Core SDK, you will need to reopen the Command Prompt window before running the tool you installed.</value>
|
||||
</data>
|
||||
<data name="FailInstallToolPermission" xml:space="preserve">
|
||||
<value>Failed to change permission:
|
||||
Error: {0}
|
||||
Output: {1}</value>
|
||||
<data name="FailedToCreateShellShim" xml:space="preserve">
|
||||
<value>Failed to create tool shim for command '{0}': {1}</value>
|
||||
</data>
|
||||
<data name="FailInstallToolSameName" xml:space="preserve">
|
||||
<value>Failed to install tool {0}. A command with the same name already exists.</value>
|
||||
<data name="FailedToRemoveShellShim" xml:space="preserve">
|
||||
<value>Failed to remove tool shim for command '{0}': {1}</value>
|
||||
</data>
|
||||
<data name="ToolPackageMissingEntryPointFile" xml:space="preserve">
|
||||
<value>Package '{0}' is missing entry point file {1}.</value>
|
||||
<data name="FailedSettingShimPermissions" xml:space="preserve">
|
||||
<value>Failed to set user executable permissions for shell shim: {0}</value>
|
||||
</data>
|
||||
<data name="ToolPackageMissingSettingsFile" xml:space="preserve">
|
||||
<value>Package '{0}' is missing tool settings file DotnetToolSettings.xml.</value>
|
||||
<data name="FailedToInstallToolPackage" xml:space="preserve">
|
||||
<value>Failed to install tool package '{0}': {1}</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="FailedToUninstallToolPackage" xml:space="preserve">
|
||||
<value>Failed to uninstall tool package '{0}': {1}</value>
|
||||
</data>
|
||||
<data name="MissingToolEntryPointFile" xml:space="preserve">
|
||||
<value>Entry point file '{0}' for command '{1}' was not found in the package.</value>
|
||||
</data>
|
||||
<data name="MissingToolSettingsFile" xml:space="preserve">
|
||||
<value>Settings file 'DotnetToolSettings.xml' was not found in the package.</value>
|
||||
</data>
|
||||
<data name="ToolPackageConflictPackageId" xml:space="preserve">
|
||||
<value>Tool '{0}' (version '{1}') is already installed.</value>
|
||||
</data>
|
||||
<data name="FailedToFindStagedToolPackage" xml:space="preserve">
|
||||
<value>Failed to find staged tool package '{0}'.</value>
|
||||
</data>
|
||||
<data name="ColumnMaxWidthMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>Column maximum width must be greater than zero.</value>
|
||||
</data>
|
||||
<data name="ToolSettingsInvalidLeadingDotCommandName" xml:space="preserve">
|
||||
<value>Command '{0}' has a leading dot.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -42,19 +42,26 @@ namespace Microsoft.DotNet.Cli
|
|||
}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
return ReportError(CommonLocalizableStrings.RequiredCommandNotPassed);
|
||||
Reporter.Error.WriteLine(CommonLocalizableStrings.RequiredCommandNotPassed.Red());
|
||||
ParseResult.ShowHelp();
|
||||
return 1;
|
||||
}
|
||||
catch (GracefulException e)
|
||||
{
|
||||
return ReportError(e.Message);
|
||||
if (Reporter.IsVerbose)
|
||||
{
|
||||
Reporter.Error.WriteLine(e.VerboseMessage.Red());
|
||||
}
|
||||
|
||||
Reporter.Error.WriteLine(e.Message.Red());
|
||||
|
||||
if (e.IsUserError)
|
||||
{
|
||||
ParseResult.ShowHelp();
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
private int ReportError(string errorMessage)
|
||||
{
|
||||
Reporter.Error.WriteLine(errorMessage.Red());
|
||||
ParseResult.ShowHelp();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,8 @@ namespace Microsoft.DotNet.Cli
|
|||
CompleteCommandParser.Complete(),
|
||||
InternalReportinstallsuccessCommandParser.InternalReportinstallsuccess(),
|
||||
InstallCommandParser.Install(),
|
||||
UninstallCommandParser.Uninstall(),
|
||||
UpdateCommandParser.Update(),
|
||||
CommonOptions.HelpOption(),
|
||||
Create.Option("--info", ""),
|
||||
Create.Option("-d", ""),
|
||||
|
|
226
src/dotnet/PrintableTable.cs
Normal file
226
src/dotnet/PrintableTable.cs
Normal file
|
@ -0,0 +1,226 @@
|
|||
// 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.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.DotNet.Tools;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
// Represents a table (with rows of type T) that can be printed to a terminal.
|
||||
internal class PrintableTable<T>
|
||||
{
|
||||
private const string ColumnDelimiter = " ";
|
||||
private List<Column> _columns = new List<Column>();
|
||||
|
||||
private class Column
|
||||
{
|
||||
public string Header { get; set; }
|
||||
public Func<T, string> GetContent { get; set; }
|
||||
public int MaxWidth { get; set; }
|
||||
public override string ToString() { return Header; }
|
||||
}
|
||||
|
||||
public void AddColumn(string header, Func<T, string> getContent, int maxWidth = int.MaxValue)
|
||||
{
|
||||
if (getContent == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(getContent));
|
||||
}
|
||||
|
||||
if (maxWidth <= 0)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
CommonLocalizableStrings.ColumnMaxWidthMustBeGreaterThanZero,
|
||||
nameof(maxWidth));
|
||||
}
|
||||
|
||||
_columns.Add(
|
||||
new Column() {
|
||||
Header = header,
|
||||
GetContent = getContent,
|
||||
MaxWidth = maxWidth
|
||||
});
|
||||
}
|
||||
|
||||
public void PrintRows(IEnumerable<T> rows, Action<string> writeLine)
|
||||
{
|
||||
if (rows == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(rows));
|
||||
}
|
||||
|
||||
if (writeLine == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(writeLine));
|
||||
}
|
||||
|
||||
var widths = CalculateColumnWidths(rows);
|
||||
var totalWidth = CalculateTotalWidth(widths);
|
||||
if (totalWidth == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var line in EnumerateHeaderLines(widths))
|
||||
{
|
||||
writeLine(line);
|
||||
}
|
||||
|
||||
writeLine(new string('-', totalWidth));
|
||||
|
||||
foreach (var row in rows)
|
||||
{
|
||||
foreach (var line in EnumerateRowLines(row, widths))
|
||||
{
|
||||
writeLine(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int CalculateWidth(IEnumerable<T> rows)
|
||||
{
|
||||
if (rows == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(rows));
|
||||
}
|
||||
|
||||
return CalculateTotalWidth(CalculateColumnWidths(rows));
|
||||
}
|
||||
|
||||
private IEnumerable<string> EnumerateHeaderLines(int[] widths)
|
||||
{
|
||||
if (_columns.Count != widths.Length)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
return EnumerateLines(
|
||||
widths,
|
||||
_columns.Select(c => new StringInfo(c.Header ?? "")).ToArray());
|
||||
}
|
||||
|
||||
private IEnumerable<string> EnumerateRowLines(T row, int[] widths)
|
||||
{
|
||||
if (_columns.Count != widths.Length)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
return EnumerateLines(
|
||||
widths,
|
||||
_columns.Select(c => new StringInfo(c.GetContent(row) ?? "")).ToArray());
|
||||
}
|
||||
|
||||
private static IEnumerable<string> EnumerateLines(int[] widths, StringInfo[] contents)
|
||||
{
|
||||
if (widths.Length != contents.Length)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
if (contents.Length == 0)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
var builder = new StringBuilder();
|
||||
for (int line = 0; true; ++line)
|
||||
{
|
||||
builder.Clear();
|
||||
|
||||
bool emptyLine = true;
|
||||
bool appendDelimiter = false;
|
||||
for (int i = 0; i < contents.Length; ++i)
|
||||
{
|
||||
// Skip zero-width columns entirely
|
||||
if (widths[i] == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (appendDelimiter)
|
||||
{
|
||||
builder.Append(ColumnDelimiter);
|
||||
}
|
||||
|
||||
var startIndex = line * widths[i];
|
||||
var length = contents[i].LengthInTextElements;
|
||||
if (startIndex < length)
|
||||
{
|
||||
var endIndex = (line + 1) * widths[i];
|
||||
length = endIndex >= length ? length - startIndex : widths[i];
|
||||
builder.Append(contents[i].SubstringByTextElements(startIndex, length));
|
||||
builder.Append(' ', widths[i] - length);
|
||||
emptyLine = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No more content for this column; append whitespace to fill remaining space
|
||||
builder.Append(' ', widths[i]);
|
||||
}
|
||||
|
||||
appendDelimiter = true;
|
||||
}
|
||||
|
||||
if (emptyLine)
|
||||
{
|
||||
// Yield an "empty" line on the first line only
|
||||
if (line == 0)
|
||||
{
|
||||
yield return builder.ToString();
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return builder.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private int[] CalculateColumnWidths(IEnumerable<T> rows)
|
||||
{
|
||||
return _columns
|
||||
.Select(c => {
|
||||
var width = new StringInfo(c.Header ?? "").LengthInTextElements;
|
||||
|
||||
foreach (var row in rows)
|
||||
{
|
||||
width = Math.Max(
|
||||
width,
|
||||
new StringInfo(c.GetContent(row) ?? "").LengthInTextElements);
|
||||
}
|
||||
|
||||
return Math.Min(width, c.MaxWidth);
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
private static int CalculateTotalWidth(int[] widths)
|
||||
{
|
||||
int sum = 0;
|
||||
int count = 0;
|
||||
|
||||
foreach (var width in widths)
|
||||
{
|
||||
if (width == 0)
|
||||
{
|
||||
// Skip zero-width columns
|
||||
continue;
|
||||
}
|
||||
|
||||
sum += width;
|
||||
++count;
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sum + (ColumnDelimiter.Length * (count - 1));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@ using Microsoft.Extensions.EnvironmentAbstractions;
|
|||
using NuGet.Frameworks;
|
||||
using Command = Microsoft.DotNet.Cli.Utils.Command;
|
||||
using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment;
|
||||
using LocalizableStrings = Microsoft.DotNet.Cli.Utils.LocalizableStrings;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
|
@ -260,16 +261,13 @@ namespace Microsoft.DotNet.Cli
|
|||
|
||||
private static void PrintInfo()
|
||||
{
|
||||
HelpCommand.PrintVersionHeader();
|
||||
|
||||
DotnetVersionFile versionFile = DotnetFiles.VersionFileObject;
|
||||
var commitSha = versionFile.CommitSha ?? "N/A";
|
||||
Reporter.Output.WriteLine($"{LocalizableStrings.DotNetSdkInfoLabel}");
|
||||
Reporter.Output.WriteLine($" Version: {Product.Version}");
|
||||
Reporter.Output.WriteLine($" Commit: {commitSha}");
|
||||
Reporter.Output.WriteLine();
|
||||
Reporter.Output.WriteLine("Product Information:");
|
||||
Reporter.Output.WriteLine($" Version: {Product.Version}");
|
||||
Reporter.Output.WriteLine($" Commit SHA-1 hash: {commitSha}");
|
||||
Reporter.Output.WriteLine();
|
||||
Reporter.Output.WriteLine("Runtime Environment:");
|
||||
Reporter.Output.WriteLine($"{LocalizableStrings.DotNetRuntimeInfoLabel}");
|
||||
Reporter.Output.WriteLine($" OS Name: {RuntimeEnvironment.OperatingSystem}");
|
||||
Reporter.Output.WriteLine($" OS Version: {RuntimeEnvironment.OperatingSystemVersion}");
|
||||
Reporter.Output.WriteLine($" OS Platform: {RuntimeEnvironment.OperatingSystemPlatform}");
|
||||
|
|
|
@ -17,5 +17,8 @@ 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")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
|
||||
|
|
|
@ -9,7 +9,7 @@ using Microsoft.DotNet.Cli.Utils;
|
|||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
public class DoNothingEnvironmentPath : IEnvironmentPath
|
||||
internal class DoNothingEnvironmentPath : IEnvironmentPath
|
||||
{
|
||||
public void AddPackageExecutablePathToUserPath()
|
||||
{
|
||||
|
|
|
@ -1,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);
|
||||
}
|
||||
}
|
|
@ -75,8 +75,8 @@ namespace Microsoft.DotNet.ShellShim
|
|||
// similar to https://code.visualstudio.com/docs/setup/mac
|
||||
_reporter.WriteLine(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.EnvironmentPathLinuxManualInstruction,
|
||||
_packageExecutablePath.Path, _packageExecutablePath.Path));
|
||||
CommonLocalizableStrings.EnvironmentPathLinuxManualInstructions,
|
||||
_packageExecutablePath.Path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,8 +75,8 @@ namespace Microsoft.DotNet.ShellShim
|
|||
// similar to https://code.visualstudio.com/docs/setup/mac
|
||||
_reporter.WriteLine(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.EnvironmentPathOSXManualInstruction,
|
||||
_packageExecutablePath.Path, _packageExecutablePath.Path));
|
||||
CommonLocalizableStrings.EnvironmentPathOSXManualInstructions,
|
||||
_packageExecutablePath.Path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
22
src/dotnet/ShellShim/ShellShimException.cs
Normal file
22
src/dotnet/ShellShim/ShellShimException.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
internal class ShellShimException : Exception
|
||||
{
|
||||
public ShellShimException()
|
||||
{
|
||||
}
|
||||
|
||||
public ShellShimException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public ShellShimException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
213
src/dotnet/ShellShim/ShellShimRepository.cs
Normal file
213
src/dotnet/ShellShim/ShellShimRepository.cs
Normal file
|
@ -0,0 +1,213 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Tools;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
internal class ShellShimRepository : IShellShimRepository
|
||||
{
|
||||
private const string LauncherExeResourceName = "Microsoft.DotNet.Tools.Launcher.Executable";
|
||||
private const string LauncherConfigResourceName = "Microsoft.DotNet.Tools.Launcher.Config";
|
||||
|
||||
private readonly DirectoryPath _shimsDirectory;
|
||||
|
||||
public ShellShimRepository(DirectoryPath shimsDirectory)
|
||||
{
|
||||
_shimsDirectory = shimsDirectory;
|
||||
}
|
||||
|
||||
public void CreateShim(FilePath targetExecutablePath, string commandName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(targetExecutablePath.Value))
|
||||
{
|
||||
throw new ShellShimException(CommonLocalizableStrings.CannotCreateShimForEmptyExecutablePath);
|
||||
}
|
||||
if (string.IsNullOrEmpty(commandName))
|
||||
{
|
||||
throw new ShellShimException(CommonLocalizableStrings.CannotCreateShimForEmptyCommand);
|
||||
}
|
||||
|
||||
if (ShimExists(commandName))
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.ShellShimConflict,
|
||||
commandName));
|
||||
}
|
||||
|
||||
TransactionalAction.Run(
|
||||
action: () => {
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(_shimsDirectory.Value))
|
||||
{
|
||||
Directory.CreateDirectory(_shimsDirectory.Value);
|
||||
}
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
CreateConfigFile(
|
||||
outputPath: GetWindowsConfigPath(commandName),
|
||||
entryPoint: targetExecutablePath,
|
||||
runner: "dotnet");
|
||||
|
||||
using (var shim = File.Create(GetWindowsShimPath(commandName).Value))
|
||||
using (var resource = typeof(ShellShimRepository).Assembly.GetManifestResourceStream(LauncherExeResourceName))
|
||||
{
|
||||
resource.CopyTo(shim);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var script = new StringBuilder();
|
||||
script.AppendLine("#!/bin/sh");
|
||||
script.AppendLine($"dotnet {targetExecutablePath.ToQuotedString()} \"$@\"");
|
||||
|
||||
var shimPath = GetPosixShimPath(commandName);
|
||||
File.WriteAllText(shimPath.Value, script.ToString());
|
||||
|
||||
SetUserExecutionPermission(shimPath);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToCreateShellShim,
|
||||
commandName,
|
||||
ex.Message
|
||||
),
|
||||
ex);
|
||||
}
|
||||
},
|
||||
rollback: () => {
|
||||
foreach (var file in GetShimFiles(commandName).Where(f => File.Exists(f.Value)))
|
||||
{
|
||||
File.Delete(file.Value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void RemoveShim(string commandName)
|
||||
{
|
||||
var files = new Dictionary<string, string>();
|
||||
TransactionalAction.Run(
|
||||
action: () => {
|
||||
try
|
||||
{
|
||||
foreach (var file in GetShimFiles(commandName).Where(f => File.Exists(f.Value)))
|
||||
{
|
||||
var tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
|
||||
File.Move(file.Value, tempPath);
|
||||
files[file.Value] = tempPath;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(
|
||||
CommonLocalizableStrings.FailedToRemoveShellShim,
|
||||
commandName,
|
||||
ex.Message
|
||||
),
|
||||
ex);
|
||||
}
|
||||
},
|
||||
commit: () => {
|
||||
foreach (var value in files.Values)
|
||||
{
|
||||
File.Delete(value);
|
||||
}
|
||||
},
|
||||
rollback: () => {
|
||||
foreach (var kvp in files)
|
||||
{
|
||||
File.Move(kvp.Value, kvp.Key);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
internal void CreateConfigFile(FilePath outputPath, FilePath entryPoint, string runner)
|
||||
{
|
||||
XDocument config;
|
||||
using (var resource = typeof(ShellShimRepository).Assembly.GetManifestResourceStream(LauncherConfigResourceName))
|
||||
{
|
||||
config = XDocument.Load(resource);
|
||||
}
|
||||
|
||||
var appSettings = config.Descendants("appSettings").First();
|
||||
appSettings.Add(new XElement("add", new XAttribute("key", "entryPoint"), new XAttribute("value", entryPoint.Value)));
|
||||
appSettings.Add(new XElement("add", new XAttribute("key", "runner"), new XAttribute("value", runner ?? string.Empty)));
|
||||
config.Save(outputPath.Value);
|
||||
}
|
||||
|
||||
private bool ShimExists(string commandName)
|
||||
{
|
||||
return GetShimFiles(commandName).Any(p => File.Exists(p.Value));
|
||||
}
|
||||
|
||||
private IEnumerable<FilePath> GetShimFiles(string commandName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(commandName))
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
yield return GetWindowsShimPath(commandName);
|
||||
yield return GetWindowsConfigPath(commandName);
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return GetPosixShimPath(commandName);
|
||||
}
|
||||
}
|
||||
|
||||
private FilePath GetPosixShimPath(string commandName)
|
||||
{
|
||||
return _shimsDirectory.WithFile(commandName);
|
||||
}
|
||||
|
||||
private FilePath GetWindowsShimPath(string commandName)
|
||||
{
|
||||
return new FilePath(_shimsDirectory.WithFile(commandName).Value + ".exe");
|
||||
}
|
||||
|
||||
private FilePath GetWindowsConfigPath(string commandName)
|
||||
{
|
||||
return new FilePath(GetWindowsShimPath(commandName).Value + ".config");
|
||||
}
|
||||
|
||||
private static void SetUserExecutionPermission(FilePath path)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CommandResult result = new CommandFactory()
|
||||
.Create("chmod", new[] { "u+x", path.Value })
|
||||
.CaptureStdOut()
|
||||
.CaptureStdErr()
|
||||
.Execute();
|
||||
|
||||
if (result.ExitCode != 0)
|
||||
{
|
||||
throw new ShellShimException(
|
||||
string.Format(CommonLocalizableStrings.FailedSettingShimPermissions, result.StdErr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
src/dotnet/ShellShim/ShellShimRepositoryFactory.cs
Normal file
22
src/dotnet/ShellShim/ShellShimRepositoryFactory.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Microsoft.DotNet.Configurer;
|
||||
using Microsoft.Extensions.EnvironmentAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.ShellShim
|
||||
{
|
||||
internal static class ShellShimRepositoryFactory
|
||||
{
|
||||
public static IShellShimRepository CreateShellShimRepository(DirectoryPath? nonGlobalLocation = null)
|
||||
{
|
||||
return new ShellShimRepository(nonGlobalLocation ?? GetShimLocation());
|
||||
}
|
||||
|
||||
private static DirectoryPath GetShimLocation()
|
||||
{
|
||||
var cliFolderPathCalculator = new CliFolderPathCalculator();
|
||||
return new DirectoryPath(cliFolderPathCalculator.ToolsShimPath);
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue