diff --git a/Documentation/specs/cli-installation-scenarios.md b/Documentation/specs/cli-installation-scenarios.md index 49be32fd6..16182c234 100644 --- a/Documentation/specs/cli-installation-scenarios.md +++ b/Documentation/specs/cli-installation-scenarios.md @@ -17,8 +17,6 @@ Obtaining .NET CLI * [Acquisition modes](#acquisition-modes) * [Native installers](#native-installers) * [Installation script](#installation-script) - * [Windows one-liner](#windows-command) - * [OSX/Linux one-liner](#osxlinux-shell-command) * [Complete manual installation](#complete-manual-installation) * [Docker](#docker) * [NuGet Packages](#nuget-packages) @@ -113,28 +111,17 @@ A list of dependencies can be found on [dependency list](TBD). ## Channels Channels represent a way for users who are getting the CLI to reason about the stability and quality of the bits they are getting. This is one more way for the user to be fully aware of the state the bits that are being installed are in and to set proper expectations on first use. -The table below outlines the channels: - -| Property | Description | +| Channel | Description | |------------------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Future | Unstable bits that are "bleeding edge". Users are not expected to use this channel often, however it is there for those situations when someone needs/wants a feature that hasn't been stabilizied yet. Also, used for internal testing. | -| Preview | Pre-release stable builds with known issues and/or known feature gaps. We are OK with users installing these for preview purposes. | -| Production | Actual releases. Most users are encouraged to install these. | - -Below table shows the mapping between the channels, branches and feeds for the Debian pacakage. Since channels also impact the NuGet packages, it also contains the version of the package used and the feed to opt in to each channel. - -| Channel | Branch | Debian feed | Debian package name | NuGet version | NuGet feed | -|------------ |----------- |------------- |--------------------- |--------------- |--------------------------------------- | -| Future | master | Development | dotnet-future | 1.0.0-dev-* | https://dotnet.myget.org/f/dotnet-cli | -| Preview | rel/ | Development | dotnet-sdk- | 1.0.0-beta-* | https://dotnet.myget.org/f/dotnet-cli | -| Production | rel/ | Production | dotnet-sdk- | 1.0.0 | https://api.nuget.org/v3/index.json | +| LTS | Latest long-term supported release. | +| Current | Most current release - typically 'preview' releases. | ## Funnels and discovery mechanisms for CLI bits There are multiple ways that we will funnel users towards the installers for the CLI: 1. [Getting Started Page](https://aka.ms/dotnetcoregs) -2. [Repo landing page](https://github.com/dotnet/cli/blob/rel/1.0.0/README.md) +2. [Repo landing page](../../README.md) 3. Package repositories for platforms (`apt-get`, `brew` etc.) 4. IDEs and editors that integrate with CLI (e.g. Visual Studio, VS Code, Sublime etc.) @@ -152,11 +139,10 @@ The below table shows other pertinent information for installs on the "Getting s | Debian feed | Development | | Brew repo/tap | Brew binary repo (https://github.com/Homebrew/homebrew-binary) | | CentOS feed | TBD | -| Local install scripts | Latest from rel/1.0.0 | ### Repo landing page -The repo landing page can be found on: https://github.com/dotnet/cli/blob/rel/1.0.0/README.md. Download links on the landing page should be decreased in importance. First thing for "you want to get started" section should link to the getting started page on the marketing site. The Repo Landing Page should be used primarily by contributors to the CLI. There should be a separate page that has instructions on how to install both the latest stable as well as latest development with proper warnings around it. The separate page is to really avoid the situation from people accidentally installing unstable bits (since search engines can drop them in the repo first). +The repo landing page can be found on: [Repo landing page](../../README.md). Download links on the landing page should be decreased in importance. First thing for "you want to get started" section should link to the getting started page on the marketing site. The Repo Landing Page should be used primarily by contributors to the CLI. There should be a separate page that has instructions on how to install both the latest stable as well as latest development with proper warnings around it. The separate page is to really avoid the situation from people accidentally installing unstable bits (since search engines can drop them in the repo first). The source branches and other items are actually branch specific for the repo landing page. As the user switches branches, the links and badges on the page will change to reflect the builds from that branch. @@ -197,13 +183,12 @@ This install covers the following main scenario: The features the script needs to support/have are: -* Support for dev and stable channel +* Support for specifying the channel * Support for specifying the version -* Support for specfying the installation location -* Support specifying whether the debug package needs to be downloaded +* Support for specifying the installation location * Automatically add the install to $PATH unless --no-path/-NoPath is present -The installation script exists in this repo under `scripts/obtain` path. However, for most users it is reccomended to use the stable version that is hosted on [.NET Core main website](https://dot.net). The direct path to the scripts are: +It is recommended to use the stable version that is hosted on [.NET Core main website](https://dot.net). The direct path to the scripts are: * https://dot.net/v1/dotnet-install.sh (bash, UNIX) * https://dot.net/v1/dotnet-install.ps1 (powershell, Windows) @@ -214,10 +199,9 @@ The following arguments are needed for the installation script: | dotnet-install.sh arg (Linux, OSX) | dotnet-install.ps1 arg (Windows) | Defaults | Description | |------------------------------------|----------------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| --channel | -Channel | "production" | Which channel (i.e. "Future", "preview", "production", "release/1.1.0") to install from. | -| --version | -Version | Latest | Which version of CLI to install; you need to specify the version as 3-part version (i.e. 1.0.0-13232). If omitted, it will default to Latest for that channel. | +| --channel | -Channel | "LTS" | Which channel (i.e. "LTS", "Current", "1.0", "2.0", etc) to install from. | +| --version | -Version | Latest | Which version of CLI to install; you need to specify the version as 3-part version (i.e. 1.0.0-13232). The 'version' parameter supersedes the 'channel' parameter. | | --install-dir | -InstallDir | .dotnet | Path to where to install the CLI bundle. The directory is created if it doesn't exist. On Linux/OSX this directory is created in the user home directory (`$HOME`). On Windows, this directory is created in `%LocalAppData%`. | -| --debug-symbols | -DebugSymbols | false | Whether to use the "fat" packages that contain debugging symbols or not. | | --no-path | -NoPath | false | Do not export the installdir to the path for the current session. This makes CLI tools available immediately after install. | | --shared-runtime | -SharedRuntime | false | Install just the shared runtime bits, not the entire SDK. | | --architecture | -Architecture | Current OS (``) | Architecture to install. The possible values are ``, `x64` and `x86`. | @@ -231,62 +215,59 @@ The following arguments are needed for the installation script: Windows: ``` -./dotnet-install.ps1 -Channel 'release/1.1.0' -SharedRuntime -Version 1.1.1 +./dotnet-install.ps1 -SharedRuntime -Version 1.1.0 ``` macOS/Linux: ``` -./dotnet-install.sh --channel 'release/1.1.0' --shared-runtime --version 1.1.1 +./dotnet-install.sh --shared-runtime --version 1.1.0 ``` -##### Install the latest Future CLI +##### Install the latest supported CLI Windows: ``` -./dotnet-install.ps1 -Channel Future +./dotnet-install.ps1 -Channel LTS ``` OSX/Linux: ``` -./dotnet-install.sh --channel Future +./dotnet-install.sh --channel LTS ``` -##### Install the latest preview to specified location +##### Install the latest CLI to specified location Windows: ``` -./dotnet-install.ps1 -Channel preview -InstallDir C:\cli +./dotnet-install.ps1 -Channel Current -InstallDir C:\cli ``` OSX/Linux: ``` -./dotnet-install.sh --channel preview --install-dir ~/cli +./dotnet-install.sh --channel Current --install-dir ~/cli ``` -#### Windows obtain one-liner example +##### Install the latest CLI in the 2.0 channel +Windows: ``` -@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1'))}" +./dotnet-install.ps1 -Channel 2.0 ``` - -#### OSX/Linux obtain one-liner - +OSX/Linux: ``` -curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh | bash /dev/stdin +./dotnet-install.sh --channel 2.0 ``` ### Docker [Docker](https://docs.docker.com/) has become a pretty good way to use developer tools, from trying them out in an interactive image use to using it for deployment. We have Docker images on DockerHub already. -Docker images should always be updated as we make new releases. We should have Docker images of stable releases, built from the rel/* branches. +Docker images should always be updated as we make new releases. We should have Docker images of stable releases, built from the release branches. ### NuGet packages -NuGet packages of the CLI bits that make sense are published to relevant feeds. The developer who wishes to use these needs to specify a version. The version is used to opt-in to the three channels above. The actuall "installation" here is restoring the package as a dependency for a certain project (i.e. `ProjectServer` or similar). - -The table in the [channels section](#channels) has the examples of mapping between branches and NuGet package versions. +NuGet packages of the CLI bits that make sense are published to relevant feeds. The developer who wishes to use these needs to specify a version. The actual "installation" here is restoring the package as a dependency for a certain project (i.e. `ProjectServer` or similar). ## Acquiring through other products ### IDEs and editors -Anything that goes into the higher-level tools should always use a stable build of CLI coming frol rel/* branches as required. +Anything that goes into the higher-level tools should always use a stable build of CLI coming frol release branches as required. If there exist any mechanism that notifies users of updates of the CLI, it should ideally point users to the Getting Started page to acquire the installers, or, if that is deemed too heavy-handed, it should point people to the last stable release. If there is a need of the URL to be "baked in" to the higher-level tool, that URL should be an aka.ms URL because it needs to be stable on that end. diff --git a/Documentation/specs/installation-scenarios.md b/Documentation/specs/installation-scenarios.md deleted file mode 100644 index 67f86472d..000000000 --- a/Documentation/specs/installation-scenarios.md +++ /dev/null @@ -1,248 +0,0 @@ -# Notes -This section describes placeholders used inside this spec. - -| Placeholder | Description | -| ---: | :--- | -| `` | `(future|preview|production)`. [See more info](#channels) | -| `` | version string | -| `` | `(win|ubuntu|rhel|osx|debian)` - code for OS name | -| `` | Lowest supported OS Version | -| `` | Processor architecture related to binaries produced | -| `` | File extension. This will be described in more details later for each OS separately. | -| `` | Abbreviation for: `.`. [See more info](#osid) | -| `` | `(latest|lkg)` | -| `` | Executable extension including dot specific to OS (can be empty string) | -| `` | Commit hash related to state of repository from where build with specific `` was build | -| `` | Name of the debian package. [See more info](#debian-feed-relation) | - -# Build Output -Each official, successful build should create and upload packages to location described by following URLs: -``` -https://dotnetcli.azureedge.net/dotnet///dotnet... - -Currently: -https://dotnetcli.azureedge.net/dotnet//Binaries//dotnet-sharedframework--..zip -https://dotnetcli.azureedge.net/dotnet//Binaries//dotnet-host--..zip -https://dotnetcli.azureedge.net/dotnet//Binaries//dotnet--..zip -``` -Content of the package should contain binaries which layout will be described later. - -Additionally each build should update `latest` [version descriptors](#version-descriptors) - -## Windows output - -Nuget - WIP, this should include versioning scheme - -| `` | Description | -| --- | :--- | -| exe | Installer bundle. It should be used by end customers | -| zip | Packed binaries. Used by [installation script](#installation-scripts) | -| symbols.zip | Packed binaries with included symbols. See [symbol packages](#symbol-packages) | - -### Including dotnet cli installer as part of your bundle - -In order to install dotnet cli with other installer you need an MSI package. To get MSI, download exe bundle and extract it using `dark` tool which is part of [WiX Toolset](http://wixtoolset.org): -``` -dark.exe -x -``` - -## OSX output - -| `` | Description | -| --- | :--- | -| pkg | WIP | -| tar.gz | Packed binaries. Used by [installation script](#installation-scripts) | -| symbols.tar.gz | Packed binaries with included symbols. See [symbol packages](#symbol-packages) | - -## Ubuntu output - -| `` | Description | -| --- | :--- | -| deb | Debian package. This package is being pushed to a [debian feed](#debian-feed) | -| tar.gz | Packed binaries. Used by [installation script](#installation-scripts) | -| symbols.tar.gz | Packed binaries with included symbols. See [symbol packages](#symbol-packages) | - -## RedHat/CentOS output - -| `` | Description | -| --- | :--- | -| tar.gz | Packed binaries. Used by [installation script](#installation-scripts) | -| symbols.tar.gz | Packed binaries with included symbols. See [symbol packages](#symbol-packages) | - -## Debian output - -| `` | Description | -| --- | :--- | -| tar.gz | Packed binaries. Used by [installation script](#installation-scripts) | -| symbols.tar.gz | Packed binaries with included symbols. See [symbol packages](#symbol-packages) | - -## Example build output links -WIP - -## Questions -- Should include channel name to avoid situation where you have two files on your computer and latest file might have lower version than the newest? - -# Obtaining dotnet - -## Installation scripts - -Installation script is a shell script which lets customers install dotnet. - -For Windows we are using PowerShell script (install-dotnet.ps1). -For any other OS we are using bash script (install-dotnet.sh) - -WIP: Exact script action description. - -### Script arguments description - -| PowerShell/Bash script | Bash script only | Default | Description | -| --- | --- | --- | --- | -| -Channel | --channel | production | Which [channel](#channels) to install from. Possible values: `future`, `preview`, `production` | -| -Version | --version | `global.json` or `latest` | `global.json` currently not supported | -| -InstallDir | --prefix | Windows: `%LocalAppData%\Microsoft\.dotnet` | Path to where install dotnet. Note that binaries will be placed directly in a given directory. | -| -Architecture | ~~--architecture~~ | auto | Possible values: `auto`, `x64`, `x86`. `auto` refers to currently running OS architecture. This switch is currently not supported in bash scripts. | -| -DebugSymbols | --debug-symbols | `` | If switch present, installation will include debug symbol | -| -DryRun | --dry-run | `` | If switch present, installation will not be performed and instead deterministic invocation with specific version and zip location will be displayed. | -| -NoPath | --no-path | `` | If switch present the script will not set PATH environmental variable for the current process. | -| -Verbose | --verbose | `` | If switch present displays diagnostics information. | -| -AzureFeed | --azure-feed | See description | Azure feed URL, default: `https://dotnetcli.azureedge.net/dotnet` | - -### Script location -WIP: permanent link for obtaining latest version -WIP: versioning description -Newest version of the scripts can be found in the repository under following directory: -``` -https://github.com/dotnet/cli/tree/rel/1.0.0/scripts/obtain -``` - -Older version of the script can be obtained using: -``` -https://github.com/dotnet/cli/blob//scripts/obtain -``` - -## Getting started page -WIP - -## Repo landing page -WIP - -# Version descriptors -## Version pointers -Version pointers represent URLs to the latest and Last Known Good (LKG) builds. -Specific URLs TBD. This will be something similar to following: -``` -/dotnet//..version -``` - -`` TBD - -## Version files -Version files can be found in multiple places: -- Package: relative path inside the package ./.version -- Latest/LKG version file: WIP - -URL: -``` -https://dotnetcli.azureedge.net/dotnet//..version -``` - -### File content -Each version file contains two lines describing the build: -``` - - -``` - -## Version badge -Version badge (SVG) is an image with textual representation of ``. It can be found under following URL: -``` -https://dotnetcli.azureedge.net/dotnet//..svg -``` - -## Questions/gaps -- Version Pointer links should be permanent and hosted on a separate domain - -# Package content -Currently package is required to contain two files: -- .version - [version file](#version-file) -- dotnet - entry point for all dotnet commands - -## Disk Layout -``` -.\ - .version - bin\ - dotnet -``` - -# Channels -Currently we have 3 channels which gives us idea about stability and quality of our product. - -| Channel name | Description | -| :---: | :--- | -| future | This channel can contain new features which may not be fully complete. This is usually most unstable channel. | -| preview | This channel is in the process of stablization. Most of the bugs and gaps are known. No new features expected. | -| production | This is the most stable channel. Features and gaps are known. No breaking changes can be expected. This channel will only be producing new versions on hotfixes. | - -## Github branches relation - -Each branch on each successful build produces packages described in [build output](#build-output). Mapping between branches and channel name can be found in the table below: - -| Channel name | Github branch | -| :---: | :--- | -| future | master | -| preview | rel/1.0.0 | -| production | N/A, prod? | - -## Debian feed relation - -After each successful build package is being pushed to the debian feed. More information on debian feed can be found [here](#debian-feed). - -| Channel name | `` | -| :---: | :--- | -| future | dotnet-future | -| preview | dotnet-preview | -| production | dotnet | - -## Nuget semantic version suffix relation -WIP - -## Questions -- What is the bar for triggering hotfix? - -# OSID - -OSID represents abbreviation for: -``` -. -``` -This naming scheme gives us flexibility to easily create new binaries when OS makes a breaking change without creating confusing names. - -In example, we currently put `api-ms-*.dll` files in our binaries. Those files are not needed on Windows 8 and higher. When using name `win7.x64` we can easily decide to get rid of `api-ms-*.dll` in the newest packages and simply call new version `win8.x64` which would mean that from Windows 8 forward those are recommended binaries (there is currently no issue with those files and this should be only treated as an example). - -# Debian feed - -Newest binaries in debian feed may be delayed due to external issues by up to 24h. - -## Obtaining binaries - -Add debian feed: -``` -sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' - -sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 - -sudo apt-get update -``` - -Install: -``` -sudo apt-get install = -``` - -## Questions -- Is debian version compatible with `` or does it require additional revision number, i.e.: `1.0.0.001598-1`? -- How to differentiate between Debian package for Debian and Debian package for Ubuntu? -- -# Symbol packages -WIP diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 018a8b81c..3733528eb 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -231,6 +231,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-remove-package.Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-add-package.Tests", "test\dotnet-add-package.Tests\dotnet-add-package.Tests.csproj", "{08A40B6A-F695-4EA9-AC8D-CF88FADEA796}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_fsc", "src\tool_fsharp\tool_fsc.csproj", "{602976C5-2477-4B4C-AD9A-1EAFB250529A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/NuGet.Config b/NuGet.Config index 691898bcb..11723f1b5 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -5,8 +5,9 @@ - - + + + @@ -15,7 +16,6 @@ - diff --git a/README.md b/README.md index 1e3660625..19775f4d4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you are looking for the v1.0.1 release of the .NET Core tools (CLI, MSBuild a Found an issue? --------------- -You can consult the [known issues page](https://github.com/dotnet/core/blob/release/2.0.0/cli/known-issues.md) to find out the current issues and to see workarounds. +You can consult the [Documents Index](Documentation/README.md) to find out the current issues and to see the workarounds. If you don't find your issue, please file one! However, given that this is a very high-frequency repo, we've setup some [basic guidelines](Documentation/project-docs/issue-filing-guide.md) to help you. Please consult those first. @@ -23,70 +23,77 @@ This project has adopted the code of conduct defined by the [Contributor Covenan Build Status ------------ -|Ubuntu 14.04 / Linux Mint 17 |Ubuntu 16.04 | Ubuntu 16.10 |Debian 8 |Windows x64 |Windows x86 |macOS |CentOS 7.1 / Oracle Linux 7.1 |RHEL 7.2 | Linux x64 | -|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:| -|[![][ubuntu-14.04-build-badge]][ubuntu-14.04-build]|[![][ubuntu-16.04-build-badge]][ubuntu-16.04-build]|[![][ubuntu-16.10-build-badge]][ubuntu-16.10-build]|[![][debian-8-build-badge]][debian-8-build]|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][centos-build-badge]][centos-build]|[![][rhel-build-badge]][rhel-build]|[![][linux-build-badge]][linux-build]| +|Windows x64 |Windows x86 |Mac OS X |Linux x64 |Ubuntu 14.04 / Linux Mint 17 |Ubuntu 16.04 |Ubuntu 16.10 |Debian 8 |RHEL 7.2 | +|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:| +|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][linux-build-badge]][linux-build]|[![][ubuntu-14.04-build-badge]][ubuntu-14.04-build]|[![][ubuntu-16.04-build-badge]][ubuntu-16.04-build]|[![][ubuntu-16.10-build-badge]][ubuntu-16.10-build]|[![][debian-8-build-badge]][debian-8-build]|[![][rhel-build-badge]][rhel-build]| -[win-x64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6208/badge -[win-x64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6208 +[win-x64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6786/badge +[win-x64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6786 -[win-x86-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6209/badge -[win-x86-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6209 +[win-x86-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6787/badge +[win-x86-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6787 -[ubuntu-14.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6205/badge -[ubuntu-14.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6205 +[osx-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6781/badge +[osx-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6781 -[ubuntu-16.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6206/badge -[ubuntu-16.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6206 +[linux-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6780/badge +[linux-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6780 -[ubuntu-16.10-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6207/badge -[ubuntu-16.10-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6207 +[ubuntu-14.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6783/badge +[ubuntu-14.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6783 -[debian-8-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6199/badge -[debian-8-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6199 +[ubuntu-16.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6784/badge +[ubuntu-16.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6784 -[osx-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6203/badge -[osx-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6203 +[ubuntu-16.10-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6785/badge +[ubuntu-16.10-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6785 -[centos-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6198/badge -[centos-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6198 +[debian-8-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6778/badge +[debian-8-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6778 -[rhel-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6204/badge -[rhel-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6204 - -[linux-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6201/badge -[linux-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6201 +[rhel-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6782/badge +[rhel-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6782 Installers and Binaries ----------------------- -You can download .NET Core SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). .NET Core SDK contains both the .NET Core runtime and CLI tools. +You can download the .NET Core SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET Core SDK contains both the .NET Core runtime and CLI tools. -In order to download the .NET Core runtime without the SDK, see https://github.com/dotnet/core-setup#daily-builds. +To download the .NET Core runtime **without** the SDK, visit https://github.com/dotnet/core-setup#daily-builds. -> **Note:** The following installers are the **latest prerelease bits**. If you -> want to install the latest released versions, see the [preceding section](#looking-for-v1-of-the-net-core-tooling). +> **Note:** Be aware that the following installers are the **latest bits**. If you +> want to install the latest released versions, check out the [preceding section](#looking-for-v1-of-the-net-core-tooling). -| Platform | release/2.0.0
[![][version-badge]][version] | +| Platform | Latest Daily Build
*release/2.0.0*
[![][version-badge]][version] | | -------- | :-------------------------------------: | | **Windows x64** | [Installer][win-x64-installer] - [Checksum][win-x64-installer-checksum]
[zip][win-x64-zip] - [Checksum][win-x64-zip-checksum] | | **Windows x86** | [Installer][win-x86-installer] - [Checksum][win-x86-installer-checksum]
[zip][win-x86-zip] - [Checksum][win-x86-zip-checksum] | | **Mac OS X** | [Installer][osx-installer] - [Checksum][osx-installer-checksum]
[tar.gz][osx-targz] - [Checksum][osx-targz-checksum] | | **Linux x64** | [tar.gz][linux-targz] - [Checksum][linux-targz-checksum] | -| **Ubuntu 14.04 / Linux Mint 17** | [Installer][ubuntu-14.04-installer] - [Checksum][ubuntu-14.04-installer-checksum]
*See Installer Note Below
tar.gz - See **Linux x64** | -| **Ubuntu 16.04** | [Installer][ubuntu-16.04-installer] - [Checksum][ubuntu-16.04-installer-checksum]
*See Installer Note Below
tar.gz - See **Linux x64** | -| **Ubuntu 16.10** | [Installer][ubuntu-16.10-installer] - [Checksum][ubuntu-16.10-installer-checksum]
*See Installer Note Below
tar.gz - See **Linux x64** | -| **Debian 8** | [Installer][debian-8-installer] - [Checksum][debian-8-installer-checksum]
*See Installer Note Below
tar.gz - See **Linux x64** | +| **Ubuntu 14.04 / Linux Mint 17** | [Installer][ubuntu-14.04-installer] - [Checksum][ubuntu-14.04-installer-checksum]
_see installer note below_1
tar.gz - See **Linux x64** | +| **Ubuntu 16.04** | [Installer][ubuntu-16.04-installer] - [Checksum][ubuntu-16.04-installer-checksum]
_see installer note below_1
tar.gz - See **Linux x64** | +| **Ubuntu 16.10** | [Installer][ubuntu-16.10-installer] - [Checksum][ubuntu-16.10-installer-checksum]
_see installer note below_1
tar.gz - See **Linux x64** | +| **Debian 8** | [Installer][debian-8-installer] - [Checksum][debian-8-installer-checksum]
_see installer note below_1
tar.gz - See **Linux x64** | +| **RHEL 7.2** | [Installer][rhel-7-installer] - [Checksum][rhel-7-installer-checksum]
_see installer note below_1
tar.gz - See **Linux x64** | | **CentOS 7.1 / Oracle Linux 7** | tar.gz - See **Linux x64** | -| **RHEL 7.2** | [Installer][rhel-7-installer] - [Checksum][rhel-7-installer-checksum]
*See Installer Note Below
tar.gz - See **Linux x64** | | **Fedora 24** | tar.gz - See **Linux x64** | | **OpenSUSE 42.1** | tar.gz - See **Linux x64** | -*Note: 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.* + +| Latest Coherent Build2
*release/2.0.0* | +|:------:| +| [![][coherent-version-badge]][coherent-version] | + +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.* +>

**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.0.0/latest.version +[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/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/release/2.0.0/win_x64_Release_version_badge.svg +[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/win_x86_Release_coherent_badge.svg [win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-win-x64.exe [win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-win-x64.exe.sha @@ -202,7 +209,7 @@ Compiling to IL is done using: This will drop an IL assembly in `./bin/[configuration]/[framework]/[binary name]` that you can run using `dotnet bin/[configuration]/[framework]/[binaryname.dll]`. -For more details, please refer to the [documentation](https://aka.ms/dotnet-cli-docs). +For more details, refer to the [documentation](https://aka.ms/dotnet-cli-docs). Building from source -------------------- @@ -214,7 +221,7 @@ Read over the [contributing guidelines](CONTRIBUTING.md) and [developer document Questions & Comments -------------------- -For any and all feedback, please use the Issues on this repository. +For all feedback, use the Issues on this repository. License ------- diff --git a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs index 31f29c70f..7c5f1090e 100644 --- a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs +++ b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs @@ -23,8 +23,7 @@ namespace Microsoft.DotNet.Tools.DependencyInvoker Create.Option( "-h|--help", "Show help information", - Accept.NoArguments(), - materialize: o => o.Option.Command().HelpView()), + Accept.NoArguments()), Create.Option( "-p|--project-path", "Path to Project.json that contains the tool dependency", diff --git a/build/Branding.props b/build/Branding.props index 913041dac..6608a3ea5 100644 --- a/build/Branding.props +++ b/build/Branding.props @@ -1,6 +1,7 @@ - Microsoft .NET Core SDK - 2.0.0 Preview 2 + Microsoft .NET Core SDK - 2.0.1 + .NET Standard Support for Visual Studio 2015 Microsoft .NET Core Runtime - 2.0.0 Microsoft .NET Core Host - 2.0.0 Microsoft .NET Core Host FX Resolver - 2.0.0 @@ -22,12 +23,14 @@ dotnet-sdk-internal dotnet-sdk-debug dotnet-sdk + $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack $(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid) - + dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid) + $(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid) diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props index 685df5297..396c9f2df 100644 --- a/build/BundledRuntimes.props +++ b/build/BundledRuntimes.props @@ -31,7 +31,7 @@ - $(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimeVersion) + $(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimeAzureblobStoresSubfolderName) runtime.version $(PackagesDirectory)/$(AspNetCoreSharedRuntimeVersionFileName) @@ -40,8 +40,8 @@ $(HostOSName) linux - -$(AspNetCoreCoherenceTimestamp) - -$(AspNetCoherenceLabel)$(AspNetCoreRuntimeStoreSuffix) + -$(AspNetCoreRuntimePackageTimestamp) + -$(AspNetCoreRelease)$(AspNetCoreRuntimeStoreSuffix) Build.RS.$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)$(AspNetCoreRuntimeInstallerArchiveSuffix)$(ArchiveExtension) $(PackagesDirectory)/$(AspNetCoreRuntimeInstallerArchiveFileName) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index ebc52549d..3eb93c2ac 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,47 +1,54 @@ - 2.0.0-preview3-25419-01 - 15.3.0-preview-000400-01 - 2.3.0-beta3-61816-04 + 2.0.0 + 15.3.409 + 2.3.2-beta1-61921-05 + 2.3.0-pre-20170727-1 1.6.0-beta2-25304 - 4.2.0-rc-170602-0 + 4.2.0-rc-170630-0 + 4.4.1-pre-20170727-1 - 2.0.0-preview2-20170615-7 + 2.0.0-preview3-20170804-1 $(CLI_NETSDK_Version) - 4.3.0-preview3-4168 - 2.0.0-preview2-25331-02 - 2.0.0-rel-20170518-512 - 15.3.0-preview-20170618-03 + 4.3.0-rtm-4382 + 2.0.0-preview3-25514-04 + 2.0.0-rel-20170815-630 + 15.3.0-preview-20170628-02 $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) - 1.0.0-beta2-20170608-254 - 1.0.0-beta2-20170612-258 - 1.0.0-beta2-20170612-258 - 2.0.0-preview3-25419-01 - 2.0.0-preview3-25419-01 - 0.1.0-alpha-142 + 1.0.0-beta2-20170810-304 + 1.0.0-beta2-20170810-304 + 1.0.0-beta2-20170810-304 + 2.0.0 + 2.0.0 + 0.1.1-alpha-167 1.2.1-alpha-002133 0.2.0 - 1.0.0-preview-000297 + 1.0.417 0.2.0-beta-000042 - timestamped - 2.0.0-preview2-186 - preview2 - 25661 + notimestamp + + 2.0.0 + rtm + 2.0.0 + 26452 + aspnetcore-store + $(AspNetCoreVersion)-$(AspNetCoreRelease) + $(AspNetCoreBranchName)-$(AspNetCoreRuntimePackageTimestamp) - 1.0.27-prerelease-01611-04 + 1.0.27-prerelease-01723-01 2.0.0-preview2-25331-01 diff --git a/build/InstallerInfo.props b/build/InstallerInfo.props index 6cc81f094..036369fab 100644 --- a/build/InstallerInfo.props +++ b/build/InstallerInfo.props @@ -2,11 +2,13 @@ $(PackagesDirectory) $(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension) + $(InstallerOutputDirectory)/$(ArtifactNameWithVersionMSBuildExtensions)$(InstallerExtension) $(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension) $(IntermediateDirectory)/debian/sdk $(SdkDebianIntermediateDirectory)/debianLayoutDirectory $(IntermediateDirectory)/layouts $(LayoutDirectory)/$(ArtifactNameSdk) + $(LayoutDirectory)/MSBuildExtensions diff --git a/build/Publish.targets b/build/Publish.targets index d38175d64..2fb513838 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -5,24 +5,27 @@ - + + + DependsOnTargets="GenerateVersionBadge; + GenerateCoherentBadge; + GatherItemsForPattern; + GenerateChecksums; + UploadArtifactsToAzure; + UploadChecksumsToAzure; + PublishDebFilesToDebianRepo; + PublishCliVersionBadge" /> @@ -44,6 +47,8 @@ + diff --git a/build/Version.props b/build/Version.props index 97a01c36e..156ece688 100644 --- a/build/Version.props +++ b/build/Version.props @@ -2,8 +2,8 @@ 2 0 - 0 - preview3 + 1 + servicing $(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix) $(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount) diff --git a/build/VersionBadge.props b/build/VersionBadge.props index 42f210be0..0dab52fb8 100644 --- a/build/VersionBadge.props +++ b/build/VersionBadge.props @@ -1,11 +1,14 @@ - $(OSName)_$(Architecture) - ubuntu_16_04_x64 - ubuntu_16_10_x64 - fedora_24_x64 - opensuse_42_1_x64 + $(OSName)_$(Architecture) + debian_8_x64 + rhel_7_x64 + ubuntu_14_04_x64 + ubuntu_16_04_x64 + ubuntu_16_10_x64 + linux_x64 - $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg + $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg + $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_coherent_badge.svg diff --git a/build/package/Archive.targets b/build/package/Archive.targets index 54352ae27..d86e435fc 100644 --- a/build/package/Archive.targets +++ b/build/package/Archive.targets @@ -20,13 +20,15 @@ Condition=" '$(OSName)' == 'win' " SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)" DestinationArchive="$(GenerateArchivesDestinationArchive)" - OverwriteDestination="true"/> + OverwriteDestination="true" + ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" /> + OverwriteDestination="true" + ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" /> @@ -37,11 +39,12 @@ - + %(LayoutDefinition.OutputFiles) $(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension) $(LayoutDirectory)/%(LayoutDefinition.Name) %(LayoutDefinition.NameWithVersion) + %(LayoutDefinition.ExcludePatterns) diff --git a/build/package/Installer.DEB.proj b/build/package/Installer.DEB.proj index 2c917db52..66300c4df 100644 --- a/build/package/Installer.DEB.proj +++ b/build/package/Installer.DEB.proj @@ -16,7 +16,8 @@ @@ -24,6 +25,7 @@ + - - - - - + + + + + @@ -110,6 +107,7 @@ + @@ -123,6 +121,7 @@ + diff --git a/build/package/Installer.DEB.targets b/build/package/Installer.DEB.targets index c67895054..b041bc344 100644 --- a/build/package/Installer.DEB.targets +++ b/build/package/Installer.DEB.targets @@ -35,6 +35,11 @@ dotnet-hostfxr-$(HostFxrDebianPackageVersion) $(HostFxrDebianPackageName.ToLower()) dotnet-host + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp) + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion) + $(HostRid) + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeDebInstallerFileName).deb + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)-$(HostRidInAspNetCoreRuntimeDebInstallerFileName).deb @@ -83,6 +88,9 @@ $(SharedFxDebianPackageName) + + $(AspNetCoreRuntimePackageName) + , @@ -98,6 +106,10 @@ $(SdkBrandName) + + + $(SdkVersion) + @@ -107,4 +119,14 @@ + + + + $(PackagesDirectory)/$(AspNetCoreRuntimeDebInstallerFileName) + + + diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets index 44f930c8b..2a4e131b8 100644 --- a/build/package/Installer.MSI.targets +++ b/build/package/Installer.MSI.targets @@ -17,6 +17,8 @@ $(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1 $(RepoRoot)/packaging/windows/clisdk/generatenupkg.ps1 + $(RepoRoot)/packaging/windows/msbuildextensions/generatemsi.ps1 + $(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec $(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg @@ -36,11 +38,14 @@ + + + + + + @@ -103,6 +113,24 @@ '$(Architecture)'" /> + + + + + $(RepoRoot)/packaging/osx/clisdk $(SdkPkgSourcesRootDirectory)/scripts + $(SdkPkgScriptsDirectory)/postinstall + $(PkgIntermediateDirectory)/scripts + $(SdkPkgDestinationScriptsDirectory)/postinstall $(SdkPkgSourcesRootDirectory)/resources $(SdkPkgSourcesRootDirectory)/Distribution-Template @@ -54,6 +57,10 @@ $(HostFxrBrandName) + + + $(SdkVersion) + @@ -83,12 +90,22 @@ + + + + diff --git a/build/package/Installer.RPM.props b/build/package/Installer.RPM.props index d868c70e0..1b93101c3 100644 --- a/build/package/Installer.RPM.props +++ b/build/package/Installer.RPM.props @@ -4,5 +4,6 @@ rpm_config.json $(RepoRoot)/packaging/rpm/templates $(RepoRoot)/packaging/rpm/scripts + after_install_host.sh \ No newline at end of file diff --git a/build/package/Installer.RPM.targets b/build/package/Installer.RPM.targets index e64e73ce4..1781d689b 100644 --- a/build/package/Installer.RPM.targets +++ b/build/package/Installer.RPM.targets @@ -50,6 +50,15 @@ dotnet-hostfxr-$(HostFxrRpmPackageVersion) $(HostFxrRpmPackageName.ToLower()) dotnet-host + $(HostRid) + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp) + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion) + $(AspNetCoreVersion)-$(AspNetCoreRelease)-$(AspNetCoreRuntimePackageTimestamp) + $(AspNetCoreVersion) + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm + $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm + $(ScriptsDir)/$(AfterInstallHostScriptName) + $(RpmLayoutScripts)/$(AfterInstallHostScriptName) @@ -73,8 +82,7 @@ - - + - - $(SharedFrameworkVersion) + + $(AspNetCoreRuntimePackageName) + + + $(AspNetCoreRuntimePackageVersion) + $(SharedFxRpmPackageName) @@ -124,6 +132,10 @@ $(SdkRpmPackageName) + + + $(SdkVersion) + @@ -131,6 +143,14 @@ + + + + @@ -162,6 +182,16 @@ + + + $(PackagesDirectory)/$(AspNetCoreRuntimeRpmInstallerFileName) + + + + @@ -182,11 +212,12 @@ @@ -194,6 +225,7 @@ + @@ -207,8 +239,10 @@ + + - \ No newline at end of file + diff --git a/build/package/Layout.targets b/build/package/Layout.targets index b9361c55d..8d37a5b36 100644 --- a/build/package/Layout.targets +++ b/build/package/Layout.targets @@ -3,6 +3,9 @@ $(LayoutDirectory)/$(ArtifactNameSdkDebug) $(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk) + $(LayoutDirectory)/$(ArtifactNameSdkLanguagePack) + *.resources.dll + .*.resources.dll @@ -11,8 +14,14 @@ + + + + + + + + + + + + + + + + + + + + + @@ -52,8 +82,23 @@ @(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)') $(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk) $(ArtifactNameCombinedHostHostFxrFrameworkSdk) + $(WindowsSatelliteAssembliesRegEx) + $(SatelliteAssemblies) + + @(SdkLanguagePackInput) + @(SdkLanguagePackRelativeOutputFiles -> '$(SdkLanguagePackOutputDirectory)/%(Identity)') + $(ArtifactNameWithVersionSdkLanguagePack) + $(ArtifactNameSdkLanguagePack) + + + + + + @(CombinedMSBuildExtensionsInput) + @(CombinedMSBuildExtensionsRelativeOutputFiles -> '$(MSBuildExtensionsOutputDirectory)/%(Identity)') + diff --git a/build/package/Nupkg.targets b/build/package/Nupkg.targets index e3eb97faf..9158c2143 100644 --- a/build/package/Nupkg.targets +++ b/build/package/Nupkg.targets @@ -11,6 +11,10 @@ Microsoft.DotNet.Cli.Utils $(SdkNugetVersion) + + Microsoft.DotNet.MSBuildSdkResolver + $(SdkNugetVersion) + diff --git a/build/publish/Badge.targets b/build/publish/Badge.targets index 7c87a7ac6..d80313c19 100644 --- a/build/publish/Badge.targets +++ b/build/publish/Badge.targets @@ -14,4 +14,16 @@ ReplacementPatterns="ver_number" ReplacementStrings="$(SdkVersion)" /> + + + + + + \ No newline at end of file diff --git a/build/publish/FinishBuild.targets b/build/publish/FinishBuild.targets index 709837429..dfb224431 100644 --- a/build/publish/FinishBuild.targets +++ b/build/publish/FinishBuild.targets @@ -2,7 +2,6 @@ @@ -14,27 +13,6 @@ - - - - false - true - - - - - - - - - - - @@ -54,9 +32,9 @@ CommitHash="$(CommitHash)" Coherent="$(Coherent)" /> - - + GitHubPassword="$(GITHUB_PASSWORD)" + Condition=" '$(GITHUB_PASSWORD)' != '' " /> diff --git a/build/publish/PublishDebian.targets b/build/publish/PublishDebian.targets index 08767a3ce..43ab5abda 100644 --- a/build/publish/PublishDebian.targets +++ b/build/publish/PublishDebian.targets @@ -19,7 +19,7 @@ - + diff --git a/build/publish/RuntimeCoherence.targets b/build/publish/RuntimeCoherence.targets new file mode 100644 index 000000000..5ba7482bf --- /dev/null +++ b/build/publish/RuntimeCoherence.targets @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + false + true + + + diff --git a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs index 3335e482f..67b3ec6fe 100644 --- a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs +++ b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs @@ -52,7 +52,12 @@ namespace Microsoft.DotNet.Cli.Build { "win_x86", false }, { "win_x64", false }, { "osx_x64", false }, - { "linux_x64", false }, + { "debian_8_x64", false }, + { "rhel_7_x64", false }, + { "ubuntu_14_04_x64", false }, + { "ubuntu_16_04_x64", false }, + { "ubuntu_16_10_x64", false }, + { "linux_x64", false } }; if (!badges.ContainsKey(VersionBadgeMoniker)) diff --git a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs index 5d5cdf9e3..6071d0765 100644 --- a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs +++ b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs @@ -28,6 +28,8 @@ namespace Microsoft.DotNet.Cli.Build private IEnumerable _environmentVariablesToKeep = new string [] { "DOTNET_CLI_TELEMETRY_SESSIONID", + "DOTNET_CLI_UI_LANGUAGE", + "DOTNET_MULTILEVEL_LOOKUP", "DOTNET_RUNTIME_ID", "DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "NUGET_PACKAGES" diff --git a/build_projects/update-dependencies/Config.cs b/build_projects/update-dependencies/Config.cs index 9938cce68..0bd5a0c6a 100644 --- a/build_projects/update-dependencies/Config.cs +++ b/build_projects/update-dependencies/Config.cs @@ -82,7 +82,8 @@ namespace Microsoft.DotNet.Scripts private static string GetDefaultCoreSetupVersionFragment() { - string coreSetupChannel = GetRepoMSBuildPropValue("BundledRuntimes.props", "CoreSetupChannel") ?? "master"; + // by default, the current core-setup branch should match the current cli branch name + string coreSetupChannel = Instance.GitHubUpstreamBranch; return $"dotnet/core-setup/{coreSetupChannel}"; } diff --git a/packaging/deb/dotnet-debian_config.json b/packaging/deb/dotnet-debian_config.json index 86adb7537..4d813f3fd 100644 --- a/packaging/deb/dotnet-debian_config.json +++ b/packaging/deb/dotnet-debian_config.json @@ -29,6 +29,7 @@ }, "debian_dependencies":{ - "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {}%SHARED_FRAMEWORK_DEBIAN_PACKAGE_ADDITIONAL_DEPENDENCY% + "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {}%SHARED_FRAMEWORK_DEBIAN_PACKAGE_ADDITIONAL_DEPENDENCY%, + "%ASPNETCOREPACKAGESTORE_DEBIAN_PACKAGE_NAME%": {} } } diff --git a/packaging/deb/postinst b/packaging/deb/postinst index 3ef09330a..9eb33f532 100755 --- a/packaging/deb/postinst +++ b/packaging/deb/postinst @@ -13,6 +13,16 @@ The .NET Core Tools include a telemetry feature that collects usage information. The data collected is anonymous and will be published in an aggregated form for use by both Microsoft and community engineers under the Creative Commons Attribution License. -The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry." +The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry. -dotnet new > /dev/null 2>&1 || true +Installation Note +-------------- +A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete." + +first_run() { + /usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true +} + +INSTALL_TEMP_HOME=/tmp/dotnet-installer +[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME +HOME=$INSTALL_TEMP_HOME first_run diff --git a/packaging/osx/clisdk/Distribution-Template b/packaging/osx/clisdk/Distribution-Template index 9b53f10c3..f2e95c46d 100644 --- a/packaging/osx/clisdk/Distribution-Template +++ b/packaging/osx/clisdk/Distribution-Template @@ -6,9 +6,9 @@ - + - + @@ -32,4 +32,4 @@ {HostFxrComponentId}.pkg {SharedHostComponentId}.pkg {CLISdkComponentId}.pkg - \ No newline at end of file + diff --git a/packaging/osx/clisdk/resources/cs.lproj/conclusion.html b/packaging/osx/clisdk/resources/cs.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/cs.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/cs.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/de.lproj/conclusion.html b/packaging/osx/clisdk/resources/de.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/de.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/de.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/en.lproj/conclusion.html b/packaging/osx/clisdk/resources/en.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/en.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/en.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/es.lproj/conclusion.html b/packaging/osx/clisdk/resources/es.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/es.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/es.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/fr.lproj/conclusion.html b/packaging/osx/clisdk/resources/fr.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/fr.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/fr.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/it.lproj/conclusion.html b/packaging/osx/clisdk/resources/it.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/it.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/it.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/ja.lproj/conclusion.html b/packaging/osx/clisdk/resources/ja.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/ja.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/ja.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/ko.lproj/conclusion.html b/packaging/osx/clisdk/resources/ko.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/ko.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/ko.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/pl.lproj/conclusion.html b/packaging/osx/clisdk/resources/pl.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/pl.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/pl.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html b/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/ru.lproj/conclusion.html b/packaging/osx/clisdk/resources/ru.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/ru.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/ru.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/tr.lproj/conclusion.html b/packaging/osx/clisdk/resources/tr.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/tr.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/tr.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html b/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html b/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html index 74addd70f..a4b936329 100644 --- a/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html +++ b/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html @@ -13,6 +13,13 @@
+
+

This product collects usage data +

+
+
diff --git a/packaging/osx/clisdk/scripts/postinstall b/packaging/osx/clisdk/scripts/postinstall index 4d69748e9..8211444d2 100755 --- a/packaging/osx/clisdk/scripts/postinstall +++ b/packaging/osx/clisdk/scripts/postinstall @@ -6,12 +6,16 @@ PACKAGE=$1 INSTALL_DESTINATION=$2 - +INSTALL_TEMP_HOME=/tmp/dotnet-installer # A temporary fix for the permissions issue(s) chmod -R 755 $INSTALL_DESTINATION -# Run 'dotnet new' to trigger the first time experience to initialize the cache -$INSTALL_DESTINATION/dotnet new > /dev/null 2>&1 || true +first_run() { + $INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true +} + +[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME +HOME=$INSTALL_TEMP_HOME first_run exit 0 diff --git a/packaging/rpm/dotnet-config.json b/packaging/rpm/dotnet-config.json index 6ed9d53ad..38f533bcb 100644 --- a/packaging/rpm/dotnet-config.json +++ b/packaging/rpm/dotnet-config.json @@ -25,14 +25,16 @@ { "package_name": "%SHARED_HOST_RPM_NAME%", "package_version": "%SHARED_HOST_RPM_VERSION%" + }, + { + "package_name": "%ASPNETCOREPACKAGESTORE_RPM_PACKAGE_NAME%", + "package_version": "%ASPNETCOREPACKAGESTORE_RPM_PACKAGE_VERSION%" } ], "directories": [ "/usr/share/dotnet/sdk", - "/usr/share/dotnet/store", - "/usr/share/dotnet/additionalDeps", "/usr/share/doc/%SDK_RPM_PACKAGE_NAME%" ], "after_install_source": "scripts/after_install_host.sh", "after_remove_source": "scripts/after_remove_host.sh" -} \ No newline at end of file +} diff --git a/packaging/rpm/scripts/after_install_host.sh b/packaging/rpm/scripts/after_install_host.sh index 8b976c886..7bc9596c7 100644 --- a/packaging/rpm/scripts/after_install_host.sh +++ b/packaging/rpm/scripts/after_install_host.sh @@ -17,6 +17,16 @@ The .NET Core Tools include a telemetry feature that collects usage information. The data collected is anonymous and will be published in an aggregated form for use by both Microsoft and community engineers under the Creative Commons Attribution License. -The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry." +The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry. -dotnet new > /dev/null 2>&1 || true +Installation Note +-------------- +A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete." + +first_run() { + /usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "rpmpackage" > /dev/null 2>&1 || true +} + +INSTALL_TEMP_HOME=/tmp/dotnet-installer +[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME +HOME=$INSTALL_TEMP_HOME first_run diff --git a/packaging/windows/clisdk/bundle.wxl b/packaging/windows/clisdk/bundle.wxl index 7c93a4955..a5b12953c 100644 --- a/packaging/windows/clisdk/bundle.wxl +++ b/packaging/windows/clisdk/bundle.wxl @@ -54,13 +54,14 @@ The following were installed at [DOTNETHOME] • .NET Core Runtime 2.0.0 • Runtime Package Store -Resources +This product collects usage data + • More information and opt-out https://aka.ms/dotnet-cli-telemetry +Resources • Core Documentation https://aka.ms/dotnet-docs • SDK Documentation https://aka.ms/dotnet-cli-docs • Release Notes https://aka.ms/20-p2-rel-notes - • Tutorials https://aka.ms/dotnet-tutorials - • .NET Core Telemetry https://aka.ms/dotnet-cli-telemetry
+ • Tutorials https://aka.ms/dotnet-tutorials .NET Core SDK .NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it! diff --git a/packaging/windows/clisdk/bundle.wxs b/packaging/windows/clisdk/bundle.wxs index d1de0ef58..4f379ca3e 100644 --- a/packaging/windows/clisdk/bundle.wxs +++ b/packaging/windows/clisdk/bundle.wxs @@ -37,6 +37,7 @@ + diff --git a/packaging/windows/clisdk/dotnet.wxs b/packaging/windows/clisdk/dotnet.wxs index 976bf5a55..fbcebfbbf 100644 --- a/packaging/windows/clisdk/dotnet.wxs +++ b/packaging/windows/clisdk/dotnet.wxs @@ -20,6 +20,7 @@ + @@ -30,12 +31,20 @@ - - + + - - + + diff --git a/packaging/windows/msbuildextensions/generatemsi.ps1 b/packaging/windows/msbuildextensions/generatemsi.ps1 new file mode 100644 index 000000000..a7444058d --- /dev/null +++ b/packaging/windows/msbuildextensions/generatemsi.ps1 @@ -0,0 +1,140 @@ +# 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. + +param( + [Parameter(Mandatory=$true)][string]$inputDir, + [Parameter(Mandatory=$true)][string]$MSBuildExtensionsMSIOutput, + [Parameter(Mandatory=$true)][string]$WixRoot, + [Parameter(Mandatory=$true)][string]$ProductMoniker, + [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, + [Parameter(Mandatory=$true)][string]$UpgradeCode, + [Parameter(Mandatory=$true)][string]$Architecture +) + +. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1" +$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.." + +$InstallFileswsx = "install-msbuild-extensions-files.wxs" +$InstallFilesWixobj = "install-msbuild-extensions-files.wixobj" + +function RunHeat +{ + $result = $true + pushd "$WixRoot" + + Write-Output Running heat.. + + .\heat.exe dir `"$inputDir`" -template fragment -sreg -gg -var var.DotnetSrc -cg InstallFiles -srd -dr MSBUILDEXTENSIONSHOME -out $InstallFileswsx | Out-Host + + if($LastExitCode -ne 0) + { + $result = $false + Write-Output "Heat failed with exit code $LastExitCode." + } + + popd + return $result +} + +function RunCandle +{ + $result = $true + pushd "$WixRoot" + + Write-Output Running candle.. + $AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\msbuildextensions" + + .\candle.exe -nologo ` + -dDotnetSrc="$inputDir" ` + -dMicrosoftEula="$RepoRoot\packaging\windows\clisdk\dummyeula.rtf" ` + -dProductMoniker="$ProductMoniker" ` + -dBuildVersion="$DotnetMSIVersion" ` + -dDisplayVersion="$DotnetCLIDisplayVersion" ` + -dNugetVersion="$DotnetCLINugetVersion" ` + -dUpgradeCode="$UpgradeCode" ` + -arch "$Architecture" ` + -ext WixDependencyExtension.dll ` + "$AuthWsxRoot\msbuildextensions.wxs" ` + "$AuthWsxRoot\provider.wxs" ` + "$AuthWsxRoot\registrykeys.wxs" ` + $InstallFileswsx | Out-Host + + if($LastExitCode -ne 0) + { + $result = $false + Write-Output "Candle failed with exit code $LastExitCode." + } + + popd + return $result +} + +function RunLight +{ + $result = $true + pushd "$WixRoot" + + Write-Output Running light.. + $CabCache = Join-Path $WixRoot "cabcache" + $AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\msbuildextensions" + + .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension ` + -cultures:en-us ` + msbuildextensions.wixobj ` + provider.wixobj ` + registrykeys.wixobj ` + $InstallFilesWixobj ` + -b "$inputDir" ` + -b "$AuthWsxRoot" ` + -reusecab ` + -cc "$CabCache" ` + -out $MSBuildExtensionsMSIOutput | Out-Host + + if($LastExitCode -ne 0) + { + $result = $false + Write-Output "Light failed with exit code $LastExitCode." + } + + popd + return $result +} + +if(!(Test-Path $inputDir)) +{ + throw "$inputDir not found" +} + +Write-Output "Creating MSBuild Extensions MSI at $MSBuildExtensionsMSIOutput" + +if([string]::IsNullOrEmpty($WixRoot)) +{ + Exit -1 +} + +if(-Not (RunHeat)) +{ + Exit -1 +} + +if(-Not (RunCandle)) +{ + Exit -1 +} + +if(-Not (RunLight)) +{ + Exit -1 +} + +if(!(Test-Path $MSBuildExtensionsMSIOutput)) +{ + throw "Unable to create the MSBuild Extensions msi." + Exit -1 +} + +Write-Output -ForegroundColor Green "Successfully created MSBuild Extensions MSI - $MSBuildExtensionsMSIOutput" + +exit $LastExitCode diff --git a/packaging/windows/msbuildextensions/msbuildextensions.wxs b/packaging/windows/msbuildextensions/msbuildextensions.wxs new file mode 100644 index 000000000..be689ea3f --- /dev/null +++ b/packaging/windows/msbuildextensions/msbuildextensions.wxs @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packaging/windows/msbuildextensions/provider.wxs b/packaging/windows/msbuildextensions/provider.wxs new file mode 100644 index 000000000..e1711ec76 --- /dev/null +++ b/packaging/windows/msbuildextensions/provider.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packaging/windows/msbuildextensions/registrykeys.wxs b/packaging/windows/msbuildextensions/registrykeys.wxs new file mode 100644 index 000000000..fde60d74a --- /dev/null +++ b/packaging/windows/msbuildextensions/registrykeys.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packaging/windows/msbuildextensions/variables.wxi b/packaging/windows/msbuildextensions/variables.wxi new file mode 100644 index 000000000..2d13e678f --- /dev/null +++ b/packaging/windows/msbuildextensions/variables.wxi @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/run-build.sh b/run-build.sh index fcbf1b7e9..95154cdf6 100755 --- a/run-build.sh +++ b/run-build.sh @@ -152,7 +152,7 @@ export VSTEST_TRACE_BUILD=1 # Don't resolve shared frameworks from user or global locations -DOTNET_MULTILEVEL_LOOKUP=0 +export DOTNET_MULTILEVEL_LOOKUP=0 # Install a stage 0 (set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS) diff --git a/scripts/docker/fedora.23/Dockerfile b/scripts/docker/fedora.23/Dockerfile index 0c4b20d79..b8508bde7 100644 --- a/scripts/docker/fedora.23/Dockerfile +++ b/scripts/docker/fedora.23/Dockerfile @@ -4,36 +4,10 @@ # # Dockerfile that creates a container suitable to build dotnet-cli -FROM fedora:23 - -# Install the base toolchain we need to build anything (clang, cmake, make and the like) -# this does not include libraries that we need to compile different projects, we'd like -# them in a different layer. -RUN dnf install -y cmake \ - clang \ - lldb-devel \ - make \ - which && \ - dnf clean all +FROM microsoft/dotnet-buildtools-prereqs:fedora23_prereqs # Install tools used by the VSO build automation. -RUN dnf install -y git \ - zip \ - tar \ - nodejs \ - findutils \ - npm && \ - dnf clean all && \ - npm install -g azure-cli && \ - npm cache clean - -# Dependencies of CoreCLR and CoreFX. -RUN dnf install -y libicu-devel \ - libuuid-devel \ - libcurl-devel \ - openssl-devel \ - libunwind-devel \ - lttng-ust-devel && \ +RUN dnf install -y findutils && \ dnf clean all # Upgrade NSS, used for SSL, to avoid NuGet restore timeouts. diff --git a/scripts/docker/opensuse.13.2/Dockerfile b/scripts/docker/opensuse.13.2/Dockerfile index 83244ea3c..c3cb77eb4 100644 --- a/scripts/docker/opensuse.13.2/Dockerfile +++ b/scripts/docker/opensuse.13.2/Dockerfile @@ -3,37 +3,11 @@ # Licensed under the MIT license. See LICENSE file in the project root for full license information. # -FROM opensuse:13.2 +FROM microsoft/dotnet-buildtools-prereqs:opensuse132_prereqs_v4 -# Install the base toolchain we need to build anything (clang, cmake, make and the like) -# this does not include libraries that we need to compile different projects, we'd like -# them in a different layer. -RUN zypper -n install binutils \ - cmake \ - which \ - gcc \ - llvm-clang \ - tar \ - ncurses-utils \ - curl \ - git \ - sudo && \ - ln -s /usr/bin/clang++ /usr/bin/clang++-3.5 && \ +RUN zypper -n install sudo \ + ncurses-utils && \ zypper clean -a - -# Dependencies of CoreCLR and CoreFX. We need to add an additional repository to get lttng. -RUN zypper addrepo -G http://download.opensuse.org/repositories/devel:/tools:/lttng/openSUSE_13.2/devel:tools:lttng.repo && \ - zypper refresh && \ - zypper -n remove krb5-mini && \ - zypper -n install libunwind \ - libicu \ - lttng-ust \ - libuuid1 \ - libopenssl1_0_0 \ - libcurl4 \ - krb5 && \ - zypper clean -a - # Setup User to match Host User, and give superuser permissions ARG USER_ID=0 RUN useradd -m code_executor -u ${USER_ID} -g wheel diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 93d964540..427995b86 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -232,7 +232,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co $StringContent = $Response.Content.ReadAsStringAsync().Result switch ($Response.Content.Headers.ContentType) { - { ($_ -eq "application/octet-stream") } { $VersionText = [Text.Encoding]::UTF8.GetString($StringContent) } + { ($_ -eq "application/octet-stream") } { $VersionText = $StringContent } { ($_ -eq "text/plain") } { $VersionText = $StringContent } { ($_ -eq "text/plain; charset=UTF-8") } { $VersionText = $StringContent } default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." } diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index ee96ca435..451525269 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -346,7 +346,7 @@ get_latest_version_info() { version_file_url="$uncached_feed/Runtime/$channel/latest.version" else if [ "$coherent" = true ]; then - version_file_url="$uncached_feed/Runtime/$channel/latest.coherent.version" + version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" else version_file_url="$uncached_feed/Sdk/$channel/latest.version" fi diff --git a/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh b/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh index 2fcd4280b..a62ce9ed4 100755 --- a/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh +++ b/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh @@ -13,8 +13,10 @@ if [ $current_userid -ne 0 ]; then fi host_package_name="dotnet-host" +aspnetcore_package_store_package_name="^aspnetcore-store.*" remove_all(){ + apt-get purge -y $aspnetcore_package_store_package_name apt-get purge -y $host_package_name } diff --git a/scripts/obtain/uninstall/dotnet-uninstall-rpm-packages.sh b/scripts/obtain/uninstall/dotnet-uninstall-rpm-packages.sh index d3572ec38..ef7be91af 100755 --- a/scripts/obtain/uninstall/dotnet-uninstall-rpm-packages.sh +++ b/scripts/obtain/uninstall/dotnet-uninstall-rpm-packages.sh @@ -13,9 +13,11 @@ if [ $current_userid -ne 0 ]; then fi host_package_name="dotnet-host" +aspnetcore_package_store_package_name="aspnetcore-store*" remove_all(){ yum remove -y $host_package_name + yum remove -y $aspnetcore_package_store_package_name } is_dotnet_host_installed(){ diff --git a/src/Microsoft.DotNet.Archive/CompressionUtility.cs b/src/Microsoft.DotNet.Archive/CompressionUtility.cs index 0b4e937dc..285799116 100644 --- a/src/Microsoft.DotNet.Archive/CompressionUtility.cs +++ b/src/Microsoft.DotNet.Archive/CompressionUtility.cs @@ -98,7 +98,7 @@ namespace Microsoft.DotNet.Archive } long compressedSize = inStream.Length - inStream.Position; - var lzmaProgress = new LzmaProgress(progress, "Decompressing", outSize, MeasureBy.Output); + var lzmaProgress = new LzmaProgress(progress, LocalizableStrings.Decompressing, outSize, MeasureBy.Output); lzmaProgress.SetProgress(0, 0); decoder.Code(inStream, outStream, compressedSize, outSize, lzmaProgress); lzmaProgress.SetProgress(inStream.Length, outSize); diff --git a/src/Microsoft.DotNet.Archive/IndexedArchive.cs b/src/Microsoft.DotNet.Archive/IndexedArchive.cs index bb4c9bbd1..fb0ef22f6 100644 --- a/src/Microsoft.DotNet.Archive/IndexedArchive.cs +++ b/src/Microsoft.DotNet.Archive/IndexedArchive.cs @@ -380,7 +380,7 @@ namespace Microsoft.DotNet.Archive extractOperations.AsParallel().ForAll(extractOperation => { extractOperation.DoOperation(); - progress.Report("Expanding", Interlocked.Increment(ref opsExecuted), extractOperations.Count); + progress.Report(LocalizableStrings.Expanding, Interlocked.Increment(ref opsExecuted), extractOperations.Count); }); } } diff --git a/src/Microsoft.DotNet.Archive/LocalizableStrings.resx b/src/Microsoft.DotNet.Archive/LocalizableStrings.resx new file mode 100644 index 000000000..9f9b5a9e7 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/LocalizableStrings.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Expanding + + + Decompressing + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj index 9a2cd2cdf..04b8f25be 100644 --- a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj +++ b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj @@ -10,8 +10,13 @@ true + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf new file mode 100644 index 000000000..50f4e8538 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Rozbalení + + + + Decompressing + Dekomprese + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf new file mode 100644 index 000000000..137ac4d1e --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Aufklappen + + + + Decompressing + Dekomprimieren + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf new file mode 100644 index 000000000..0fd56bad0 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Expandiendo + + + + Decompressing + Descomprimiendo + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf new file mode 100644 index 000000000..c39aba992 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Développement + + + + Decompressing + Décompression + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf new file mode 100644 index 000000000..be414bd1a --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Espansione + + + + Decompressing + Decompressione + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf new file mode 100644 index 000000000..f70a95565 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + 展開中 + + + + Decompressing + 圧縮解除中 + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf new file mode 100644 index 000000000..bf7de8172 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + 확장하는 중 + + + + Decompressing + 압축을 푸는 중 + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf new file mode 100644 index 000000000..9772365f1 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Rozwijanie + + + + Decompressing + Dekompresja + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pt-BR.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pt-BR.xlf new file mode 100644 index 000000000..1b3fad0d8 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pt-BR.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Expandindo + + + + Decompressing + Descompactando + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf new file mode 100644 index 000000000..2a8c6091d --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Идет расширение + + + + Decompressing + Идет извлечение + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf new file mode 100644 index 000000000..f1fde5d99 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + Genişletme + + + + Decompressing + Daraltma + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hans.xlf new file mode 100644 index 000000000..65ab99d0b --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hans.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + 正在扩展 + + + + Decompressing + 正在解压缩 + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hant.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hant.xlf new file mode 100644 index 000000000..b5c24cae7 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hant.xlf @@ -0,0 +1,17 @@ + + + + + + Expanding + 正在展開 + + + + Decompressing + 正在解壓縮 + + + + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.it.xlf index 85771b494..a19ec0313 100644 --- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.it.xlf +++ b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.it.xlf @@ -39,7 +39,7 @@ Invalid format in line {0}: {1} - Formato non valido a riga {0}: {1} + Formato non valido alla riga {0}: {1} diff --git a/src/Microsoft.DotNet.Cli.Utils/ITelemetryFilter.cs b/src/Microsoft.DotNet.Cli.Utils/ITelemetryFilter.cs new file mode 100644 index 000000000..a1a8f5a1e --- /dev/null +++ b/src/Microsoft.DotNet.Cli.Utils/ITelemetryFilter.cs @@ -0,0 +1,12 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; + +namespace Microsoft.DotNet.Cli.Utils +{ + public interface ITelemetryFilter + { + IEnumerable Filter(object o); + } +} diff --git a/src/Microsoft.DotNet.Cli.Utils/Product.cs b/src/Microsoft.DotNet.Cli.Utils/Product.cs index 023004ce4..8811847b3 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Product.cs +++ b/src/Microsoft.DotNet.Cli.Utils/Product.cs @@ -7,7 +7,7 @@ namespace Microsoft.DotNet.Cli.Utils { public class Product { - public static readonly string LongName = LocalizableStrings.DotNetCommandLineTools; + public static string LongName => LocalizableStrings.DotNetCommandLineTools; public static readonly string Version = GetProductVersion(); private static string GetProductVersion() diff --git a/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs b/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs index 61691e4a8..51574b3d5 100644 --- a/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs +++ b/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs @@ -15,7 +15,7 @@ namespace Microsoft.DotNet.Cli.Utils public RuntimeConfig(string runtimeConfigPath) { JObject runtimeConfigJson; - using (var streamReader = new StreamReader(new FileStream(runtimeConfigPath, FileMode.Open))) + using (var streamReader = new StreamReader(File.OpenRead(runtimeConfigPath))) { runtimeConfigJson = OpenRuntimeConfig(streamReader); } diff --git a/src/Microsoft.DotNet.Cli.Utils/TelemetryEventEntry.cs b/src/Microsoft.DotNet.Cli.Utils/TelemetryEventEntry.cs new file mode 100644 index 000000000..fbbf9d559 --- /dev/null +++ b/src/Microsoft.DotNet.Cli.Utils/TelemetryEventEntry.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; + +namespace Microsoft.DotNet.Cli.Utils +{ + public static class TelemetryEventEntry + { + public static event EventHandler EntryPosted; + public static ITelemetryFilter TelemetryFilter { get; set; } = new BlockFilter(); + + public static void TrackEvent( + string eventName = null, + IDictionary properties = null, + IDictionary measurements = null) + { + EntryPosted?.Invoke(typeof(TelemetryEventEntry), + new InstrumentationEventArgs(eventName, properties, measurements)); + } + + public static void SendFiltered(object o = null) + { + if (o == null) + { + return; + } + + foreach (ApplicationInsightsEntryFormat entry in TelemetryFilter.Filter(o)) + { + TrackEvent(entry.EventName, entry.Properties, entry.Measurements); + } + } + + public static void Subscribe(Action, + IDictionary> subscriber) + { + void Handler(object sender, InstrumentationEventArgs eventArgs) + { + subscriber(eventArgs.EventName, eventArgs.Properties, eventArgs.Measurements); + } + + EntryPosted += Handler; + } + } + + public class BlockFilter : ITelemetryFilter + { + public IEnumerable Filter(object o) + { + return new List(); + } + } + + public class InstrumentationEventArgs : EventArgs + { + internal InstrumentationEventArgs( + string eventName, + IDictionary properties, + IDictionary measurements) + { + EventName = eventName; + Properties = properties; + Measurements = measurements; + } + + public string EventName { get; } + public IDictionary Properties { get; } + public IDictionary Measurements { get; } + } + + public class ApplicationInsightsEntryFormat + { + public ApplicationInsightsEntryFormat( + string eventName = null, + IDictionary properties = null, + IDictionary measurements = null) + { + EventName = eventName; + Properties = properties; + Measurements = measurements; + } + + public string EventName { get; } + public IDictionary Properties { get; } + public IDictionary Measurements { get; } + } +} diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf index d72c9edf8..1aaef6cd5 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf @@ -14,17 +14,17 @@ {0}: attempting to find command {1} in {2} - {0}: pokus o nalezení příkazu {1} v {2} + {0}: Pokus o nalezení příkazu {1} v {2} {0}: failed to find toolAssembly for {1} - {0}: nepodařilo se najít toolAssembly pro {1} + {0}: Nepodařilo se najít toolAssembly pro {1} {0}: failed to find commandPath {1} - {0}: nepodařilo se najít commandPath {1} + {0}: Nepodařilo se najít commandPath {1} @@ -121,7 +121,7 @@ {0}: attempting to create commandspec - {0}: pokus o vytvoření specifikace příkazu commandspec + {0}: Pokus o vytvoření specifikace příkazu commandspec @@ -131,7 +131,7 @@ {0}: expect deps.json at: {1} - {0}: soubor deps.json se očekává v: {1} + {0}: Soubor deps.json se očekává v: {1} @@ -206,7 +206,7 @@ < {0} exited with {1} in {2} ms. - < {0} skončil s {1} ve {2} ms. + < {0} skončil s {1} za {2} ms. @@ -231,7 +231,7 @@ The command executable for "{0}" was not found. The project may not have been restored or restore failed - run `dotnet restore` - Spustitelný soubor příkazu {0} se nenašel. Projekt zřejmě nebyl obnoven, nebo obnovení selhalo – spusťte příkaz run `dotnet restore`. + 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. diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf index 8b0515edb..03af407f7 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf @@ -14,7 +14,7 @@ {0}: attempting to find command {1} in {2} - {0}: Versuch, Befehl {1} in {2} zu finden + {0}: Nach Befehl {1} wird in {2} gesucht @@ -39,7 +39,7 @@ {0}: attempting to resolve {1} - {0}: Versuch, {1} aufzulösen + {0}: Es wird versucht, {1} aufzulösen @@ -99,7 +99,7 @@ {0}: Attempting to resolve command spec from tool {1} - {0}: Versuch, commandspec aus Tool {1} aufzulösen. + {0}: Es wird versucht, commandspec aus Tool {1} aufzulösen. @@ -121,7 +121,7 @@ {0}: attempting to create commandspec - {0}: Versuch, commandspec zu erstellen + {0}: Es wird versucht, commandspec zu erstellen @@ -161,7 +161,7 @@ The project may not have been restored or restore failed - run `dotnet restore` - Das Projekt wurde möglicherweise nicht wiederhergestellt, oder bei der Wiederherstellung ist ein Fehler aufgetreten - führen Sie `dotnet restore` aus. + Das Projekt wurde möglicherweise nicht wiederhergestellt, oder bei der Wiederherstellung ist ein Fehler aufgetreten. führen Sie "dotnet restore" aus. @@ -206,7 +206,7 @@ < {0} exited with {1} in {2} ms. - < {0} wird in {2} ms mit {1} beendet. + < {0} wurde nach {2} ms mit {1} beendet. @@ -231,7 +231,7 @@ The command executable for "{0}" was not found. The project may not have been restored or restore failed - run `dotnet restore` - Der für "{0}" auszuführende Befehle wurde nicht gefunden. Das Projekt wurde möglicherweise nicht wiederhergestellt, oder bei der Wiederherstellung ist ein Fehler aufgetreten – führen Sie "dotnet restore" aus. + 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. diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf index 793343129..84efa6a29 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf @@ -79,7 +79,7 @@ Specify which project file to use because this '{0}' contains more than one project file. - Specificare il file di progetto da usare perché questo file perché questo elemento '{0}' contiene più file di progetto. + Specificare il file di progetto da usare perché questo elemento '{0}' contiene più file di progetto. diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf index df6ae7af0..88387b742 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf @@ -44,7 +44,7 @@ {0}: Did not find a matching project {1}. - {0}:一致するプロジェクト {1}.が見つかりませんでした。 + {0}: 一致するプロジェクト {1}.が見つかりませんでした。 @@ -69,12 +69,12 @@ {0}: MSBUILD_EXE_PATH = {1} - {0}:MSBUILD_EXE_PATH = {1} + {0}: MSBUILD_EXE_PATH = {1} {0}: MSBuild project path = {1} - {0}:MSBuild project path = {1} + {0}: MSBuild project path = {1} @@ -99,7 +99,7 @@ {0}: Attempting to resolve command spec from tool {1} - {0}:ツール {1} から commandspec を解決しようとしています + {0}: ツール {1} から commandspec を解決しようとしています @@ -161,7 +161,7 @@ The project may not have been restored or restore failed - run `dotnet restore` - プロジェクトが復元されていない可能性があるか、または - run `dotnet restore` の復元に失敗しました。 + プロジェクトが復元されていないか、復元に失敗した可能性があります。`dotnet restore` を実行します @@ -171,7 +171,7 @@ Waiting for debugger to attach. Press ENTER to continue - デバッガーのアタッチを待っています...続行するには、ENTER キーを押してください + デバッガーのアタッチを待っています。続行するには、ENTER キーを押してください diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf index 028f28a5b..ff639f8e2 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf @@ -191,7 +191,7 @@ WriteLine forwarder set previously - WriteLine 전달자가 전에 설정됨 + WriteLine 전달자가 이전에 설정됨 diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf index 49ae8eed0..a36aa643d 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf @@ -105,7 +105,7 @@ {0}: nuget packages root: {1} - {0}: Korzeń pakietów NuGet: + {0}: Katalog główny pakietów NuGet: {1} diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf index 40b6ff0c2..d4bb9fefd 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf @@ -161,7 +161,7 @@ The project may not have been restored or restore failed - run `dotnet restore` - Возможно, проект не был восстановлен или его восстановление завершилось со сбоем, запустите команду "dotnet restore". + Возможно, проект не был восстановлен или его восстановление завершилось со сбоем. Запустите команду "dotnet restore". diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf index 4eb79b65c..f0634cf3e 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf @@ -24,7 +24,7 @@ {0}: failed to find commandPath {1} - {0}: {1} için commandPath bulunamadı + {0}: {1} commandPath bulunamadı diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf index f9baf02cb..6ae013bb9 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf @@ -131,7 +131,7 @@ {0}: expect deps.json at: {1} - {0}: 需要deps.json: {1} + {0}: 需要 deps.json: {1} diff --git a/src/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs b/src/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs index e13637c47..9a89bcb6f 100644 --- a/src/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs +++ b/src/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs @@ -45,10 +45,12 @@ namespace Microsoft.DotNet.Configurer { PrintUnauthorizedAccessMessage(); } + else + { + PrintNugetCachePrimeMessage(); - PrintNugetCachePrimeMessage(); - - _nugetCachePrimer.PrimeCache(); + _nugetCachePrimer.PrimeCache(); + } } } @@ -81,6 +83,8 @@ namespace Microsoft.DotNet.Configurer private bool ShouldPrimeNugetCache() { return ShouldRunFirstRunExperience() && + !_nugetCacheSentinel.Exists() && + !_nugetCacheSentinel.InProgressSentinelAlreadyExists() && !_nugetCachePrimer.SkipPrimingTheCache(); } @@ -96,9 +100,7 @@ namespace Microsoft.DotNet.Configurer var skipFirstTimeExperience = _environmentProvider.GetEnvironmentVariableAsBool("DOTNET_SKIP_FIRST_TIME_EXPERIENCE", false); - return !skipFirstTimeExperience && - !_nugetCacheSentinel.Exists() && - !_nugetCacheSentinel.InProgressSentinelAlreadyExists(); + return !skipFirstTimeExperience; } } } diff --git a/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs b/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs index 463b5bc4a..d7335dee5 100644 --- a/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs +++ b/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs @@ -13,19 +13,24 @@ namespace Microsoft.DotNet.Configurer public static readonly string SENTINEL = $"{Product.Version}.dotnetFirstUseSentinel"; private readonly IFile _file; + private readonly IDirectory _directory; private string _dotnetUserProfileFolderPath; private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL); public FirstTimeUseNoticeSentinel(CliFallbackFolderPathCalculator cliFallbackFolderPathCalculator) : - this(cliFallbackFolderPathCalculator.DotnetUserProfileFolderPath, FileSystemWrapper.Default.File) + this( + cliFallbackFolderPathCalculator.DotnetUserProfileFolderPath, + FileSystemWrapper.Default.File, + FileSystemWrapper.Default.Directory) { } - internal FirstTimeUseNoticeSentinel(string dotnetUserProfileFolderPath, IFile file) + internal FirstTimeUseNoticeSentinel(string dotnetUserProfileFolderPath, IFile file, IDirectory directory) { _file = file; + _directory = directory; _dotnetUserProfileFolderPath = dotnetUserProfileFolderPath; } @@ -38,6 +43,11 @@ namespace Microsoft.DotNet.Configurer { if (!Exists()) { + if (!_directory.Exists(_dotnetUserProfileFolderPath)) + { + _directory.CreateDirectory(_dotnetUserProfileFolderPath); + } + _file.CreateEmptyFile(SentinelPath); } } diff --git a/src/Microsoft.DotNet.Configurer/IUserLevelCacheWriter.cs b/src/Microsoft.DotNet.Configurer/IUserLevelCacheWriter.cs new file mode 100644 index 000000000..c41b55920 --- /dev/null +++ b/src/Microsoft.DotNet.Configurer/IUserLevelCacheWriter.cs @@ -0,0 +1,12 @@ +// 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.Configurer +{ + public interface IUserLevelCacheWriter + { + string RunWithCache(string cacheKey, Func getValueToCache); + } +} diff --git a/src/Microsoft.DotNet.Configurer/NoOpFirstTimeUseNoticeSentinel.cs b/src/Microsoft.DotNet.Configurer/NoOpFirstTimeUseNoticeSentinel.cs new file mode 100644 index 000000000..a801d4ee6 --- /dev/null +++ b/src/Microsoft.DotNet.Configurer/NoOpFirstTimeUseNoticeSentinel.cs @@ -0,0 +1,26 @@ +// 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; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.Extensions.EnvironmentAbstractions; +using NuGet.Configuration; + +namespace Microsoft.DotNet.Configurer +{ + public class NoOpFirstTimeUseNoticeSentinel : IFirstTimeUseNoticeSentinel + { + public bool Exists() + { + return true; + } + + public void CreateIfNotExists() + { + } + + public void Dispose() + { + } + } +} diff --git a/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs b/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs index def087615..bfc7a29d9 100644 --- a/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs +++ b/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs @@ -45,7 +45,7 @@ namespace Microsoft.DotNet.Configurer public bool InProgressSentinelAlreadyExists() { - return CouldNotGetAHandleToTheInProgressSentinel(); + return CouldNotGetAHandleToTheInProgressSentinel() && !UnauthorizedAccess; } public bool Exists() diff --git a/src/Microsoft.DotNet.Configurer/UserLevelCacheWriter.cs b/src/Microsoft.DotNet.Configurer/UserLevelCacheWriter.cs new file mode 100644 index 000000000..9e5fd4a78 --- /dev/null +++ b/src/Microsoft.DotNet.Configurer/UserLevelCacheWriter.cs @@ -0,0 +1,73 @@ +// 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 Microsoft.DotNet.Cli.Utils; +using Microsoft.Extensions.EnvironmentAbstractions; + +namespace Microsoft.DotNet.Configurer +{ + public class UserLevelCacheWriter : IUserLevelCacheWriter + { + private readonly IFile _file; + private readonly IDirectory _directory; + private string _dotnetUserProfileFolderPath; + + public UserLevelCacheWriter(CliFallbackFolderPathCalculator cliFallbackFolderPathCalculator) : + this( + cliFallbackFolderPathCalculator.DotnetUserProfileFolderPath, + FileSystemWrapper.Default.File, + FileSystemWrapper.Default.Directory) + { + } + + public string RunWithCache(string cacheKey, Func getValueToCache) + { + var cacheFilepath = GetCacheFilePath(cacheKey); + try + { + if (!_file.Exists(cacheFilepath)) + { + if (!_directory.Exists(_dotnetUserProfileFolderPath)) + { + _directory.CreateDirectory(_dotnetUserProfileFolderPath); + } + + var runResult = getValueToCache(); + + _file.WriteAllText(cacheFilepath, runResult); + return runResult; + } + else + { + return _file.ReadAllText(cacheFilepath); + } + } + catch (Exception ex) + { + if (ex is UnauthorizedAccessException + || ex is PathTooLongException + || ex is IOException) + { + return getValueToCache(); + } + + throw; + } + + } + + internal UserLevelCacheWriter(string dotnetUserProfileFolderPath, IFile file, IDirectory directory) + { + _file = file; + _directory = directory; + _dotnetUserProfileFolderPath = dotnetUserProfileFolderPath; + } + + private string GetCacheFilePath(string cacheKey) + { + return Path.Combine(_dotnetUserProfileFolderPath, $"{Product.Version}_{cacheKey}.dotnetUserLevelCache"); + } + } +} diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf index 52a1fd5b7..69c2a2361 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf @@ -12,19 +12,15 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - Vítá vás .NET Core! + Vítá vás .NET Core! --------------------- Další informace o .NET Core najdete na https://aka.ms/dotnet-docs. Dostupné příkazy si zobrazíte pomocí dotnet --help, případně přejděte na https://aka.ms/dotnet-cli-docs. Telemetrie -------------- Nástroje .NET Core shromažďují data o využití s cílem vylepšit vaše prostředí. Data jsou anonymní a nezahrnují argumenty příkazového řádku. Data shromažďuje Microsoft, který je sdílí s komunitou. -S telemetrií můžete vyjádřit výslovný nesouhlas, a to nastavením proměnné prostředí DOTNET_CLI_TELEMETRY_OPTOUT na 1 prostřednictvím vašeho oblíbeného rozhraní. -Další informace o telemetrii nástrojů .NET Core si můžete přečíst na webu https://aka.ms/dotnet-cli-telemetry. - -Probíhá konfigurace... -------------------- -Běží příkaz pro počáteční naplnění vaší místní mezipaměti balíčků, aby se vylepšila rychlost obnovování a umožnil se offline přístup. Provádění tohoto příkazu může trvat až minutu a proběhne jen jednou. +S telemetrií můžete vyjádřit výslovný nesouhlas, a to nastavením proměnné prostředí DOTNET_CLI_TELEMETRY_OPTOUT na 1 prostřednictvím svého oblíbeného rozhraní. +Další informace o telemetrii nástrojů .NET Core si můžete přečíst na webu https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Běží příkaz pro počáteční naplnění vaší místní mezipaměti balí Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Probíhá konfigurace... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Běží příkaz pro počáteční naplnění vaší místní mezipaměti balíčků, aby se vylepšila rychlost obnovování a umožnil se offline přístup. Provádění tohoto příkazu může trvat až minutu a proběhne jen jednou. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + Oprávnění ke změně složky {0} bylo zamítnuto. -Here are some options to fix this error: +Tuto chybu můžete opravit pomocí některé z těchto možností: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Znovu spusťte tento příkaz pomocí přístupu se zvýšenou úrovní oprávnění. +2. Zakažte software spouštěný při prvním zapnutí počítače tak, že nastavíte proměnnou prostředí DOTNET_SKIP_FIRST_TIME_EXPERIENCE na hodnotu Pravda. +3. Zkopírujte sadu .NET Core SDK do nechráněného umístění a použijte ji z tohoto umístění. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf index a029697de..e101ef579 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf @@ -12,7 +12,7 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - Willkommen bei .NET Core! + Willkommen bei .NET Core! --------------------- Weitere Informationen zu .NET Core finden Sie unter https://aka.ms/dotnet-docs. Verwenden Sie "dotnet --help", um die verfügbaren Befehle anzuzeigen, oder wechseln Sie zu https://aka.ms/dotnet-cli-docs. @@ -20,11 +20,7 @@ Telemetrie -------------- Über die .NET Core-Tools werden Nutzungsdaten erfasst, damit wir die Benutzeroberfläche weiter für Sie verbessern können. Die Daten sind anonym und enthalten keine Befehlszeilenargumente. Die Daten werden von Microsoft gesammelt und mit der Community geteilt. Sie können die Erfassung von Telemetriedaten deaktivieren, indem Sie die Umgebungsvariable DOTNET_CLI_TELEMETRY_OPTOUT mithilfe Ihrer bevorzugten Shell auf 1 festlegen. -Weitere Informationen zur Telemetrie der .NET Core-Tools finden Sie unter https://aka.ms/dotnet-cli-telemetry. - -Konfiguration wird durchgeführt... -------------------- -Ein Befehl wird ausgeführt, um Ihren lokalen Paketcache erstmals aufzufüllen, die Wiederherstellungsgeschwindigkeit zu verbessern und Onlinezugriff zu ermöglichen. Die Ausführung dieses Befehls nimmt bis zu einer Minute in Anspruch und wird einmalig ausgeführt. +Weitere Informationen zur Telemetrie der .NET Core-Tools finden Sie unter https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Ein Befehl wird ausgeführt, um Ihren lokalen Paketcache erstmals aufzufüllen, Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Konfiguration wird durchgeführt... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Ein Befehl wird ausgeführt, um Ihren lokalen Paketcache erstmals aufzufüllen, die Wiederherstellungsgeschwindigkeit zu verbessern und Onlinezugriff zu ermöglichen. Die Ausführung dieses Befehls nimmt bis zu einer Minute in Anspruch und wird einmalig ausgeführt. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + Die Berechtigung zum Ändern des Ordners "{0}" wurde verweigert. -Here are some options to fix this error: +Im Folgenden finden Sie einige Optionen, um diesen Fehler zu beheben: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Führen Sie diesen Befehl mit erhöhten Zugriffsrechten noch mal aus. +2. Deaktivieren Sie die erste Ausführung, indem Sie die Umgebungsvariable DOTNET_SKIP_FIRST_TIME_EXPERIENCE auf "true" festlegen. +3. Kopieren Sie das .NET Core SDK an einen nicht geschützten Speicherort, und kopieren Sie es von dort. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf index 2033ddcf5..49e0cd07d 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf @@ -12,19 +12,15 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - Bienvenido a .NET Core + Bienvenido a .NET Core --------------------- -Obtenga más información sobre .NET Core en https://aka.ms/dotnet-docs. Use dotnet --help para ver los comandos disponibles o vaya a https://aka.ms/dotnet-cli-docs. +Aprenda sobre .NET Core en https://aka.ms/dotnet-docs. Use dotnet --help para ver los comandos disponibles o vaya a https://aka.ms/dotnet-cli-docs. Telemetría -------------- Las herramientas de .NET Core recopilan datos de uso con el fin de mejorar su experiencia. Los datos son anónimos y no incluyen argumentos de la línea de comandos. Microsoft recopila los datos y los comparte con la comunidad. Si desea optar por no participar en la telemetría, establezca una variable de entorno DOTNET_CLI_TELEMETRY_OPTOUT en 1 con el shell de su preferencia. -Puede leer más información sobre la telemetría de las herramientas de .NET Core en https://aka.ms/dotnet-cli-telemetry. - -Configurando... -------------------- -Un comando se ejecuta para rellenar inicialmente la caché de paquete local a fin de mejorar la velocidad de restauración y permitir el acceso sin conexión. Este comando demorará hasta un minuto para completarse y solo sucederá una vez. +Puede leer más información sobre la telemetría de las herramientas de .NET Core en https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Un comando se ejecuta para rellenar inicialmente la caché de paquete local a fi Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Configurando... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Se está ejecutando un comando para rellenar inicialmente la caché de paquetes local, para mejorar la velocidad de restauración y habilitar el acceso sin conexión. Este comando tardará en completarse un minuto y solo sucederá una vez. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + Permiso denegado para modificar la carpeta "{0}". -Here are some options to fix this error: +Estas son algunas opciones para corregir este error: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Vuelva a ejecutar este comando con acceso con privilegios elevados. +2. Deshabilite la primera experiencia de ejecución; para ello, establezca la variable de entorno DOTNET_SKIP_FIRST_TIME_EXPERIENCE en true. +3. Copie el SDK de .NET Core en una ubicación no protegida y úselo desde ahí. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf index 42e71a3f1..fb9d015ce 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf @@ -12,19 +12,15 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - Bienvenue dans .NET Core ! + Bienvenue dans .NET Core ! --------------------- En savoir plus sur .NET Core @ https://aka.ms/dotnet-docs. Utilisez dotnet --help pour voir les commandes disponibles, ou accédez à https://aka.ms/dotnet-cli-docs. Télémétrie -------------- Les outils .NET Core collectent des données d'utilisation pour améliorer votre expérience utilisateur. Ces données sont anonymes et n'incluent aucun argument de ligne de commande. Les données sont collectées par Microsoft et partagées par la communauté. -Vous pouvez refuser l'adhésion à la télémétrie en assignant la valeur 1 à la variable d'environnement DOTNET_CLI_TELEMETRY_OPTOUT via l'interpréteur de commandes de votre choix. -Pour plus d'informations sur la télémétrie des outils .NET Core, consultez https://aka.ms/dotnet-cli-telemetry. - -Configuration en cours... -------------------- -Une commande s'exécute pour remplir votre cache de package local, améliorer la vitesse de restauration et activer l'accès hors connexion. L'exécution de cette commande peut prendre jusqu'à une minute et n'a lieu qu'une seule fois. +Vous pouvez refuser l'adhésion à la télémétrie en affectant la valeur 1 à la variable d'environnement DOTNET_CLI_TELEMETRY_OPTOUT via l'interpréteur de commandes de votre choix. +Pour plus d'informations sur la télémétrie des outils .NET Core, consultez https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Une commande s'exécute pour remplir votre cache de package local, améliorer la Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Configuration en cours... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Une commande s'exécute pour remplir votre cache de package local, améliorer la vitesse de restauration et activer l'accès hors connexion. L'exécution de cette commande peut prendre jusqu'à une minute et n'a lieu qu'une seule fois. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + Autorisation refusée pour la modification du dossier '{0}'. -Here are some options to fix this error: +Voici quelques options pour corriger cette erreur : --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Réexécutez cette commande avec un accès élevé. +2. Désactivez l'introduction de l'interface logicielle lors de la première utilisation en affectant la valeur true à la variable d'environnement DOTNET_SKIP_FIRST_TIME_EXPERIENCE. +3. Copiez le kit .NET Core SDK à un emplacement non protégé à partir duquel vous l'utiliserez ensuite. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf index 40e6319d8..c24c80849 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf @@ -12,7 +12,7 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - Benvenuti a .NET Core + Benvenuti a .NET Core --------------------- Per altre informazioni su .NET Core, vedere https://aka.ms/dotnet-docs. Per visualizzare i comandi disponibili, usare dotnet --help oppure vedere https://aka.ms/dotnet-cli-docs. @@ -20,11 +20,7 @@ Telemetria -------------- Gli strumenti di .NET Core consentono di raccogliere i dati di utilizzo allo scopo di migliorare l'esperienza. I dati sono anonimi e non includono gli argomenti della riga di comando. Vengono raccolti da Microsoft e condivisi con la community. È possibile escludere la telemetria impostando la variabile di ambiente DOTNET_CLI_TELEMETRY_OPTOUT su 1 nella shell preferita. -Per altre informazioni sulla telemetria degli strumenti di .NET Core, vedere https://aka.ms/dotnet-cli-telemetry. - -Configurazione... -------------------- -È in esecuzione un comando per popolare inizialmente la cache dei pacchetti locale, migliorare la velocità di ripristino e abilitare l'accesso offline. Il completamento di questo comando, che viene eseguito una sola volta, richiede circa un minuto. +Per altre informazioni sulla telemetria degli strumenti di .NET Core, vedere https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Configurazione... Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Configurazione... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +È in esecuzione un comando per popolare inizialmente la cache dei pacchetti locale, migliorare la velocità di ripristino e abilitare l'accesso offline. Il completamento di questo comando, che viene eseguito una sola volta, richiede circa un minuto. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + L'autorizzazione per modificare la cartella '{0}' è stata negata. -Here are some options to fix this error: +Ecco alcune opzioni per correggere questo errore: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Eseguire di nuovo questo comando con privilegi di accesso elevati. +2. Disabilitare il completamento dell'installazione impostando su true la variabile di ambiente DOTNET_SKIP_FIRST_TIME_EXPERIENCE. +3. Copiare .NET Core SDK in un percorso non protetto e usarlo da tale posizione. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf index a0eb36e43..b201c5144 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf @@ -12,7 +12,7 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - .NET Core へようこそ! + .NET Core へようこそ! --------------------- .NET Core について詳しくは、https://aka.ms/dotnet-docs をご覧ください。dotnet --help を使って使用可能なコマンドを確認するか、https://aka.ms/dotnet-cli-docs をご覧ください。 @@ -20,11 +20,7 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te -------------- .NET Core ツールは、操作性を向上させるために利用状況データを収集します。データは匿名で、コマンドライン引数が含まれません。データは Microsoft によって収集され、コミュニティと共有されます。 テレメトリを無効にするには、お好きなシェルを使用して、DOTNET_CLI_TELEMETRY_OPTOUT 環境変数を 1 に設定します。 -.NET Core ツールのテレメトリについて詳しくは、https://aka.ms/dotnet-cli-telemetry をお読みください。 - -構成中... -------------------- -ローカル パッケージ キャッシュを最初に設定し、復元速度を向上させ、オフライン アクセスを可能にするため、コマンドを実行しています。このコマンドは 1 回だけ実行され、最大 1 分かかる場合があります。 +.NET Core ツールのテレメトリについて詳しくは、https://aka.ms/dotnet-cli-telemetry をお読みください。 @@ -36,9 +32,9 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + 構成中... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +ローカル パッケージ キャッシュを最初に設定し、復元速度を向上させ、オフライン アクセスを可能にするため、コマンドを実行しています。このコマンドは 1 回だけ実行され、完了までに最大 1 分かかる場合があります。 @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + '{0}' フォルダーを変更するためのアクセス許可が拒否されました。 -Here are some options to fix this error: +このエラーを修正するためのいくつかのオプションを次に示します。 --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. 昇格したアクセス権でこのコマンドを再実行します。 +2. 環境変数 DOTNET_SKIP_FIRST_TIME_EXPERIENCE を true に設定して、最初の実行エクスペリエンスを無効にします。 +3. 保護されていない場所に .NET Core SDK をコピーし、そこから使用します。 diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf index 912a1935c..6f912a283 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf @@ -12,7 +12,7 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - NET Core를 시작합니다! + .NET Core를 시작합니다! --------------------- .NET Core에 대한 자세한 내용은 https://aka.ms/dotnet-docs를 참조하세요. 사용 가능한 명령을 보려면 dotnet --help를 사용하거나 https://aka.ms/dotnet-cli-docs를 방문하세요. @@ -20,11 +20,7 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te -------------- .NET Core 도구는 사용자 환경 개선을 위해 사용량 데이터를 수집합니다. 데이터는 익명이며 명령줄 인수를 포함하지 않습니다. Microsoft에서 데이터를 수집하여 커뮤니티와 공유합니다. 자주 사용하는 셸에서 DOTNET_CLI_TELEMETRY_OPTOUT 환경 변수를 1로 설정하여 원격 분석을 옵트아웃할 수 있습니다. -.NET Core 도구 원격 분석에 대한 자세한 내용은 https://aka.ms/dotnet-cli-telemetry에서 확인할 수 있습니다. - -구성 중... -------------------- -초기에 로컬 패키지 캐시를 채우고, 복원 속도를 개선하고, 오프라인 액세스를 사용하도록 설정하기 위한 명령을 실행 중입니다. 완료하는 데 최대 1분이 소요되며 한 번만 실행됩니다. +.NET Core 도구 원격 분석에 대한 자세한 내용은 https://aka.ms/dotnet-cli-telemetry에서 확인할 수 있습니다. @@ -36,9 +32,9 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + 구성 중... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +초기에 로컬 패키지 캐시를 채우고, 복원 속도를 개선하고, 오프라인 액세스를 사용하도록 설정하기 위한 명령을 실행하고 있습니다. 완료하는 데 최대 1분이 소요되며 한 번만 실행됩니다. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + '{0}' 폴더를 수정하는 데 필요한 사용 권한이 거부되었습니다. -Here are some options to fix this error: +이 오류를 해결하기 위한 옵션을 다음과 같습니다. --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. 높은 액세스 권한으로 이 명령을 다시 실행합니다. +2. 환경 변수 DOTNET_SKIP_FIRST_TIME_EXPERIENCE를 true로 설정하여 첫 실행 경험을 사용하지 않습니다. +3. .NET Core SDK를 보호되지 않은 위치로 복사한 후 이 위치에서 사용합니다. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf index d998cc666..e2d132a85 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf @@ -12,7 +12,7 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - .NET Core — Zapraszamy! + .NET Core — Zapraszamy! --------------------- Więcej informacji o programie .NET Core znajdziesz na stronie https://aka.ms/dotnet-docs. Aby wyświetlić dostępne polecenia, użyj polecenia dotnet --help lub przejdź na stronę https://aka.ms/dotnet-cli-docs. @@ -20,11 +20,7 @@ Telemetria -------------- Narzędzia programu .NET Core zbierają dane dotyczące użycia w celu ulepszenia Twojego środowiska pracy. Dane te są anonimowe i nie obejmują argumentów wiersza polecenia. Zbiera je firma Microsoft i udostępnia społeczności. Z telemetrii można zrezygnować, ustawiając zmienną środowiskową DOTNET_CLI_TELEMETRY_OPTOUT na wartość 1 przy użyciu ulubionej powłoki. -Więcej informacji na temat telemetrii narzędzi programu .NET Core możesz znaleźć na stronie https://aka.ms/dotnet-cli-telemetry. - -Trwa konfigurowanie… -------------------- -Wykonywane jest polecenie w celu wstępnego wypełnienia lokalnej pamięci podręcznej pakietów, poprawy szybkości przywracania i włączenia dostępu offline. Wykonanie tego polecenia jest jednorazowe i zajmie maksymalnie minutę. +Więcej informacji na temat telemetrii narzędzi programu .NET Core możesz znaleźć na stronie https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Wykonywane jest polecenie w celu wstępnego wypełnienia lokalnej pamięci podr Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Trwa konfigurowanie… ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Wykonywane jest polecenie w celu wstępnego wypełnienia lokalnej pamięci podręcznej pakietów, poprawy szybkości przywracania i włączenia dostępu offline. Wykonanie tego polecenia jest jednorazowe i zajmie maksymalnie minutę. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + Odmowa uprawnień do zmodyfikowania folderu „{0}”. -Here are some options to fix this error: +Oto kilka opcji naprawiania tego błędu: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Uruchom to polecenie ponownie z podwyższonym poziomem uprawnień. +2. Wyłącz środowisko pierwszego uruchomienia, ustawiając dla zmiennej środowiskowej DOTNET_SKIP_FIRST_TIME_EXPERIENCE wartość true. +3. Skopiuj zestaw .NET Core SDK do lokalizacji niechronionej i tam z niego korzystaj. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf index b6677da51..0a789402b 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf @@ -12,19 +12,15 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - Bem-vindo ao .NET Core! + Bem-vindo ao .NET Core! --------------------- Saiba mais sobre o .NET Core em https://aka.ms/dotnet-docs. Use dotnet --help para ver os comandos disponíveis ou acesse https://aka.ms/dotnet-cli-docs. Telemetria -------------- As ferramentas do .NET Core coletam dados de uso para melhorar sua experiência. Os dados são anônimos e não incluem argumentos de linha de comando. Os dados são coletados pela Microsoft e compartilhados com a comunidade. -É possível recusar a telemetria definindo uma variável de ambiente DOTNET_CLI_TELEMETRY_OPTOUT como 1 usando seu shell favorito. -Leia mais sobre a telemetria das ferramentas do .NET Core em https://aka.ms/dotnet-cli-telemetry. - -Configurando... -------------------- -Um comando está sendo executado para popular inicialmente o cache do pacote local, a fim de melhorar a velocidade de restauração e habilitar o acesso offline. Esse comando levará até um minuto para ser concluído e só ocorrerá uma vez. +É possível recusar a telemetria ao configurar uma variável de ambiente DOTNET_CLI_TELEMETRY_OPTOUT como 1 usando seu shell favorito. +Leia mais sobre a telemetria das ferramentas do .NET Core em https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Um comando está sendo executado para popular inicialmente o cache do pacote loc Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Configurando... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Um comando está sendo executado para popular inicialmente o cache do pacote local, a fim de melhorar a velocidade de restauração e habilitar o acesso offline. Esse comando levará até um minuto para ser concluído e só ocorrerá uma vez. @@ -50,14 +46,14 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + Permissão negada para modificar a pasta '{0}'. -Here are some options to fix this error: +Aqui estão algumas opções para consertar este erro: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. - +1. Execute este comando novamente com acesso elevado. +2. Desabilite a primeira experiência de execução ao configurar a variável de ambiente DOTNET_SKIP_FIRST_TIME_EXPERIENCE como verdadeira. +3. Copie o SDK do .NET Core para uma localização não protegida e use-o de lá. + diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf index f1f42e9a2..46ceb61ef 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf @@ -12,7 +12,7 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - Добро пожаловать в .NET Core! + Добро пожаловать в .NET Core! --------------------- Дополнительные сведения о .NET Core можно получить по адресу https://aka.ms/dotnet-docs. Для просмотра доступных команд используйте dotnet --help или перейдите на страницу https://aka.ms/dotnet-cli-docs. @@ -20,11 +20,7 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te -------------- Средства .NET Core собирают данные об использовании для улучшения взаимодействия с пользователем. Эти данные анонимны и не включают в себя аргументы командной строки. Сбор данных осуществляется корпорацией Майкрософт, которая предоставляет их сообществу. Вы можете явно отказаться от телеметрии, присвоив переменной среды DOTNET_CLI_TELEMETRY_OPTOUT значение 1 с помощью предпочитаемой оболочки. -Дополнительные сведения о телеметрии в средствах .NET Core см. по адресу https://aka.ms/dotnet-cli-telemetry. - -Настройка... -------------------- -Выполняется команда для изначального заполнения локального кэша пакетов, повышения скорости восстановления и обеспечения автономного доступа. Ее выполнение может занять до одной минуты и имеет единоразовый характер. +Дополнительные сведения о телеметрии в средствах .NET Core см. по адресу https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Идет настройка... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Выполняется команда для изначального заполнения локального кэша пакетов, повышения скорости восстановления и обеспечения автономного доступа. Ее выполнение может занять до одной минуты и производится только раз. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + Отменено разрешение на изменение папки "{0}". -Here are some options to fix this error: +Ниже приведено несколько способов устранения этой ошибки. --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Повторно выполните эту команду с правами повышенного доступа. +2. Отключите возможность первого запуска, задав для переменной среды DOTNET_SKIP_FIRST_TIME_EXPERIENCE значение "true". +3. Скопируйте пакет SDK для .NET Core в незащищенное расположение и используйте его оттуда. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf index 33a88c8e1..b5762bc81 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf @@ -12,19 +12,15 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - .NET Core’a Hoş Geldiniz! + .NET Core’a Hoş Geldiniz! --------------------- -.NET Core hakkında daha fazla bilgiyi https://aka.ms/dotnet-docs adresinde bulabilirsiniz. Kullanılabilir komutları görmek için dotnet --help kullanın veya https://aka.ms/dotnet-cli-docs adresine gidin. +.NET Core hakkında daha fazla bilgi için bkz. https://aka.ms/dotnet-docs. Kullanılabilir komutları görmek için dotnet --help komutunu kullanın veya https://aka.ms/dotnet-cli-docs adresine gidin. Telemetri -------------- .NET Core araçları, deneyiminizi iyileştirmek için kullanım verileri toplar. Veriler anonimdir ve komut satırı bağımsız değişkenlerini içermez. Veriler Microsoft tarafından toplanır ve topluluk ile paylaşılır. -Sık kullandığınız kabuk aracılığıyla DOTNET_CLI_TELEMETRY_OPTOUT ortam değişkenini 1 değerine ayarlayarak telemetriyi geri çevirebilirsiniz. -.NET Core araç telemetrisi hakkında daha faza bilgiyi https://aka.ms/dotnet-cli-telemetry adresinde bulabilirsiniz. - -Yapılandırılıyor... -------------------- -Yerel paket önbelleğinizi başlangıçta doldurmak, geri yükleme hızını artırmak ve çevrimdışı erişimi etkinleştirmek için bir komut çalıştırılıyor. Bu komutun tamamlanması yaklaşık bir dakika sürer ve bu işlem yalnızca bir kez gerçekleştirilir. +Sık kullandığınız kabuk aracılığıyla DOTNET_CLI_TELEMETRY_OPTOUT ortam değişkenini 1 değerine ayarlayarak telemetri toplanmasını geri çevirebilirsiniz. +.NET Core araçları telemetrisi hakkında daha faza bilgi için bkz. https://aka.ms/dotnet-cli-telemetry. @@ -36,9 +32,9 @@ Yerel paket önbelleğinizi başlangıçta doldurmak, geri yükleme hızını ar Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + Yapılandırılıyor... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +Yerel paket önbelleğinizi başlangıçta doldurmak, geri yükleme hızını artırmak ve çevrimdışı erişimi etkinleştirmek için bir komut çalıştırılıyor. Bu komutun tamamlanması yaklaşık bir dakika sürer ve bu işlem yalnızca bir kez gerçekleştirilir. @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + '{0}' klasörünü değiştirme izni verilmedi. -Here are some options to fix this error: +Bu hatayı düzeltmek için bazı seçenekler: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. Bu komutu yükseltilmiş erişim ile yeniden çalıştırın. +2. DOTNET_SKIP_FIRST_TIME_EXPERIENCE ortam değişkenini true olarak ayarlayarak ilk çalıştırma deneyimini devre dışı bırakın. +3. .NET Core SDK’sını korumasız bir konuma kopyalayarak oradan kullanın. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf index 99f5c4d5c..7c5bfae32 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf @@ -12,7 +12,7 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - 欢迎使用 .NET Core! + 欢迎使用 .NET Core! --------------------- 若要详细了解 .NET Core,请访问 https://aka.ms/dotnet-docs。使用 dotnet --help 查看可用的命令或转到 https://aka.ms/dotnet-cli-docs。 @@ -20,11 +20,7 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te -------------- .NET Core 收集使用情况数据,以便改善用户体验。数据是匿名的且不包含命令行参数。数据由 Microsoft 收集,并与社区共享。 可选择使用你最喜爱的 shell 将 DOTNET_CLI_TELEMETRY_OPTOUT 环境变量设置为 1,从而退出遥测。 -若要深入了解 .NET Core 工具遥测,请访问 https://aka.ms/dotnet-cli-telemetry。 - -正在配置... -------------------- -正在运行一项命令,以初步填充本地包缓存,从而提高还原速度并启用脱机访问。此命令最长需要一分钟才能完成,且仅可运行一次。 +若要深入了解 .NET Core 工具遥测,请访问 https://aka.ms/dotnet-cli-telemetry。 @@ -36,9 +32,9 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + 正在配置... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +正在运行一项命令,以初步填充本地包缓存,从而提高还原速度并启用脱机访问。此命令最长需要一分钟才能完成,且仅可运行一次。 @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + 修改“{0}”文件夹的权限被拒绝。 -Here are some options to fix this error: +以下是修复该错误的选项: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. 以提升的访问权限重新运行该命令。 +2. 通过将环境变量 DOTNET_SKIP_FIRST_TIME_EXPERIENCE 设置为 true,禁用首次运行体验。 +3. 将 .NET Core SDK 复制到未受保护的位置并从该位置使用。 diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf index be7388cbc..5efc8642e 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf @@ -12,19 +12,15 @@ Telemetry The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry. - 歡迎使用 .NET Core! + 歡迎使用 .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。 -您可深入閱讀 .NET Core 工具遙測 @ https://aka.ms/dotnet-cli-telemetry。 - -正在設定... -------------------- -正在執行命令以初始將您的本機套件快取填入,進而改善還原速度並啟用離線存取。此命令最多需要一分鐘完成,且只會進行一次。 +.NET Core 工具會收集使用方式資料,以改善您的體驗。資料為匿名形式,且不含命令列引數。資料由 Microsoft 收集並會與社群共用。 +使用您慣用的殼層,將 DOTNET_CLI_TELEMETRY_OPTOUT 環境變數設定為 1,即可退出遙測。 +您可深入閱讀 .NET Core 工具遙測 @ https://aka.ms/dotnet-cli-telemetry。 @@ -36,9 +32,9 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. - Configuring... + 正在設定... ------------------- -A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. +執行命令以初步填入您的本機套件快取,以改善還原速度並允許離線存取。此命令最長需要一分鐘的時間才可完成,且只會進行一次。 @@ -50,13 +46,13 @@ Here are some options to fix this error: 2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. 3. Copy the .NET Core SDK to a non-protected location and use it from there. - Permission denied to modify the '{0}' folder. + 權限無法修改 '{0}' 資料夾。 -Here are some options to fix this error: +以下為修正此錯誤的一些選項: --------------------- -1. Re-run this command with elevated access. -2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true. -3. Copy the .NET Core SDK to a non-protected location and use it from there. +1. 利用較高的存取權再次執行此命令。 +2. 將環境變數 DOTNET_SKIP_FIRST_TIME_EXPERIENCE 設定為 true,停用第一次的執行體驗。 +3. 將 .NET Core SDK 複製到不受保護的位置,並於該處使用此 SDK。 diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs b/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs index afb2fd32a..74abc2a61 100644 --- a/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs +++ b/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs @@ -2,11 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // NOTE: Currently, only the NET46 build ships (with Visual Studio/desktop msbuild), -// but the netstandard1.3 adaptation here acts a proof-of-concept for cross-platform +// but 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. -#if NETSTANDARD1_3 +#if NETSTANDARD1_5 +using System; using System.Runtime.InteropServices; using System.Text; @@ -16,6 +17,14 @@ namespace Microsoft.DotNet.MSBuildSdkResolver { internal static readonly bool RunningOnWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + internal static string realpath(string path) + { + var ptr = unix_realpath(path, IntPtr.Zero); + var result = Marshal.PtrToStringAnsi(ptr); // uses UTF8 on Unix + unix_free(ptr); + return result; + } + private static int hostfxr_resolve_sdk(string exe_dir, string working_dir, [Out] StringBuilder buffer, int buffer_size) { // hostfxr string encoding is platform -specific so dispatch to the @@ -31,7 +40,14 @@ namespace Microsoft.DotNet.MSBuildSdkResolver // CharSet.Ansi is UTF8 on Unix [DllImport("hostfxr", EntryPoint = nameof(hostfxr_resolve_sdk), CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] private static extern int unix_hostfxr_resolve_sdk(string exe_dir, string working_dir, [Out] StringBuilder buffer, int buffer_size); + + // CharSet.Ansi is UTF8 on Unix + [DllImport("libc", EntryPoint = nameof(realpath), CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] + private static extern IntPtr unix_realpath(string path, IntPtr buffer); + + [DllImport("libc", EntryPoint = "free", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] + private static extern void unix_free(IntPtr ptr); } } -#endif // NETSTANDARD1_3 \ No newline at end of file +#endif // NETSTANDARD1_5 \ No newline at end of file diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs b/src/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs index b4358a0c7..08a552479 100644 --- a/src/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs +++ b/src/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Reflection; namespace Microsoft.DotNet.MSBuildSdkResolver { @@ -64,6 +65,7 @@ namespace Microsoft.DotNet.MSBuildSdkResolver + " the version specified in global.json." }); } + string minimumMSBuildVersionString = GetMinimumMSBuildVersion(netcoreSdkDir); var minimumMSBuildVersion = Version.Parse(minimumMSBuildVersionString); if (context.MSBuildVersion < minimumMSBuildVersion) @@ -77,6 +79,18 @@ namespace Microsoft.DotNet.MSBuildSdkResolver + " version currently available." }); } + + string minimumVSDefinedSDKVersion = GetMinimumVSDefinedSDKVersion(); + if (IsNetCoreSDKSmallerThanTheMinimumVersion(netcoreSdkVersion, minimumVSDefinedSDKVersion)) + { + return factory.IndicateFailure( + new[] + { + $"Version {netcoreSdkVersion} of the .NET Core SDK is smaller than the minimum version" + + $" {minimumVSDefinedSDKVersion} required by Visual Studio. Check that a recent enough" + + " .NET Core SDK is installed or increase the version specified in global.json." + }); + } } string msbuildSdkDir = Path.Combine(msbuildSdksDir, sdkReference.Name, "Sdk"); @@ -107,6 +121,22 @@ namespace Microsoft.DotNet.MSBuildSdkResolver return File.ReadLines(minimumVersionFilePath).First().Trim(); } + private static string GetMinimumVSDefinedSDKVersion() + { + string dotnetMSBuildSdkResolverDirectory = + Path.GetDirectoryName(typeof(DotNetMSBuildSdkResolver).GetTypeInfo().Assembly.Location); + string minimumVSDefinedSdkVersionFilePath = + Path.Combine(dotnetMSBuildSdkResolverDirectory, "minimumVSDefinedSDKVersion"); + + if (!File.Exists(minimumVSDefinedSdkVersionFilePath)) + { + // smallest version that is required by VS 15.3. + return "1.0.4"; + } + + return File.ReadLines(minimumVSDefinedSdkVersionFilePath).First().Trim(); + } + private bool IsNetCoreSDKSmallerThanTheMinimumVersion(string netcoreSdkVersion, string minimumVersion) { FXVersion netCoreSdkFXVersion; @@ -144,8 +174,18 @@ namespace Microsoft.DotNet.MSBuildSdkResolver } var environmentProvider = new EnvironmentProvider(_getEnvironmentVariable); + var dotnetExe = environmentProvider.GetCommandPath("dotnet"); - return Path.GetDirectoryName(environmentProvider.GetCommandPath("dotnet")); +#if NETSTANDARD1_5 + if (dotnetExe != null && !Interop.RunningOnWindows) + { + // e.g. on Linux the 'dotnet' command from PATH is a symlink so we need to + // resolve it to get the actual path to the binary + dotnetExe = Interop.realpath(dotnetExe) ?? dotnetExe; + } +#endif + + return Path.GetDirectoryName(dotnetExe); } } } diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj index 335eed3ce..ca8867c75 100644 --- a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj +++ b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj @@ -3,8 +3,8 @@ $(SdkVersion) - netstandard1.3;net46 - netstandard1.3 + netstandard1.5;net46 + netstandard1.5 AnyCPU win-x86;win-x64 true @@ -20,7 +20,7 @@ - + diff --git a/src/dotnet/BuiltInCommandsCatalog.cs b/src/dotnet/BuiltInCommandsCatalog.cs index 68bfdb1ab..25c69fdbd 100644 --- a/src/dotnet/BuiltInCommandsCatalog.cs +++ b/src/dotnet/BuiltInCommandsCatalog.cs @@ -143,6 +143,10 @@ namespace Microsoft.DotNet.Cli ["parse"] = new BuiltInCommandMetadata { Command = ParseCommand.Run + }, + ["internal-reportinstallsuccess"] = new BuiltInCommandMetadata + { + Command = InternalReportinstallsuccess.Run } }; } diff --git a/src/dotnet/CommandLine/CommandLineValidationMessages.cs b/src/dotnet/CommandLine/CommandLineValidationMessages.cs new file mode 100644 index 000000000..1321559d5 --- /dev/null +++ b/src/dotnet/CommandLine/CommandLineValidationMessages.cs @@ -0,0 +1,43 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Linq; + +namespace Microsoft.DotNet.Cli.CommandLine +{ + internal sealed class CommandLineValidationMessages : IValidationMessages + { + public string CommandAcceptsOnlyOneArgument(string command, int argumentCount) => + string.Format(LocalizableStrings.CommandAcceptsOnlyOneArgument, command, argumentCount); + + public string CommandAcceptsOnlyOneSubcommand(string command, string subcommandsSpecified) => + string.Format(LocalizableStrings.CommandAcceptsOnlyOneSubcommand, command, subcommandsSpecified); + + public string FileDoesNotExist(string filePath) => + string.Format(LocalizableStrings.FileDoesNotExist, filePath); + + public string NoArgumentsAllowed(string option) => + string.Format(LocalizableStrings.NoArgumentsAllowed, option); + + public string OptionAcceptsOnlyOneArgument(string option, int argumentCount) => + string.Format(LocalizableStrings.OptionAcceptsOnlyOneArgument, option, argumentCount); + + public string RequiredArgumentMissingForCommand(string command) => + string.Format(LocalizableStrings.RequiredArgumentMissingForCommand, command); + + public string RequiredArgumentMissingForOption(string option) => + string.Format(LocalizableStrings.RequiredArgumentMissingForOption, option); + + public string RequiredCommandWasNotProvided() => + string.Format(LocalizableStrings.RequiredCommandWasNotProvided); + + public string UnrecognizedArgument(string unrecognizedArg, string[] allowedValues) => + string.Format(LocalizableStrings.UnrecognizedArgument, unrecognizedArg, $"\n\t{string.Join("\n\t", allowedValues.Select(v => $"'{v}'"))}"); + + public string UnrecognizedCommandOrArgument(string arg) => + string.Format(LocalizableStrings.UnrecognizedCommandOrArgument, arg); + + public string UnrecognizedOption(string unrecognizedOption, string[] allowedValues) => + string.Format(LocalizableStrings.UnrecognizedOption, unrecognizedOption, $"\n\t{string.Join("\n\t", allowedValues.Select(v => $"'{v}'"))}"); + } +} diff --git a/src/dotnet/CommandLine/LocalizableStrings.resx b/src/dotnet/CommandLine/LocalizableStrings.resx index 0859e0db6..b9051ddad 100644 --- a/src/dotnet/CommandLine/LocalizableStrings.resx +++ b/src/dotnet/CommandLine/LocalizableStrings.resx @@ -180,4 +180,37 @@ Any extra options that should be passed to MSBuild. See 'dotnet msbuild -h' for available options. + + Command '{0}' only accepts a single argument but {1} were provided. + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + + + File does not exist: {0} + + + Arguments not allowed for option: {0} + + + Option '{0}' only accepts a single argument but {1} were provided. + + + Required argument missing for command: {0} + + + Required argument missing for option: {0} + + + Required command was not provided. + + + Argument '{0}' not recognized. Must be one of: {1} + + + Unrecognized command or argument '{0}' + + + Option '{0}' not recognized. Must be one of: {1} + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.cs.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.cs.xlf index d271aa95a..529936172 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.cs.xlf @@ -107,6 +107,61 @@ Nebyla zadána povinná hodnota parametru {0}. + + Command '{0}' only accepts a single argument but {1} were provided. + Příkaz {0} přijímá pouze jediný argument, ale bylo zadáno více argumentů ({1}). + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + Příkaz {0} přijímá pouze jediný příkaz v podnabídce, ale bylo zadáno více příkazů v podnabídce: {1}. + + + + File does not exist: {0} + Neexistující soubor: {0} + + + + Arguments not allowed for option: {0} + Pro možnost {0} nejsou argumenty povoleny. + + + + Option '{0}' only accepts a single argument but {1} were provided. + Možnost {0} přijímá pouze jediný argument, ale bylo zadáno více argumentů ({1}). + + + + Required argument missing for command: {0} + Chybí povinný argument pro příkaz: {0}. + + + + Required argument missing for option: {0} + Chybí povinný argument pro možnost: {0}. + + + + Required command was not provided. + Požadovaný příkaz nebyl zadán. + + + + Argument '{0}' not recognized. Must be one of: {1} + Argument {0} nebyl rozpoznán. Musí se jednat o jeden z těchto argumentů: {1}. + + + + Unrecognized command or argument '{0}' + Nerozpoznaný příkaz nebo argument: {0} + + + + Option '{0}' not recognized. Must be one of: {1} + Možnost {0} nebyla rozpoznána. Musí se jednat o jednu z těchto možností: {1}. + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.de.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.de.xlf index 7ad90723a..d291993ff 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.de.xlf @@ -107,6 +107,61 @@ Der erforderliche Wert für die Option "{0}" wurde nicht angegeben. + + Command '{0}' only accepts a single argument but {1} were provided. + Der Befehl "{0}" akzeptiert nur ein einzelnes Argument, es wurden aber {1} angegeben. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + Der Befehl "{0}" akzeptiert nur einen einzelnen Unterbefehl, es wurden aber mehrere angegeben: {1} + + + + File does not exist: {0} + Die Datei ist nicht vorhanden: {0} + + + + Arguments not allowed for option: {0} + Nicht zulässige Argumente für die Option: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + Die Option "{0}" akzeptiert nur ein einzelnes Argument, es wurden aber {1} angegeben. + + + + Required argument missing for command: {0} + Ein erforderliches Argument fehlt für den Befehl: {0} + + + + Required argument missing for option: {0} + Ein erforderliches Argument fehlt für die Option: {0} + + + + Required command was not provided. + Der erforderliche Befehl wurde nicht bereitgestellt. + + + + Argument '{0}' not recognized. Must be one of: {1} + Das Argument "{0}" wurde nicht erkannt. Folgendes ist erforderlich: {1} + + + + Unrecognized command or argument '{0}' + Befehl oder Argument "{0}" nicht erkannt + + + + Option '{0}' not recognized. Must be one of: {1} + Die Option "{0}" wurde nicht erkannt. Folgendes ist erforderlich: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.es.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.es.xlf index 2f0a1e7e3..e8bf947f7 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.es.xlf @@ -107,6 +107,61 @@ No se ha proporcionado el valor requerido para la opción "{0}". + + Command '{0}' only accepts a single argument but {1} were provided. + El comando "{0}" solo acepta un argumento, pero se proporcionaron {1}. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + El comando "{0}" solo acepta un subcomando, pero se proporcionaron varios: {1}. + + + + File does not exist: {0} + El archivo no existe: {0} + + + + Arguments not allowed for option: {0} + No se permiten argumentos para la opción: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + La opción "{0}" solo acepta un argumento, pero se proporcionaron {1}. + + + + Required argument missing for command: {0} + Falta un argumento necesario para el comando: {0} + + + + Required argument missing for option: {0} + Falta un argumento necesario para la opción: {0} + + + + Required command was not provided. + No se proporcionó el comando requerido. + + + + Argument '{0}' not recognized. Must be one of: {1} + No se reconoce el argumento "{0}". Debe ser uno de: {1} + + + + Unrecognized command or argument '{0}' + No se reconoce el comando o el argumento "{0}" + + + + Option '{0}' not recognized. Must be one of: {1} + No se reconoce la opción "{0}". Debe ser una de: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.fr.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.fr.xlf index 95bb4f4f1..c788f87f0 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.fr.xlf @@ -107,6 +107,61 @@ La valeur nécessaire pour l'option '{0}' n'a pas été fournie. + + Command '{0}' only accepts a single argument but {1} were provided. + La commande '{0}' n'accepte qu'un seul argument mais {1} d'entre eux ont été fournis. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + La commande '{0}' n'accepte qu'une seule sous-commande mais plusieurs d'entre elles ont été fournies : {1} + + + + File does not exist: {0} + Le fichier n'existe pas : {0} + + + + Arguments not allowed for option: {0} + Arguments non autorisés pour l'option : {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + L'option '{0}' n'accepte qu'un seul argument mais {1} d'entre eux ont été fournis. + + + + Required argument missing for command: {0} + Argument obligatoire manquant pour la commande : {0} + + + + Required argument missing for option: {0} + Argument obligatoire manquant pour l'option : {0} + + + + Required command was not provided. + La commande nécessaire n'a pas été fournie. + + + + Argument '{0}' not recognized. Must be one of: {1} + Argument '{0}' non reconnu. Il doit faire partie de : {1} + + + + Unrecognized command or argument '{0}' + Commande ou argument non reconnu : '{0}' + + + + Option '{0}' not recognized. Must be one of: {1} + Option '{0}' non reconnue. Elle doit faire partie de : {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.it.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.it.xlf index a3b1973da..14961a263 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.it.xlf @@ -107,6 +107,61 @@ Il valore obbligatorio per l'opzione '{0}' non è stato specificato. + + Command '{0}' only accepts a single argument but {1} were provided. + Il comando '{0}' accetta un solo argomento, ma ne sono stati forniti {1}. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + Il comando '{0}' accetta un solo sottocomando, ma ne è stato fornito più di uno: {1} + + + + File does not exist: {0} + Il file {0} non esiste + + + + Arguments not allowed for option: {0} + Argomenti non consentiti per l'opzione: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + L'opzione '{0}' accetta un solo argomento, ma ne sono stati forniti {1}. + + + + Required argument missing for command: {0} + Manca l'argomento obbligatorio per il comando: {0} + + + + Required argument missing for option: {0} + Manca l'argomento obbligatorio per l'opzione: {0} + + + + Required command was not provided. + Il comando obbligatorio non è stato specificato. + + + + Argument '{0}' not recognized. Must be one of: {1} + L'argomento '{0}' non è riconosciuto. Deve essere uno dei seguenti: {1} + + + + Unrecognized command or argument '{0}' + Il comando o l'argomento '{0}' non è stato riconosciuto + + + + Option '{0}' not recognized. Must be one of: {1} + L'opzione '{0}' non è riconosciuta. Deve essere una delle seguenti: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.ja.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.ja.xlf index 31a44a92a..50971bca9 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.ja.xlf @@ -107,6 +107,61 @@ オプション '{0}' に必要な値が指定されませんでした。 + + Command '{0}' only accepts a single argument but {1} were provided. + コマンド '{0}' は 1 つの引数のみを受け入れますが、{1} が指定されました。 + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + コマンド '{0}' は 1 つのサブコマンドのみを受け入れますが、複数指定されました: {1} + + + + File does not exist: {0} + ファイルが存在しません: {0} + + + + Arguments not allowed for option: {0} + 引数をオプションで使用できません: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + オプション '{0}' は 1 つの引数のみを受け入れますが、{1} 個指定されました。 + + + + Required argument missing for command: {0} + 必要な引数がコマンドにありません: {0} + + + + Required argument missing for option: {0} + 必要な引数がオプションにありません: {0} + + + + Required command was not provided. + 必要なコマンドが指定されませんでした。 + + + + Argument '{0}' not recognized. Must be one of: {1} + 引数 '{0}' は認識されません。次のいずれかである必要があります: {1} + + + + Unrecognized command or argument '{0}' + 認識されないコマンドまたは引数 '{0}' + + + + Option '{0}' not recognized. Must be one of: {1} + オプション '{0}' は認識されません。次のいずれかである必要があります: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.ko.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.ko.xlf index 0a7b6839a..31d7d28bb 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.ko.xlf @@ -107,6 +107,61 @@ 옵션 '{0}'에 대해 필요한 값이 제공되지 않았습니다. + + Command '{0}' only accepts a single argument but {1} were provided. + ‘{0}’ 명령은 단일 인수만 허용하는데, {1}이(가) 제공되었습니다. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + ‘{0}’ 명령은 단일 하위 명령만 허용하는데, 여러 하위 명령이 제공되었습니다. {1} + + + + File does not exist: {0} + 파일이 없습니다. {0} + + + + Arguments not allowed for option: {0} + 옵션에 대해 인수가 허용되지 않습니다. {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + '{0}' 옵션은 단일 인수만 허용하는데, {1}이(가) 제공되었습니다. + + + + Required argument missing for command: {0} + 명령 {0}에 대한 필수 인수가 없습니다. + + + + Required argument missing for option: {0} + 옵션 {0}에 대한 필수 인수가 없습니다. + + + + Required command was not provided. + 필수 명령을 제공하지 않았습니다. + + + + Argument '{0}' not recognized. Must be one of: {1} + '{0}' 인수를 인식할 수 없습니다. 다음 중 하나여야 합니다. {1} + + + + Unrecognized command or argument '{0}' + 인식할 수 없는 명령 또는 인수 '{0}' + + + + Option '{0}' not recognized. Must be one of: {1} + '{0}' 옵션을 인식할 수 없습니다. 다음 중 하나여야 합니다. {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.pl.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.pl.xlf index ad41c391f..4b588e0db 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.pl.xlf @@ -107,6 +107,61 @@ Nie podano wymaganej wartości dla opcji „{0}”. + + Command '{0}' only accepts a single argument but {1} were provided. + Polecenie „{0}” przyjmuje tylko jeden argument, a podano {1}. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + Polecenie „{0}” przyjmuje tylko jedno polecenie podrzędne, a podano ich wiele: {1}. + + + + File does not exist: {0} + Plik nie istnieje: {0} + + + + Arguments not allowed for option: {0} + Dla tej opcji nie są dozwolone argumenty: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + Opcja „{0}” przyjmuje tylko jeden argument, a podano {1}. + + + + Required argument missing for command: {0} + Brakuje argumentu wymaganego polecenia: {0} + + + + Required argument missing for option: {0} + Brakuje argumentu wymaganego opcji: {0} + + + + Required command was not provided. + Nie podano wymaganego polecenia. + + + + Argument '{0}' not recognized. Must be one of: {1} + Nie rozpoznano argumentu „{0}”. Musi on być jednym z tych: {1} + + + + Unrecognized command or argument '{0}' + Nierozpoznane polecenie lub argument „{0}” + + + + Option '{0}' not recognized. Must be one of: {1} + Nie rozpoznano opcji „{0}”. Musi ona być jedną z tych: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.pt-BR.xlf index daf4864c4..474492f36 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.pt-BR.xlf @@ -107,6 +107,61 @@ Um valor obrigatório para a opção '{0}' não foi fornecido. + + Command '{0}' only accepts a single argument but {1} were provided. + O comando '{0}' aceita somente um único argumento, mas {1} foram fornecidos. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + O comando '{0}' aceita somente um único subcomando, mas vários foram fornecidos: {1} + + + + File does not exist: {0} + O arquivo não existe: {0} + + + + Arguments not allowed for option: {0} + Argumentos não permitidos para a opção: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + A opção '{0}' aceita somente um único argumento, mas {1} foram fornecidos. + + + + Required argument missing for command: {0} + Argumento obrigatório ausente para o comando: {0} + + + + Required argument missing for option: {0} + Argumento obrigatório ausente para a opção: {0} + + + + Required command was not provided. + O comando necessário não foi fornecido. + + + + Argument '{0}' not recognized. Must be one of: {1} + Argumento '{0}' não reconhecido. Ele deve ser um dos seguintes: {1} + + + + Unrecognized command or argument '{0}' + Comando ou argumento '{0}' não reconhecido + + + + Option '{0}' not recognized. Must be one of: {1} + Opção '{0}' não reconhecida. Ela deve ser uma das seguintes: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.ru.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.ru.xlf index 5707f243c..2565938b9 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.ru.xlf @@ -107,6 +107,61 @@ Не указано обязательное значение параметра "{0}". + + Command '{0}' only accepts a single argument but {1} were provided. + Команда "{0}" принимает только один аргумент, но указано несколько аргументов: {1}. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + Команда "{0}" принимает только одну подкоманду, но указано несколько подкоманд: {1}. + + + + File does not exist: {0} + Файл не существует: {0} + + + + Arguments not allowed for option: {0} + Аргументы для параметра не допускаются: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + Параметр "{0}" принимает только один аргумент, но указано несколько аргументов: {1}. + + + + Required argument missing for command: {0} + Отсутствует обязательный аргумент для команды: {0} + + + + Required argument missing for option: {0} + Отсутствует обязательный аргумент для параметра: {0} + + + + Required command was not provided. + Обязательная команда не указана. + + + + Argument '{0}' not recognized. Must be one of: {1} + Аргумент "{0}" не распознан. Он должен быть одним из следующих: {1} + + + + Unrecognized command or argument '{0}' + Нераспознанная команда или аргумент "{0}" + + + + Option '{0}' not recognized. Must be one of: {1} + Параметр "{0}" не распознан. Он должен быть одним из следующих: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.tr.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.tr.xlf index d7f9a7e84..ac2ef1d79 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.tr.xlf @@ -107,6 +107,61 @@ '{0}' seçeneği için gerekli değer sağlanmadı. + + Command '{0}' only accepts a single argument but {1} were provided. + '{0}' komutu yalnızca bir bağımsız değişken kabul ediyor ancak {1} bağımsız değişken sağlandı. + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + '{0}' komutu yalnızca bir alt komut kabul ediyor ancak birden çok sağlandı: {1} + + + + File does not exist: {0} + Dosya yok: {0} + + + + Arguments not allowed for option: {0} + Seçenek için bağımsız değişkenlere izin verilmiyor: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + '{0}' seçeneği yalnızca bir bağımsız değişken kabul ediyor ancak {1} bağımsız değişken sağlandı. + + + + Required argument missing for command: {0} + Komut için gerekli bağımsız değişken eksik: {0} + + + + Required argument missing for option: {0} + Seçenek için gerekli bağımsız değişken eksik: {0} + + + + Required command was not provided. + Gerekli komut sağlanmadı. + + + + Argument '{0}' not recognized. Must be one of: {1} + '{0}' bağımsız değişkeni tanınmıyor. Şunlardan biri olmalıdır: {1} + + + + Unrecognized command or argument '{0}' + Tanınmayan komut veya bağımsız değişken: '{0}' + + + + Option '{0}' not recognized. Must be one of: {1} + '{0}' seçeneği tanınmıyor. Şunlardan biri olmalıdır: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hans.xlf index 96c534b16..1df688e04 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hans.xlf @@ -107,6 +107,61 @@ 未提供选项“{0}”必需的值。 + + Command '{0}' only accepts a single argument but {1} were provided. + 命令“{0}”仅接受一个参数但 {1} 已提供。 + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + 命令“{0}”仅接受一个子命令但已提供多个子命令: {1} + + + + File does not exist: {0} + 文件不存在: {0} + + + + Arguments not allowed for option: {0} + 选项不允许参数: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + 选项“{0}”仅接受一个参数但 {1} 已提供。 + + + + Required argument missing for command: {0} + 命令缺少所需参数: {0} + + + + Required argument missing for option: {0} + 选项缺少所需参数: {0} + + + + Required command was not provided. + 未提供必需的命令。 + + + + Argument '{0}' not recognized. Must be one of: {1} + 未识别参数“{0}”。必须为一个: {1} + + + + Unrecognized command or argument '{0}' + 未识别命令或参数“{0}” + + + + Option '{0}' not recognized. Must be one of: {1} + 未识别选项“{0}”。必须为一个: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hant.xlf index fce6149cf..f3ed08ca1 100644 --- a/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/CommandLine/xlf/LocalizableStrings.zh-Hant.xlf @@ -107,6 +107,61 @@ 未對選項 '{0}' 提供必要的值。 + + Command '{0}' only accepts a single argument but {1} were provided. + 命令 '{0}' 只接受單一引數,但提供了 {1} 個引數。 + + + + Command '{0}' only accepts a single subcommand but multiple were provided: {1} + 命令 '{0}' 只接受單一子命令,但提供了多個子命令: {1} + + + + File does not exist: {0} + 檔案不存在: {0} + + + + Arguments not allowed for option: {0} + 選項不允許的引數: {0} + + + + Option '{0}' only accepts a single argument but {1} were provided. + 選項 '{0}' 只接受單一引數,但提供了 {1} 個引數。 + + + + Required argument missing for command: {0} + 命令遺漏必要引數: {0} + + + + Required argument missing for option: {0} + 選項遺漏必要引數: {0} + + + + Required command was not provided. + 未提供所需的命令。 + + + + Argument '{0}' not recognized. Must be one of: {1} + 無法辨識引數 '{0}'。必須為下列之一: {1} + + + + Unrecognized command or argument '{0}' + 無法辨識的命令或引數 '{0}' + + + + Option '{0}' not recognized. Must be one of: {1} + 無法辨識選項 '{0}'。必須為下列之一: {1} + + \ No newline at end of file diff --git a/src/dotnet/CommonOptions.cs b/src/dotnet/CommonOptions.cs index e3103b64c..bcd3b2268 100644 --- a/src/dotnet/CommonOptions.cs +++ b/src/dotnet/CommonOptions.cs @@ -13,8 +13,7 @@ namespace Microsoft.DotNet.Cli Create.Option( "-h|--help", CommonLocalizableStrings.ShowHelpDescription, - Accept.NoArguments(), - materialize: o => o.Option.Command().HelpView()); + Accept.NoArguments()); public static Option VerbosityOption() => Create.Option( diff --git a/src/dotnet/Parser.cs b/src/dotnet/Parser.cs index 5f9ec884d..5f5bdd6c8 100644 --- a/src/dotnet/Parser.cs +++ b/src/dotnet/Parser.cs @@ -27,6 +27,8 @@ namespace Microsoft.DotNet.Cli DefaultHelpViewText.Synopsis.Command = UsageCommandToken; DefaultHelpViewText.Synopsis.Options = UsageOptionsToken; DefaultHelpViewText.Synopsis.Title = UsageHeader; + + ValidationMessages.Current = new CommandLineValidationMessages(); } public static CommandLine.Parser Instance { get; } = new CommandLine.Parser( @@ -52,6 +54,7 @@ namespace Microsoft.DotNet.Cli Create.Command("msbuild", ""), Create.Command("vstest", ""), CompleteCommandParser.Complete(), + InternalReportinstallsuccessCommandParser.InternalReportinstallsuccess(), CommonOptions.HelpOption(), Create.Option("--info", ""), Create.Option("-d", ""), diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs index 51704ece6..6a929f4ce 100644 --- a/src/dotnet/Program.cs +++ b/src/dotnet/Program.cs @@ -2,9 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.DotNet.Cli.CommandLine; +using Microsoft.DotNet.Cli.Telemetry; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Configurer; using Microsoft.DotNet.PlatformAbstractions; @@ -43,8 +45,8 @@ namespace Microsoft.DotNet.Cli } catch (Exception e) when (e.ShouldBeDisplayedAsError()) { - Reporter.Error.WriteLine(CommandContext.IsVerbose() - ? e.ToString().Red().Bold() + Reporter.Error.WriteLine(CommandContext.IsVerbose() + ? e.ToString().Red().Bold() : e.Message.Red().Bold()); var commandParsingException = e as CommandParsingException; @@ -81,8 +83,10 @@ namespace Microsoft.DotNet.Cli var lastArg = 0; var cliFallbackFolderPathCalculator = new CliFallbackFolderPathCalculator(); using (INuGetCacheSentinel nugetCacheSentinel = new NuGetCacheSentinel(cliFallbackFolderPathCalculator)) - using (IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel = new FirstTimeUseNoticeSentinel(cliFallbackFolderPathCalculator)) + using (IFirstTimeUseNoticeSentinel disposableFirstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel(cliFallbackFolderPathCalculator)) { + IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel = disposableFirstTimeUseNoticeSentinel; for (; lastArg < args.Length; lastArg++) { if (IsArg(args[lastArg], "d", "diagnostics")) @@ -99,9 +103,9 @@ namespace Microsoft.DotNet.Cli PrintInfo(); return 0; } - else if (IsArg(args[lastArg], "h", "help") || - args[lastArg] == "-?" || - args[lastArg] == "/?") + else if (IsArg(args[lastArg], "h", "help") || + args[lastArg] == "-?" || + args[lastArg] == "/?") { HelpCommand.PrintHelp(); return 0; @@ -113,10 +117,19 @@ namespace Microsoft.DotNet.Cli } else { - ConfigureDotNetForFirstTimeUse(nugetCacheSentinel, firstTimeUseNoticeSentinel, cliFallbackFolderPathCalculator); - // It's the command, and we're done! command = args[lastArg]; + + if (IsDotnetBeingInvokedFromNativeInstaller(command)) + { + firstTimeUseNoticeSentinel = new NoOpFirstTimeUseNoticeSentinel(); + } + + ConfigureDotNetForFirstTimeUse( + nugetCacheSentinel, + firstTimeUseNoticeSentinel, + cliFallbackFolderPathCalculator); + break; } } @@ -128,11 +141,16 @@ namespace Microsoft.DotNet.Cli if (telemetryClient == null) { - telemetryClient = new Telemetry(firstTimeUseNoticeSentinel); + telemetryClient = new Telemetry.Telemetry(firstTimeUseNoticeSentinel); } + TelemetryEventEntry.Subscribe(telemetryClient.TrackEvent); + TelemetryEventEntry.TelemetryFilter = new TelemetryFilter(); } - var appArgs = (lastArg + 1) >= args.Length ? Enumerable.Empty() : args.Skip(lastArg + 1).ToArray(); + IEnumerable appArgs = + (lastArg + 1) >= args.Length + ? Enumerable.Empty() + : args.Skip(lastArg + 1).ToArray(); if (verbose.HasValue) { @@ -145,12 +163,12 @@ namespace Microsoft.DotNet.Cli command = "help"; } - telemetryClient.TrackEvent(command, null, null); + TelemetryEventEntry.TrackEvent(command, null, null); int exitCode; - BuiltInCommandMetadata builtIn; - if (BuiltInCommandsCatalog.Commands.TryGetValue(command, out builtIn)) + if (BuiltInCommandsCatalog.Commands.TryGetValue(command, out var builtIn)) { + TelemetryEventEntry.SendFiltered(Parser.Instance.ParseFrom($"dotnet {command}", appArgs.ToArray())); exitCode = builtIn.Command(appArgs.ToArray()); } else @@ -162,9 +180,12 @@ namespace Microsoft.DotNet.Cli .Execute(); exitCode = result.ExitCode; } - return exitCode; + } + private static bool IsDotnetBeingInvokedFromNativeInstaller(string command) + { + return command == "internal-reportinstallsuccess"; } private static void ConfigureDotNetForFirstTimeUse( @@ -198,6 +219,8 @@ namespace Microsoft.DotNet.Cli // by default, .NET Core doesn't have all code pages needed for Console apps. // see the .NET Core Notes in https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + + UILanguageOverride.Setup(); } internal static bool TryGetBuiltInCommand(string commandName, out BuiltInCommandMetadata builtInCommand) diff --git a/src/dotnet/Properties/AssemblyInfo.cs b/src/dotnet/Properties/AssemblyInfo.cs index edc4c971f..d7ae131d6 100644 --- a/src/dotnet/Properties/AssemblyInfo.cs +++ b/src/dotnet/Properties/AssemblyInfo.cs @@ -16,3 +16,4 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("dotnet-sln-list.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("dotnet-sln-remove.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("dotnet-msbuild.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("dotnet-run.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/dotnet/Telemetry/AllowListToSendFirstAppliedOptions.cs b/src/dotnet/Telemetry/AllowListToSendFirstAppliedOptions.cs new file mode 100644 index 000000000..5670f6687 --- /dev/null +++ b/src/dotnet/Telemetry/AllowListToSendFirstAppliedOptions.cs @@ -0,0 +1,42 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.DotNet.Cli.CommandLine; +using Microsoft.DotNet.Cli.Utils; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal class AllowListToSendFirstAppliedOptions : IParseResultLogRule + { + public AllowListToSendFirstAppliedOptions( + HashSet topLevelCommandNameAllowList) + { + _topLevelCommandNameAllowList = topLevelCommandNameAllowList; + } + + private HashSet _topLevelCommandNameAllowList { get; } + + public List AllowList(ParseResult parseResult) + { + var topLevelCommandNameFromParse = parseResult["dotnet"]?.AppliedOptions?.FirstOrDefault()?.Name; + var result = new List(); + if (_topLevelCommandNameAllowList.Contains(topLevelCommandNameFromParse)) + { + var firstOption = parseResult["dotnet"]?[topLevelCommandNameFromParse] + ?.AppliedOptions?.FirstOrDefault()?.Name; + if (firstOption != null) + { + result.Add(new ApplicationInsightsEntryFormat( + "dotnet-" + topLevelCommandNameFromParse, + new Dictionary + { + {"argument", firstOption} + })); + } + } + return result; + } + } +} diff --git a/src/dotnet/Telemetry/AllowListToSendFirstArgument.cs b/src/dotnet/Telemetry/AllowListToSendFirstArgument.cs new file mode 100644 index 000000000..b18c6e4f4 --- /dev/null +++ b/src/dotnet/Telemetry/AllowListToSendFirstArgument.cs @@ -0,0 +1,45 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.DotNet.Cli.CommandLine; +using Microsoft.DotNet.Cli.Utils; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal class AllowListToSendFirstArgument : IParseResultLogRule + { + public AllowListToSendFirstArgument( + HashSet topLevelCommandNameAllowList) + { + _topLevelCommandNameAllowList = topLevelCommandNameAllowList; + } + + private HashSet _topLevelCommandNameAllowList { get; } + + public List AllowList(ParseResult parseResult) + { + var result = new List(); + var topLevelCommandNameFromParse = parseResult["dotnet"]?.AppliedOptions?.FirstOrDefault()?.Name; + if (topLevelCommandNameFromParse != null) + { + if (_topLevelCommandNameAllowList.Contains(topLevelCommandNameFromParse)) + { + var firstArgument = parseResult["dotnet"][topLevelCommandNameFromParse].Arguments + ?.FirstOrDefault(); + if (firstArgument != null) + { + result.Add(new ApplicationInsightsEntryFormat( + "dotnet-" + topLevelCommandNameFromParse, + new Dictionary + { + {"argument", firstArgument} + })); + } + } + } + return result; + } + } +} diff --git a/src/dotnet/Telemetry/DockerContainerDetectorForTelemetry.cs b/src/dotnet/Telemetry/DockerContainerDetectorForTelemetry.cs new file mode 100644 index 000000000..b06250f75 --- /dev/null +++ b/src/dotnet/Telemetry/DockerContainerDetectorForTelemetry.cs @@ -0,0 +1,58 @@ +// 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; +using System.Security; +using Microsoft.Win32; +using Microsoft.DotNet.PlatformAbstractions; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal class DockerContainerDetectorForTelemetry : IDockerContainerDetector + { + public IsDockerContainer IsDockerContainer() + { + switch (RuntimeEnvironment.OperatingSystemPlatform) + { + case Platform.Windows: + try + { + using (RegistryKey subkey + = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control")) + { + return subkey?.GetValue("ContainerType") != null + ? Cli.Telemetry.IsDockerContainer.True + : Cli.Telemetry.IsDockerContainer.False; + } + } + catch (SecurityException) + { + return Cli.Telemetry.IsDockerContainer.Unknown; + } + case Platform.Linux: + return ReadProcToDetectDockerInLinux() + ? Cli.Telemetry.IsDockerContainer.True + : Cli.Telemetry.IsDockerContainer.False; + case Platform.Unknown: + return Cli.Telemetry.IsDockerContainer.Unknown; + case Platform.Darwin: + default: + return Cli.Telemetry.IsDockerContainer.False; + } + } + + private static bool ReadProcToDetectDockerInLinux() + { + return File + .ReadAllText("/proc/1/cgroup") + .Contains("/docker/"); + } + } + + internal enum IsDockerContainer + { + True, + False, + Unknown + } +} diff --git a/src/dotnet/Telemetry/IDockerContainerDetector.cs b/src/dotnet/Telemetry/IDockerContainerDetector.cs new file mode 100644 index 000000000..49bb8282c --- /dev/null +++ b/src/dotnet/Telemetry/IDockerContainerDetector.cs @@ -0,0 +1,10 @@ +// 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. + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal interface IDockerContainerDetector + { + IsDockerContainer IsDockerContainer(); + } +} diff --git a/src/dotnet/Telemetry/IParseResultLogRule.cs b/src/dotnet/Telemetry/IParseResultLogRule.cs new file mode 100644 index 000000000..8120e772a --- /dev/null +++ b/src/dotnet/Telemetry/IParseResultLogRule.cs @@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using Microsoft.DotNet.Cli.CommandLine; +using Microsoft.DotNet.Cli.Utils; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal interface IParseResultLogRule + { + List AllowList(ParseResult parseResult); + } +} diff --git a/src/dotnet/ITelemetry.cs b/src/dotnet/Telemetry/ITelemetry.cs similarity index 90% rename from src/dotnet/ITelemetry.cs rename to src/dotnet/Telemetry/ITelemetry.cs index e687d13bd..8079398ca 100644 --- a/src/dotnet/ITelemetry.cs +++ b/src/dotnet/Telemetry/ITelemetry.cs @@ -1,10 +1,9 @@ // 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; -namespace Microsoft.DotNet.Cli +namespace Microsoft.DotNet.Cli.Telemetry { public interface ITelemetry { diff --git a/src/dotnet/Telemetry/MacAddressGetter.cs b/src/dotnet/Telemetry/MacAddressGetter.cs new file mode 100644 index 000000000..e9ef66ba9 --- /dev/null +++ b/src/dotnet/Telemetry/MacAddressGetter.cs @@ -0,0 +1,168 @@ +// 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.Linq; +using System.Diagnostics; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; +using System.Net.NetworkInformation; +using System.ComponentModel; +using Microsoft.DotNet.Cli.Utils; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal static class MacAddressGetter + { + private const string MacRegex = @"(?:[a-z0-9]{2}[:\-]){5}[a-z0-9]{2}"; + private const string ZeroRegex = @"(?:00[:\-]){5}00"; + private const int ErrorFileNotFound = 0x2; + public static string GetMacAddress() + { + try + { + var shelloutput = GetShellOutMacAddressOutput(); + if (shelloutput == null) + { + return null; + } + + return ParseMACAddress(shelloutput); + } + catch (Win32Exception e) + { + if (e.NativeErrorCode == ErrorFileNotFound) + { + return GetMacAddressByNetworkInterface(); + } + else + { + throw; + } + } + } + + private static string ParseMACAddress(string shelloutput) + { + string macAddress = null; + foreach (Match match in Regex.Matches(shelloutput, MacRegex, RegexOptions.IgnoreCase)) + { + if (!Regex.IsMatch(match.Value, ZeroRegex)) + { + macAddress = match.Value; + break; + } + } + + if (macAddress != null) + { + return macAddress; + } + return null; + } + + private static string GetIpCommandOutput() + { + var ipResult = new ProcessStartInfo + { + FileName = "ip", + Arguments = "link", + UseShellExecute = false + }.ExecuteAndCaptureOutput(out string ipStdOut, out string ipStdErr); + + if (ipResult == 0) + { + return ipStdOut; + } + else + { + return null; + } + } + + private static string GetShellOutMacAddressOutput() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + var result = new ProcessStartInfo + { + FileName = "getmac.exe", + UseShellExecute = false + }.ExecuteAndCaptureOutput(out string stdOut, out string stdErr); + + if (result == 0) + { + return stdOut; + } + else + { + return null; + } + } + else + { + try + { + var ifconfigResult = new ProcessStartInfo + { + FileName = "ifconfig", + Arguments = "-a", + UseShellExecute = false + }.ExecuteAndCaptureOutput(out string ifconfigStdOut, out string ifconfigStdErr); + + if (ifconfigResult == 0) + { + return ifconfigStdOut; + } + else + { + return GetIpCommandOutput(); + } + } + catch (Win32Exception e) + { + if (e.NativeErrorCode == ErrorFileNotFound) + { + return GetIpCommandOutput(); + } + else + { + throw; + } + } + } + } + + private static string GetMacAddressByNetworkInterface() + { + return GetMacAddressesByNetworkInterface().FirstOrDefault(); + } + + private static List GetMacAddressesByNetworkInterface() + { + NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces(); + var macs = new List(); + + if (nics == null || nics.Length < 1) + { + macs.Add(string.Empty); + return macs; + } + + foreach (NetworkInterface adapter in nics) + { + IPInterfaceProperties properties = adapter.GetIPProperties(); + + PhysicalAddress address = adapter.GetPhysicalAddress(); + byte[] bytes = address.GetAddressBytes(); + macs.Add(string.Join("-", bytes.Select(x => x.ToString("X2")))); + if (macs.Count >= 10) + { + break; + } + } + return macs; + } + } +} diff --git a/src/dotnet/Telemetry/Sha256Hasher.cs b/src/dotnet/Telemetry/Sha256Hasher.cs new file mode 100644 index 000000000..bbe7cfdfb --- /dev/null +++ b/src/dotnet/Telemetry/Sha256Hasher.cs @@ -0,0 +1,32 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using System.Security.Cryptography; +using System.Text; +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal static class Sha256Hasher + { + /// + /// // The hashed mac address needs to be the same hashed value as produced by the other distinct sources given the same input. (e.g. VsCode) + /// + public static string Hash(string text) + { + var sha256 = SHA256.Create(); + return HashInFormat(sha256, text); + } + + private static string HashInFormat(SHA256 sha256, string text) + { + byte[] bytes = Encoding.UTF8.GetBytes(text); + byte[] hash = sha256.ComputeHash(bytes); + StringBuilder hashString = new StringBuilder(); + foreach (byte x in hash) + { + hashString.AppendFormat("{0:x2}", x); + } + return hashString.ToString(); + } + } +} diff --git a/src/dotnet/Telemetry.cs b/src/dotnet/Telemetry/Telemetry.cs similarity index 70% rename from src/dotnet/Telemetry.cs rename to src/dotnet/Telemetry/Telemetry.cs index baa0d7015..fe1209339 100644 --- a/src/dotnet/Telemetry.cs +++ b/src/dotnet/Telemetry/Telemetry.cs @@ -4,40 +4,32 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.Threading.Tasks; using Microsoft.ApplicationInsights; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Configurer; using Microsoft.DotNet.PlatformAbstractions; -namespace Microsoft.DotNet.Cli +namespace Microsoft.DotNet.Cli.Telemetry { public class Telemetry : ITelemetry { internal static string CurrentSessionId = null; private TelemetryClient _client = null; - private Dictionary _commonProperties = null; private Dictionary _commonMeasurements = null; private Task _trackEventTask = null; private const string InstrumentationKey = "74cc1c9e-3e6e-4d05-b3fc-dde9101d0254"; private const string TelemetryOptout = "DOTNET_CLI_TELEMETRY_OPTOUT"; - private const string TelemetryProfileEnvironmentVariable = "DOTNET_CLI_TELEMETRY_PROFILE"; - private const string OSVersion = "OS Version"; - private const string OSPlatform = "OS Platform"; - private const string RuntimeId = "Runtime Id"; - private const string ProductVersion = "Product Version"; - private const string TelemetryProfile = "Telemetry Profile"; public bool Enabled { get; } - public Telemetry () : this(null) { } + public Telemetry() : this(null) { } public Telemetry(IFirstTimeUseNoticeSentinel sentinel) : this(sentinel, null) { } - public Telemetry(IFirstTimeUseNoticeSentinel sentinel, string sessionId) + public Telemetry(IFirstTimeUseNoticeSentinel sentinel, string sessionId, bool blockThreadInitialization = false) { Enabled = !Env.GetEnvironmentVariableAsBool(TelemetryOptout) && PermissionExists(sentinel); @@ -49,8 +41,15 @@ namespace Microsoft.DotNet.Cli // Store the session ID in a static field so that it can be reused CurrentSessionId = sessionId ?? Guid.NewGuid().ToString(); - //initialize in task to offload to parallel thread - _trackEventTask = Task.Factory.StartNew(() => InitializeTelemetry()); + if (blockThreadInitialization) + { + InitializeTelemetry(); + } + else + { + //initialize in task to offload to parallel thread + _trackEventTask = Task.Factory.StartNew(() => InitializeTelemetry()); + } } private bool PermissionExists(IFirstTimeUseNoticeSentinel sentinel) @@ -63,7 +62,8 @@ namespace Microsoft.DotNet.Cli return sentinel.Exists(); } - public void TrackEvent(string eventName, IDictionary properties, IDictionary measurements) + public void TrackEvent(string eventName, IDictionary properties, + IDictionary measurements) { if (!Enabled) { @@ -76,6 +76,15 @@ namespace Microsoft.DotNet.Cli ); } + public void ThreadBlockingTrackEvent(string eventName, IDictionary properties, IDictionary measurements) + { + if (!Enabled) + { + return; + } + TrackEventTask(eventName, properties, measurements); + } + private void InitializeTelemetry() { try @@ -83,26 +92,23 @@ namespace Microsoft.DotNet.Cli _client = new TelemetryClient(); _client.InstrumentationKey = InstrumentationKey; _client.Context.Session.Id = CurrentSessionId; - _client.Context.Device.OperatingSystem = RuntimeEnvironment.OperatingSystem; - _commonProperties = new Dictionary(); - _commonProperties.Add(OSVersion, RuntimeEnvironment.OperatingSystemVersion); - _commonProperties.Add(OSPlatform, RuntimeEnvironment.OperatingSystemPlatform.ToString()); - _commonProperties.Add(RuntimeId, RuntimeEnvironment.GetRuntimeIdentifier()); - _commonProperties.Add(ProductVersion, Product.Version); - _commonProperties.Add(TelemetryProfile, Environment.GetEnvironmentVariable(TelemetryProfileEnvironmentVariable)); + _commonProperties = new TelemetryCommonProperties().GetTelemetryCommonProperties(); _commonMeasurements = new Dictionary(); } - catch (Exception) + catch (Exception e) { _client = null; // we dont want to fail the tool if telemetry fails. - Debug.Fail("Exception during telemetry initialization"); + Debug.Fail(e.ToString()); } } - private void TrackEventTask(string eventName, IDictionary properties, IDictionary measurements) + private void TrackEventTask( + string eventName, + IDictionary properties, + IDictionary measurements) { if (_client == null) { @@ -111,15 +117,15 @@ namespace Microsoft.DotNet.Cli try { - var eventProperties = GetEventProperties(properties); - var eventMeasurements = GetEventMeasures(measurements); + Dictionary eventProperties = GetEventProperties(properties); + Dictionary eventMeasurements = GetEventMeasures(measurements); _client.TrackEvent(eventName, eventProperties, eventMeasurements); _client.Flush(); } - catch (Exception) + catch (Exception e) { - Debug.Fail("Exception during TrackEventTask"); + Debug.Fail(e.ToString()); } } @@ -128,7 +134,7 @@ namespace Microsoft.DotNet.Cli Dictionary eventMeasurements = new Dictionary(_commonMeasurements); if (measurements != null) { - foreach (var measurement in measurements) + foreach (KeyValuePair measurement in measurements) { if (eventMeasurements.ContainsKey(measurement.Key)) { @@ -148,7 +154,7 @@ namespace Microsoft.DotNet.Cli if (properties != null) { var eventProperties = new Dictionary(_commonProperties); - foreach (var property in properties) + foreach (KeyValuePair property in properties) { if (eventProperties.ContainsKey(property.Key)) { diff --git a/src/dotnet/Telemetry/TelemetryCommonProperties.cs b/src/dotnet/Telemetry/TelemetryCommonProperties.cs new file mode 100644 index 000000000..a14c5cf84 --- /dev/null +++ b/src/dotnet/Telemetry/TelemetryCommonProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.PlatformAbstractions; +using System.IO; +using Microsoft.DotNet.Configurer; +using System.Linq; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal class TelemetryCommonProperties + { + public TelemetryCommonProperties( + Func getCurrentDirectory = null, + Func hasher = null, + Func getMACAddress = null, + IDockerContainerDetector dockerContainerDetector = null, + IUserLevelCacheWriter userLevelCacheWriter = null) + { + _getCurrentDirectory = getCurrentDirectory ?? Directory.GetCurrentDirectory; + _hasher = hasher ?? Sha256Hasher.Hash; + _getMACAddress = getMACAddress ?? MacAddressGetter.GetMacAddress; + _dockerContainerDetector = dockerContainerDetector ?? new DockerContainerDetectorForTelemetry(); + _userLevelCacheWriter = userLevelCacheWriter ?? new UserLevelCacheWriter(new CliFallbackFolderPathCalculator()); + } + + private readonly IDockerContainerDetector _dockerContainerDetector; + private Func _getCurrentDirectory; + private Func _hasher; + private Func _getMACAddress; + private IUserLevelCacheWriter _userLevelCacheWriter; + private const string OSVersion = "OS Version"; + private const string OSPlatform = "OS Platform"; + private const string RuntimeId = "Runtime Id"; + private const string ProductVersion = "Product Version"; + private const string TelemetryProfile = "Telemetry Profile"; + private const string CurrentPathHash = "Current Path Hash"; + private const string MachineId = "Machine ID"; + private const string DockerContainer = "Docker Container"; + private const string TelemetryProfileEnvironmentVariable = "DOTNET_CLI_TELEMETRY_PROFILE"; + private const string CannotFindMacAddress = "Unknown"; + + private const string MachineIdCacheKey = "MachineId"; + private const string IsDockerContainerCacheKey = "IsDockerContainer"; + + public Dictionary GetTelemetryCommonProperties() + { + return new Dictionary + { + {OSVersion, RuntimeEnvironment.OperatingSystemVersion}, + {OSPlatform, RuntimeEnvironment.OperatingSystemPlatform.ToString()}, + {RuntimeId, RuntimeEnvironment.GetRuntimeIdentifier()}, + {ProductVersion, Product.Version}, + {TelemetryProfile, Environment.GetEnvironmentVariable(TelemetryProfileEnvironmentVariable)}, + {DockerContainer, _userLevelCacheWriter.RunWithCache(IsDockerContainerCacheKey, () => _dockerContainerDetector.IsDockerContainer().ToString("G") )}, + {CurrentPathHash, _hasher(_getCurrentDirectory())}, + {MachineId, _userLevelCacheWriter.RunWithCache(MachineIdCacheKey, GetMachineId)} + }; + } + + private string GetMachineId() + { + var macAddress = _getMACAddress(); + if (macAddress != null) + { + return _hasher(macAddress); + } + else + { + return Guid.NewGuid().ToString(); + } + } + } +} diff --git a/src/dotnet/Telemetry/TelemetryFilter.cs b/src/dotnet/Telemetry/TelemetryFilter.cs new file mode 100644 index 000000000..6d44ef58d --- /dev/null +++ b/src/dotnet/Telemetry/TelemetryFilter.cs @@ -0,0 +1,95 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.DotNet.Cli.CommandLine; +using Microsoft.DotNet.Cli.Utils; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal class TelemetryFilter : ITelemetryFilter + { + private const string DotnetName = "dotnet"; + + public IEnumerable Filter(object objectToFilter) + { + var ruleSet = new List + { new AllowListToSendFirstArgument(new HashSet{ "new", "help" }), + new AllowListToSendFirstAppliedOptions(new HashSet{ "add", "remove", "list", "sln", "nuget" }), + new TopLevelCommandNameAndOptionToLog + ( + topLevelCommandName: new HashSet { "new" }, + optionsToLog: new HashSet { "language" } + ), + new TopLevelCommandNameAndOptionToLog + ( + topLevelCommandName: new HashSet { "build", "publish" }, + optionsToLog: new HashSet { "framework", "runtime", "configuration" } + ), + new TopLevelCommandNameAndOptionToLog + ( + topLevelCommandName: new HashSet { "run", "clean", "test" }, + optionsToLog: new HashSet { "framework", "configuration" } + ), + new TopLevelCommandNameAndOptionToLog + ( + topLevelCommandName: new HashSet { "pack" }, + optionsToLog: new HashSet { "configuration" } + ), + new TopLevelCommandNameAndOptionToLog + ( + topLevelCommandName: new HashSet { "migrate" }, + optionsToLog: new HashSet { "sdk-package-version" } + ), + new TopLevelCommandNameAndOptionToLog + ( + topLevelCommandName: new HashSet { "vstest" }, + optionsToLog: new HashSet { "platform", "framework", "logger" } + ), + new TopLevelCommandNameAndOptionToLog + ( + topLevelCommandName: new HashSet { "publish" }, + optionsToLog: new HashSet { "runtime" } + ) + }; + var result = new List(); + + if (objectToFilter is ParseResult parseResult) + { + var topLevelCommandName = parseResult[DotnetName]?.AppliedOptions?.FirstOrDefault()?.Name; + if (topLevelCommandName != null) + { + LogVerbosityForAllTopLevelCommand(result, parseResult, topLevelCommandName); + + foreach (IParseResultLogRule rule in ruleSet) + { + result.AddRange(rule.AllowList(parseResult)); + } + } + } + + return result; + } + + private static void LogVerbosityForAllTopLevelCommand( + ICollection result, + ParseResult parseResult, + string topLevelCommandName) + { + if (parseResult[DotnetName][topLevelCommandName]?.AppliedOptions != null && + parseResult[DotnetName][topLevelCommandName].AppliedOptions.Contains("verbosity")) + { + AppliedOption appliedOptions = + parseResult[DotnetName][topLevelCommandName].AppliedOptions["verbosity"]; + + result.Add(new ApplicationInsightsEntryFormat( + "dotnet-" + topLevelCommandName, + new Dictionary() + { + {"verbosity", appliedOptions.Arguments.ElementAt(0)} + })); + } + } + } +} diff --git a/src/dotnet/Telemetry/TopLevelCommandNameAndOptionToLog.cs b/src/dotnet/Telemetry/TopLevelCommandNameAndOptionToLog.cs new file mode 100644 index 000000000..38a234541 --- /dev/null +++ b/src/dotnet/Telemetry/TopLevelCommandNameAndOptionToLog.cs @@ -0,0 +1,49 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.DotNet.Cli.CommandLine; +using Microsoft.DotNet.Cli.Utils; + +namespace Microsoft.DotNet.Cli.Telemetry +{ + internal class TopLevelCommandNameAndOptionToLog : IParseResultLogRule + { + public TopLevelCommandNameAndOptionToLog( + HashSet topLevelCommandName, + HashSet optionsToLog) + { + _topLevelCommandName = topLevelCommandName; + _optionsToLog = optionsToLog; + } + + private HashSet _topLevelCommandName { get; } + private HashSet _optionsToLog { get; } + private const string DotnetName = "dotnet"; + + public List AllowList(ParseResult parseResult) + { + var topLevelCommandName = parseResult[DotnetName]?.AppliedOptions?.FirstOrDefault()?.Name; + var result = new List(); + foreach (var option in _optionsToLog) + { + if (_topLevelCommandName.Contains(topLevelCommandName) + && parseResult[DotnetName]?[topLevelCommandName]?.AppliedOptions != null + && parseResult[DotnetName][topLevelCommandName].AppliedOptions.Contains(option)) + { + AppliedOption appliedOptions = + parseResult[DotnetName][topLevelCommandName] + .AppliedOptions[option]; + result.Add(new ApplicationInsightsEntryFormat( + "dotnet-" + topLevelCommandName, + new Dictionary + { + {option, appliedOptions.Arguments.ElementAt(0)} + })); + } + } + return result; + } + } +} diff --git a/src/dotnet/UILanguageOverride.cs b/src/dotnet/UILanguageOverride.cs new file mode 100644 index 000000000..5e44e56cc --- /dev/null +++ b/src/dotnet/UILanguageOverride.cs @@ -0,0 +1,81 @@ +// 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.Globalization; + +namespace Microsoft.DotNet.Cli +{ + internal static class UILanguageOverride + { + private const string DOTNET_CLI_UI_LANGUAGE = nameof(DOTNET_CLI_UI_LANGUAGE); + private const string VSLANG = nameof(VSLANG); + private const string PreferredUILang = nameof(PreferredUILang); + + public static void Setup() + { + CultureInfo language = GetOverriddenUILanguage(); + if (language != null) + { + ApplyOverrideToCurrentProcess(language); + FlowOverrideToChildProcesses(language); + } + } + + private static void ApplyOverrideToCurrentProcess(CultureInfo language) + { + CultureInfo.DefaultThreadCurrentUICulture = language; + } + + private static void FlowOverrideToChildProcesses(CultureInfo language) + { + // Do not override any environment variables that are already set as we do not want to clobber a more granular setting with our global setting. + SetIfNotAlreadySet(DOTNET_CLI_UI_LANGUAGE, language.Name); + SetIfNotAlreadySet(VSLANG, language.LCID); // for tools following VS guidelines to just work in CLI + SetIfNotAlreadySet(PreferredUILang, language.Name); // for C#/VB targets that pass $(PreferredUILang) to compiler + } + + private static CultureInfo GetOverriddenUILanguage() + { + // DOTNET_CLI_UI_LANGUAGE= is the main way for users to customize the CLI's UI language. + string dotnetCliLanguage = Environment.GetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE); + if (dotnetCliLanguage != null) + { + try + { + return new CultureInfo(dotnetCliLanguage); + } + catch (CultureNotFoundException) { } + } + + // VSLANG= is set by VS and we respect that as well so that we will respect the VS + // language preference if we're invoked by VS. + string vsLang = Environment.GetEnvironmentVariable(VSLANG); + if (vsLang != null && int.TryParse(vsLang, out int vsLcid)) + { + try + { + return new CultureInfo(vsLcid); + } + catch (ArgumentOutOfRangeException) { } + catch (CultureNotFoundException) { } + } + + return null; + } + + private static void SetIfNotAlreadySet(string environmentVariableName, string value) + { + string currentValue = Environment.GetEnvironmentVariable(environmentVariableName); + if (currentValue == null) + { + Environment.SetEnvironmentVariable(environmentVariableName, value); + } + } + + private static void SetIfNotAlreadySet(string environmentVariableName, int value) + { + SetIfNotAlreadySet(environmentVariableName, value.ToString()); + } + } +} diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.es.xlf index 44c2d22e4..54fcd62ea 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.es.xlf @@ -59,7 +59,7 @@ SOURCE - SOURCE + ORIGEN diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.pt-BR.xlf index 3777834fd..f99ea83f1 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.pt-BR.xlf @@ -54,7 +54,7 @@ FRAMEWORK - ESTRUTURA + FRAMEWORK diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-proj/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-add/dotnet-add-proj/xlf/LocalizableStrings.ru.xlf index ccb84c150..e609e17f9 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-proj/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-add/dotnet-add-proj/xlf/LocalizableStrings.ru.xlf @@ -4,7 +4,7 @@ .NET Add Project to Solution Command - Команда "Добавить проект в решение" .NET + Команда .NET "Добавить проект в решение" diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-reference/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-add/dotnet-add-reference/xlf/LocalizableStrings.ja.xlf index 7234a47cd..b81b235b4 100644 --- a/src/dotnet/commands/dotnet-add/dotnet-add-reference/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-add/dotnet-add-reference/xlf/LocalizableStrings.ja.xlf @@ -4,7 +4,7 @@ .NET Add Project to Project reference Command - .NET プロジェクト間参照を追加するコマンド + .NET Add Project to Project reference コマンド @@ -14,7 +14,7 @@ Project to project references to add - 追加する Project to project 参照 + 追加するプロジェクト間参照 diff --git a/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.fr.xlf index ac2186f41..1d50fcdbc 100644 --- a/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.fr.xlf @@ -29,7 +29,7 @@ OUTPUT_DIR - RÉP_SORTIE + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.pt-BR.xlf index 2a607edf9..7ae9fc8b4 100644 --- a/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.pt-BR.xlf @@ -29,7 +29,7 @@ OUTPUT_DIR - DIRETÓRIO_DE_SAÍDA + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.tr.xlf index 2037ff0f1..c521f8301 100644 --- a/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-build/xlf/LocalizableStrings.tr.xlf @@ -29,7 +29,7 @@ OUTPUT_DIR - OUTPUT_DIR + ÇIKIŞ_DİZİNİ diff --git a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.fr.xlf index cfc411761..79ec56b2c 100644 --- a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.fr.xlf @@ -14,7 +14,7 @@ OUTPUT_DIR - RÉP_SORTIE + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.ko.xlf index b685c57d5..923339cc7 100644 --- a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.ko.xlf @@ -19,7 +19,7 @@ Directory in which the build outputs have been placed. - 빌드 출력이 배치된 디렉터리입니다. + 빌드 출력이 위치한 디렉터리입니다. diff --git a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.pt-BR.xlf index 1265f03ab..7a60fa046 100644 --- a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.pt-BR.xlf @@ -14,7 +14,7 @@ OUTPUT_DIR - DIRETÓRIO_DE_SAÍDA + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.tr.xlf index de5fca02b..25d13051e 100644 --- a/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-clean/xlf/LocalizableStrings.tr.xlf @@ -14,7 +14,7 @@ OUTPUT_DIR - OUTPUT_DIR + ÇIKIŞ_DİZİNİ diff --git a/src/dotnet/commands/dotnet-help/HelpUsageText.cs b/src/dotnet/commands/dotnet-help/HelpUsageText.cs index 55ceac9c1..68c637f06 100644 --- a/src/dotnet/commands/dotnet-help/HelpUsageText.cs +++ b/src/dotnet/commands/dotnet-help/HelpUsageText.cs @@ -5,7 +5,7 @@ internal static class HelpUsageText { public static readonly string UsageText = $@"{LocalizableStrings.Usage}: dotnet [runtime-options] [path-to-application] -{LocalizableStrings.Usage}: dotnet [command] [arguments] [command-options] +{LocalizableStrings.Usage}: dotnet [sdk-options] [command] [arguments] [command-options] path-to-application: {LocalizableStrings.PathToApplicationDefinition} @@ -27,9 +27,6 @@ path-to-application: nuget {LocalizableStrings.NugetDefinition} msbuild {LocalizableStrings.MsBuildDefinition} vstest {LocalizableStrings.VsTestDefinition} - -v|--version {LocalizableStrings.SDKVersionCommandDefinition} - -i|--info {LocalizableStrings.SDKInfoCommandDefinition} - -d|--diagnostics {LocalizableStrings.SDKDiagnosticsCommandDefinition} {LocalizableStrings.CommonOptions}: -v|--verbosity {CommonLocalizableStrings.VerbosityOptionDescription} @@ -37,10 +34,13 @@ path-to-application: {LocalizableStrings.RunDotnetCommandHelpForMore} +sdk-options: + --version {LocalizableStrings.SDKVersionCommandDefinition} + --info {LocalizableStrings.SDKInfoCommandDefinition} + -d|--diagnostics {LocalizableStrings.SDKDiagnosticsCommandDefinition} + runtime-options: --additionalprobingpath {LocalizableStrings.AdditionalprobingpathDefinition} - --depsfile {LocalizableStrings.DepsfilDefinition} - --runtimeconfig {LocalizableStrings.RuntimeconfigDefinition} --fx-version {LocalizableStrings.FxVersionDefinition} --roll-forward-on-no-candidate-fx {LocalizableStrings.RollForwardOnNoCandidateFxDefinition} --additional-deps {LocalizableStrings.AdditionalDeps} diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf index d1fdf2806..86d28776a 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf @@ -39,7 +39,7 @@ Show help. - Zobrazit nápovědu + Zobrazí nápovědu. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf index 18dd0f719..419026640 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf @@ -39,7 +39,7 @@ Show help. - Hilfe anzeigen + Hilfe anzeigen. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf index 0559b4ff9..a4ae3a445 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf @@ -39,7 +39,7 @@ Show help. - Muestra la ayuda + Muestra la ayuda. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf index 95dc8ac4b..62ac2526e 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf @@ -39,7 +39,7 @@ Show help. - Afficher l'aide + Affichez l'aide. @@ -204,7 +204,7 @@ Run 'dotnet COMMAND --help' for more information on a command. - Exécutez 'dotnet COMMANDE --help' pour plus d'informations sur une commande. + Exécutez 'dotnet COMMAND --help' pour plus d'informations sur une commande. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf index f03ab92a7..5e5d2bd4f 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf @@ -39,7 +39,7 @@ Show help. - Mostra la Guida + Visualizza la Guida. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf index 404389240..d26220439 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf @@ -39,7 +39,7 @@ Show help. - ヘルプを表示する + ヘルプを表示します。 diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf index 563eb3340..e31fcdf82 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf @@ -39,7 +39,7 @@ Show help. - 도움말 표시 + 도움말을 표시합니다. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf index 482131988..66792532c 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf @@ -39,7 +39,7 @@ Show help. - Wyświetl pomoc + Pokaż pomoc. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf index 80ba7e0d7..738bb3734 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf @@ -39,7 +39,7 @@ Show help. - Mostrar ajuda + Mostrar ajuda. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf index acc1c73bb..a4ce7b230 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf @@ -39,7 +39,7 @@ Show help. - Показать справку + Показать справку. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf index 63404e19a..55ef67760 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf @@ -39,7 +39,7 @@ Show help. - Yardımı göster + Yardımı gösterir. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf index 18a5654b0..b2d8cfd42 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf @@ -39,7 +39,7 @@ Show help. - 显示帮助 + 显示帮助。 diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf index 6fd38b7c9..19f53ffe6 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf @@ -39,7 +39,7 @@ Show help. - 顯示說明 + 顯示說明。 diff --git a/src/dotnet/commands/dotnet-internal-reportinstallsuccess/InternalReportinstallsuccessCommand.cs b/src/dotnet/commands/dotnet-internal-reportinstallsuccess/InternalReportinstallsuccessCommand.cs new file mode 100644 index 000000000..b44e9b41c --- /dev/null +++ b/src/dotnet/commands/dotnet-internal-reportinstallsuccess/InternalReportinstallsuccessCommand.cs @@ -0,0 +1,57 @@ +// 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.Linq; +using System.IO; +using System.Collections.Generic; +using Microsoft.DotNet.Configurer; +using Microsoft.DotNet.Cli.Telemetry; + +namespace Microsoft.DotNet.Cli +{ + public class InternalReportinstallsuccess + { + internal const string TelemetrySessionIdEnvironmentVariableName = "DOTNET_CLI_TELEMETRY_SESSIONID"; + + public static int Run(string[] args) + { + var telemetry = new ThreadBlockingTelemetry(); + ProcessInputAndSendTelemetry(args, telemetry); + + return 0; + } + + public static void ProcessInputAndSendTelemetry(string[] args, ITelemetry telemetry) + { + var parser = Parser.Instance; + var result = parser.ParseFrom("dotnet internal-reportinstallsuccess", args); + + var internalReportinstallsuccess = result["dotnet"]["internal-reportinstallsuccess"]; + + var exeName = Path.GetFileName(internalReportinstallsuccess.Arguments.Single()); + telemetry.TrackEvent( + "reportinstallsuccess", + new Dictionary { { "exeName", exeName } }, + new Dictionary()); + } + + internal class ThreadBlockingTelemetry : ITelemetry + { + private Telemetry.Telemetry telemetry; + + internal ThreadBlockingTelemetry() + { + var sessionId = + Environment.GetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName); + telemetry = new Telemetry.Telemetry(new NoOpFirstTimeUseNoticeSentinel(), sessionId, blockThreadInitialization: true); + } + public bool Enabled => telemetry.Enabled; + + public void TrackEvent(string eventName, IDictionary properties, IDictionary measurements) + { + telemetry.ThreadBlockingTrackEvent(eventName, properties, measurements); + } + } + } +} \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-internal-reportinstallsuccess/InternalReportinstallsuccessCommandParser.cs b/src/dotnet/commands/dotnet-internal-reportinstallsuccess/InternalReportinstallsuccessCommandParser.cs new file mode 100644 index 000000000..1c83a86b3 --- /dev/null +++ b/src/dotnet/commands/dotnet-internal-reportinstallsuccess/InternalReportinstallsuccessCommandParser.cs @@ -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.Linq; +using Microsoft.DotNet.Cli.CommandLine; + +namespace Microsoft.DotNet.Cli +{ + internal static class InternalReportinstallsuccessCommandParser + { + public static Command InternalReportinstallsuccess() => + Create.Command( + "internal-reportinstallsuccess", "internal only", + Accept.ExactlyOneArgument()); + } +} \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.cs.xlf index 0bf4a6f2f..f3ad5910e 100644 --- a/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.cs.xlf @@ -16,7 +16,7 @@ There are no {0} references in project {1}. {0} is the type of the item being requested (project, package, p2p) and {1} is the object operated on (a project file or a solution file). Projekt {1} neobsahuje odkazy na {0}. -{0} je typ požadované položky (projekt, balíček, p2p) a {1} je používaný objekt (soubor projektu nebo soubor řešení). +{0} je typ požadované položky (projekt, balíček, p2p) a {1} je používaný objekt (soubor projektu nebo soubor řešení).
diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.ko.xlf index dc88f5a16..9b0d8960f 100644 --- a/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-list/dotnet-list-reference/xlf/LocalizableStrings.ko.xlf @@ -16,7 +16,7 @@ There are no {0} references in project {1}. {0} is the type of the item being requested (project, package, p2p) and {1} is the object operated on (a project file or a solution file). {1} 프로젝트에 {0} 참조가 없습니다. -{0}은(는) 요청한 항목의 형식(프로젝트, 패키지, p2p)이고 {1}은(는) 작업 중인 개체(프로젝트 파일 또는 솔루션 파일)입니다. +{0}은(는) 요청한 항목의 형식(프로젝트, 패키지, p2p)이고 {1}은(는) 작업 중인 개체(프로젝트 파일 또는 솔루션 파일)입니다.
diff --git a/src/dotnet/commands/dotnet-list/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-list/xlf/LocalizableStrings.ru.xlf index 70e0aca26..d01c0c362 100644 --- a/src/dotnet/commands/dotnet-list/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-list/xlf/LocalizableStrings.ru.xlf @@ -4,7 +4,7 @@ .NET List Command - Команда "Список" .NET + Команда .NET "Список" diff --git a/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.fr.xlf index d3a076965..dc14acdd1 100644 --- a/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.fr.xlf @@ -14,7 +14,7 @@ PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR - PROJECT_JSON/GLOBAL_JSON/FICHIER_SOLUTION/RÉP_PROJET + PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR diff --git a/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.ko.xlf index cd767d3ad..f053d9f34 100644 --- a/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-migrate/xlf/LocalizableStrings.ko.xlf @@ -64,7 +64,7 @@ Defaults to current directory if nothing is specified. Skip moving project.json, global.json, and *.xproj to a `backup` directory after successful migration. - 마이그레이션을 완료한 후 project.json, global.json 및 *.xproj를 `백업` 디렉터리로 이동하는 작업을 건너뜁니다. + 마이그레이션을 완료한 후 project.json, global.json 및 *.xproj를 '백업' 디렉터리로 이동하는 작업을 건너뜁니다. diff --git a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs index dbf81dd6e..4140990d9 100644 --- a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs +++ b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs @@ -10,6 +10,7 @@ using System.Runtime.InteropServices; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.CommandLine; using System.Diagnostics; +using Microsoft.DotNet.Cli.Telemetry; using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.Tools.MSBuild diff --git a/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs b/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs index 54329cb8c..ef9d7d93e 100644 --- a/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs +++ b/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs @@ -5,6 +5,7 @@ using System; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Cli.Telemetry; using Microsoft.DotNet.Configurer; namespace Microsoft.DotNet.Tools.MSBuild @@ -39,15 +40,13 @@ namespace Microsoft.DotNet.Tools.MSBuild { if (_telemetry != null && _telemetry.Enabled) { - IEventSource2 eventSource2 = eventSource as IEventSource2; - - if (eventSource2 != null) + if (eventSource is IEventSource2 eventSource2) { eventSource2.TelemetryLogged += OnTelemetryLogged; } } } - catch(Exception) + catch (Exception) { // Exceptions during telemetry shouldn't cause anything else to fail } diff --git a/src/dotnet/commands/dotnet-new/NewCommandShim.cs b/src/dotnet/commands/dotnet-new/NewCommandShim.cs index a743c6e7c..cf30e3ca4 100644 --- a/src/dotnet/commands/dotnet-new/NewCommandShim.cs +++ b/src/dotnet/commands/dotnet-new/NewCommandShim.cs @@ -8,6 +8,7 @@ using System.IO; using System.Linq; using System.Reflection; using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Cli.Telemetry; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Configurer; using Microsoft.DotNet.Tools.MSBuild; diff --git a/src/dotnet/commands/dotnet-nuget/Program.cs b/src/dotnet/commands/dotnet-nuget/Program.cs index b22588c0d..8e6378b41 100644 --- a/src/dotnet/commands/dotnet-nuget/Program.cs +++ b/src/dotnet/commands/dotnet-nuget/Program.cs @@ -32,7 +32,7 @@ namespace Microsoft.DotNet.Tools.NuGet private class NuGetCommandRunner : ICommandRunner { - public int Run(string [] args) + public int Run(string[] args) { var nugetApp = new NuGetForwardingApp(args); diff --git a/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf index 5ddd4fa1b..e30934547 100644 --- a/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf @@ -14,7 +14,7 @@ OUTPUT_DIR - RÉP_SORTIE + OUTPUT_DIR @@ -44,7 +44,7 @@ PROJECT - PROJET + PROJECT diff --git a/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf index 48e2fba14..fd7dd4b59 100644 --- a/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf @@ -14,7 +14,7 @@ OUTPUT_DIR - DIRETÓRIO_DE_SAÍDA + OUTPUT_DIR @@ -44,7 +44,7 @@ PROJECT - PROJETO + PROJECT diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf index 9f122136b..44a8f8c73 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf @@ -19,7 +19,7 @@ OUTPUT_DIR - RÉP_SORTIE + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf index 93077e97e..81a53b9d7 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf @@ -9,7 +9,7 @@ FRAMEWORK - ESTRUTURA + FRAMEWORK @@ -19,7 +19,7 @@ OUTPUT_DIR - DIRETÓRIO_DE_SAÍDA + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf index 5df719a31..cc3c5ae9d 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf @@ -19,7 +19,7 @@ OUTPUT_DIR - OUTPUT_DIR + ÇIKIŞ_DİZİNİ diff --git a/src/dotnet/commands/dotnet-remove/dotnet-remove-proj/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-remove/dotnet-remove-proj/xlf/LocalizableStrings.ru.xlf index 80712f0c0..eba7b97ec 100644 --- a/src/dotnet/commands/dotnet-remove/dotnet-remove-proj/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-remove/dotnet-remove-proj/xlf/LocalizableStrings.ru.xlf @@ -4,7 +4,7 @@ .NET Remove Project from Solution Command - Команда "Удалить проект из решения" .NET + Команда .NET "Удалить проект из решения" diff --git a/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.ko.xlf index 632f43465..1c9c4c102 100644 --- a/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.ko.xlf @@ -4,7 +4,7 @@ .NET Remove Command - .NET Remove 명령 + .NET 제거 명령 diff --git a/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.pt-BR.xlf index d35bf59a0..e8c924e2c 100644 --- a/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-remove/xlf/LocalizableStrings.pt-BR.xlf @@ -4,7 +4,7 @@ .NET Remove Command - Comando .NET Remove + Comando Remover do .NET diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.cs.xlf index 5403acc29..be695d6e9 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.cs.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Tento příznak nastavte, pokud chcete vynutit vyřešení všech závislostí, i když poslední obnovení proběhlo úspěšně. Jedná se o ekvivalent odstranění project.assets.json. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.de.xlf index a85f474a9..30e522954 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.de.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Legen Sie dieses Flag fest, damit alle Abhängigkeiten aufgelöst werden, auch wenn die letzte Wiederherstellung erfolgreich war. Dies entspricht dem Löschen von "project.assets.json". diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.es.xlf index 7b9e4405f..d764815a8 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.es.xlf @@ -14,7 +14,7 @@ PROJECT - PROJECT + PROYECTO @@ -24,7 +24,7 @@ SOURCE - SOURCE + ORIGEN @@ -34,7 +34,7 @@ PACKAGES_DIRECTORY - PACKAGES_DIRECTORY + DIRECTORIO_DE:PAQUETES @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Establezca este indicador para forzar la resolución de todas las dependencias aunque la última restauración se haya realizado correctamente. Esta acción es equivalente a eliminar project.assets.json. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.fr.xlf index ecda81b36..2c1ce9af2 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.fr.xlf @@ -14,7 +14,7 @@ PROJECT - PROJET + PROJECT @@ -34,7 +34,7 @@ PACKAGES_DIRECTORY - RÉPERTOIRE_PACKAGES + PACKAGES_DIRECTORY @@ -49,7 +49,7 @@ FILE - FICHIER + FILE @@ -74,7 +74,7 @@ RUNTIME_IDENTIFIER - IDENTIFICATEUR_RUNTIME + RUNTIME_IDENTIFIER @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Définissez cet indicateur pour forcer la résolution de toutes les dépendances même si la dernière restauration a réussi. Cela équivaut à supprimer project.assets.json. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.it.xlf index ac76dcce9..96abe7bcb 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.it.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Impostare questo flag per forzare la risoluzione di tutte le dipendenze anche se l'ultimo ripristino è riuscito. Equivale a eliminare project.assets.json. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ja.xlf index 36b83bb38..cbc28f6b4 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ja.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + このフラグを設定すると、最後に行われた復元が成功した場合でも強制的にすべての依存関係を解決します。これは、project.assets.json を削除することと同じです。 diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ko.xlf index c70d614c8..80a9d9827 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ko.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + 마지막 복원이 성공적인 경우에도 이 플래그를 설정하여 모든 종속성을 확인합니다. project.assets.json을 삭제하는 것과 동일합니다. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pl.xlf index 406fa78bd..33a127ce7 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pl.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Ustaw tę flagę, aby wymusić rozstrzygnięcie wszystkich zależności nawet w przypadku, gdy ostatnie przywracanie się powiodło. Jest to równoważne usunięciu pliku project.assets.json. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pt-BR.xlf index 8d283ee51..ee738e514 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pt-BR.xlf @@ -14,7 +14,7 @@ PROJECT - PROJETO + PROJECT @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Defina este sinalizador para forçar todas as dependências a serem resolvidas, mesmo que a última restauração tenha tido êxito. Isso equivale a excluir o project.assets.json. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ru.xlf index 7506c70c9..6347123ac 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ru.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Задайте этот флаг, чтобы принудительно разрешать все зависимости даже в случае успеха последнего восстановления. Это эквивалентно удалению project.assets.json. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.tr.xlf index 0e384ac01..2c1803906 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.tr.xlf @@ -14,7 +14,7 @@ PROJECT - PROJECT + PROJE @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + Son geri yükleme başarılı olsa bile tüm bağımlılıkların çözümlenmesini zorlamak için bu bayrağı ayarlayın. Bu, project.assets.json öğesini silmeyle eşdeğerdir. diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hans.xlf index 38df9541b..1379e94c0 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hans.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + 设置此标志以强制解析所有依赖项,即使最后一次还原已经成功。这等效于删除 project.assets.json。 diff --git a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hant.xlf index 6b7cca78f..d691230eb 100644 --- a/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hant.xlf @@ -84,7 +84,7 @@ Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. - Set this flag to force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. + 設定此旗標可在即使上次還原已成功的情況下,仍然強制解決所有相依性。如此等同於刪除 project.assets.json。 diff --git a/src/dotnet/commands/dotnet-run/LocalizableStrings.resx b/src/dotnet/commands/dotnet-run/LocalizableStrings.resx index 976312b28..8cab1941e 100644 --- a/src/dotnet/commands/dotnet-run/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-run/LocalizableStrings.resx @@ -196,4 +196,7 @@ The current {1} is '{2}'. An error was encountered when reading launchSettings.json. {0} + + '{0}' is not a valid project file. + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/RunCommand.cs b/src/dotnet/commands/dotnet-run/RunCommand.cs index d760a8690..e4af4a2a0 100644 --- a/src/dotnet/commands/dotnet-run/RunCommand.cs +++ b/src/dotnet/commands/dotnet-run/RunCommand.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.Build.Evaluation; +using Microsoft.Build.Exceptions; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools; using Microsoft.DotNet.Tools.MSBuild; @@ -39,17 +40,26 @@ namespace Microsoft.DotNet.Tools.Run EnsureProjectIsBuilt(); } - ICommand runCommand = GetRunCommand(); - int launchSettingsApplicationResult = ApplyLaunchProfileSettingsIfNeeded(ref runCommand); - - if (launchSettingsApplicationResult != 0) + try { - return launchSettingsApplicationResult; - } + ICommand runCommand = GetRunCommand(); + int launchSettingsApplicationResult = ApplyLaunchProfileSettingsIfNeeded(ref runCommand); - return runCommand - .Execute() - .ExitCode; + if (launchSettingsApplicationResult != 0) + { + return launchSettingsApplicationResult; + } + + return runCommand + .Execute() + .ExitCode; + } + catch (InvalidProjectFileException e) + { + throw new GracefulException( + string.Format(LocalizableStrings.RunCommandSpecifiecFileIsNotAValidProject, Project), + e); + } } public RunCommand(string configuration, diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf index 8577240b2..60ce2ef7b 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf @@ -72,70 +72,75 @@ Aktuální {1} je {2}. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + Název profilu spuštění (pokud existuje), který se má použít při spuštění aplikace. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + Ke konfiguraci aplikace nepoužívejte launchSettings.json. The specified launch profile could not be located. - The specified launch profile could not be located. + Zadaný profil spuštění se nenašel. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + Profil spuštění {0} se nedá použít. {1} (Default) - (Default) + (výchozí) Using launch settings from {0}... - Using launch settings from {0}... + Použití nastavení spuštění z {0}... Launch profile is not a JSON object. - Launch profile is not a JSON object. + Profil spuštění není objektem JSON. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + Typ profilu spuštění {0} se nepodporuje. A usable launch profile could not be located. - A usable launch profile could not be located. + Nenašel se použitelný profil spuštění. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Při zpracování nastavení spuštění došlo k neočekávané výjimce: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + Vlastnost profiles v dokumentu nastavení spuštění není objektem JSON. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + Při načítání launchSettings.json došlo k chybě. {0} + + '{0}' is not a valid project file. + {0} není platný soubor projektu. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf index 7656a3d19..2349aafdc 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf @@ -72,70 +72,75 @@ Ein ausführbares Projekt sollte ein ausführbares TFM (z.B. netcoreapp2.0) verw The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + Der Name des Startprofils (sofern vorhanden), das beim Starten der Anwendung verwendet werden soll. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + Versuchen Sie nicht, "launchSettings.json" zum Konfigurieren der Anwendung zu verwenden. The specified launch profile could not be located. - The specified launch profile could not be located. + Das angegebene Startprofil wurde nicht gefunden. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + Das Startprofil "{0}" konnte nicht angewendet werden. {1} (Default) - (Default) + (Standard) Using launch settings from {0}... - Using launch settings from {0}... + Die Starteinstellungen von {0} werden verwendet… Launch profile is not a JSON object. - Launch profile is not a JSON object. + Das Startprofil ist kein JSON-Objekt. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + Der Startprofiltyp "{0}" wird nicht unterstützt. A usable launch profile could not be located. - A usable launch profile could not be located. + Es wurde kein verwendbares Startprofil gefunden. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Beim Verarbeiten der Starteinstellungen ist ein unerwarteter Fehler aufgetreten: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + Die Eigenschaft "Profile" des Starteigenschaftendokuments ist kein JSON-Objekt. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + Beim Lesen von "launchSettings.json" ist ein Fehler aufgetreten. {0} + + '{0}' is not a valid project file. + "{0}" ist keine gültige Projektdatei. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf index 0a916fe88..4c05cc144 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf @@ -57,7 +57,7 @@ The current {1} is '{2}'. No se puede ejecutar el proyecto. Asegúrese de tener un tipo de proyecto ejecutable y asegúrese de que "{0}" admita este proyecto. Un proyecto ejecutable debe tener como destino un TFM ejecutable (por ejemplo, netcoreapp2.0) y tener OutputType "Exe". -El actual {1} es '{2}'. +El actual {1} es "{2}". @@ -72,70 +72,75 @@ El actual {1} es '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + El nombre del perfil de inicio (si lo hay) que se usará al iniciar la aplicación. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + No intente usar launchSettings.json para configurar la aplicación. The specified launch profile could not be located. - The specified launch profile could not be located. + No se ha podido encontrar el perfil de inicio especificado. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + No se ha podido aplicar el perfil de inicio "{0}". {1} (Default) - (Default) + (Predeterminada) Using launch settings from {0}... - Using launch settings from {0}... + Usando la configuración de inicio de {0}... Launch profile is not a JSON object. - Launch profile is not a JSON object. + El perfil de inicio no es un objeto JSON. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + No se admite el tipo de perfil de inicio "{0}". A usable launch profile could not be located. - A usable launch profile could not be located. + No se ha podido encontrar un perfil de inicio que se pueda usar. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Excepción inesperada al procesar la configuración de inicio: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + La propiedad "profiles" del documento de configuración de inicio no es un objeto JSON. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + Se produjo un error al leer launchSettings.json. {0} + + '{0}' is not a valid project file. + "{0}" no es un archivo de proyecto válido. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf index cb48991d4..f62af586a 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf @@ -72,70 +72,75 @@ Le {1} actuel est '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + Nom du profil de lancement (le cas échéant) à utiliser au lancement de l'application. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + N'essayez pas d'utiliser launchSettings.json pour configurer l'application. The specified launch profile could not be located. - The specified launch profile could not be located. + Le profil de lancement spécifié est introuvable. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + Impossible d'appliquer le profil de lancement "{0}". {1} (Default) - (Default) + (Par défaut) Using launch settings from {0}... - Using launch settings from {0}... + Utilisation des paramètres de lancement à partir de {0}... Launch profile is not a JSON object. - Launch profile is not a JSON object. + Le profil de lancement n'est pas un objet JSON. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + Le type de profil de lancement '{0}' n'est pas pris en charge. A usable launch profile could not be located. - A usable launch profile could not be located. + Impossible de localiser un profil de lancement utilisable. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Une exception inattendue s'est produite durant le traitement des paramètres de lancement : {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + La propriété 'profiles' du document de paramètres de lancement n'est pas un objet JSON. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + Une erreur s'est produite durant la lecture de launchSettings.json. {0} + + '{0}' is not a valid project file. + '{0}' n'est pas un fichier projet valide. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf index aff5cb27a..ba7512823 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf @@ -67,75 +67,80 @@ Il valore corrente di {1} è '{2}'. Specify which project file to use because {0} contains more than one project file. - Specificare il file di progetto da usare perché questo file perché {0} contiene più file di progetto. + Specificare il file di progetto da usare perché l'elemento {0} contiene più file di progetto. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + Nome dell'eventuale profilo di avvio da usare all'avvio dell'applicazione. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + Non prova a usare launchSettings.json per configurare l'applicazione. The specified launch profile could not be located. - The specified launch profile could not be located. + Il profilo di avvio specificato non è stato trovato. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + Non è stato possibile applicare il profilo di avvio "{0}". {1} (Default) - (Default) + (Predefinito) Using launch settings from {0}... - Using launch settings from {0}... + Uso delle impostazioni di avvio di {0}... Launch profile is not a JSON object. - Launch profile is not a JSON object. + Il profilo di avvio non è un oggetto JSON. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + Il tipo '{0}' del profilo di avvio non è supportato. A usable launch profile could not be located. - A usable launch profile could not be located. + Non è stato trovato alcun profilo di avvio utilizzabile. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Si è verificata un'eccezione imprevista durante l'elaborazione delle impostazioni di avvio: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + La proprietà 'profiles' del documento delle impostazioni di avvio non è un oggetto JSON. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + È stato rilevato un errore durante la lettura di launchSettings.json. {0} + + '{0}' is not a valid project file. + '{0}' non è un file di progetto valido. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf index a5a82bde2..fa08955ee 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf @@ -72,70 +72,75 @@ The current {1} is '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + アプリケーションを起動するときに使用する起動プロファイルの名前 (存在する場合)。 Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + launchSettings.json の使用によるアプリケーションの構成は行わないでください。 The specified launch profile could not be located. - The specified launch profile could not be located. + 指定された起動プロファイルが見つかりませんでした。 The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + 起動プロファイル "{0}" を適用できませんでした。 {1} (Default) - (Default) + (既定) Using launch settings from {0}... - Using launch settings from {0}... + {0} からの起動設定を使用中... Launch profile is not a JSON object. - Launch profile is not a JSON object. + 起動プロファイルが JSON オブジェクトではありません。 The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + 起動プロファイルの種類 '{0}' はサポートされていません。 A usable launch profile could not be located. - A usable launch profile could not be located. + 使用可能な起動プロファイルが見つかりませんでした。 An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + 起動設定の処理中に予期しない例外が発生しました: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + 起動設定のドキュメントの 'profiles' プロパティが JSON オブジェクトではありません。 An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + launchSettings.json を読み取るときにエラーが発生しました。 {0} + + '{0}' is not a valid project file. + '{0}' は有効なプロジェクト ファイルではありません。 + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf index ec71b08a4..41a2ec94e 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf @@ -72,70 +72,75 @@ The current {1} is '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + 응용 프로그램을 시작할 때 사용하는 시작 프로필(있는 경우)의 이름입니다. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + launchSettings.json을 사용하여 응용 프로그램을 구성하지 마세요. The specified launch profile could not be located. - The specified launch profile could not be located. + 지정한 시작 프로필을 찾을 수 없습니다. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + 시작 프로필 "{0}"을(를) 적용할 수 없습니다. {1} (Default) - (Default) + (기본값) Using launch settings from {0}... - Using launch settings from {0}... + {0}의 시작 설정을 사용하는 중... Launch profile is not a JSON object. - Launch profile is not a JSON object. + 시작 프로필이 JSON 개체가 아닙니다. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + 시작 프로필 형식 '{0}'은(는) 지원되지 않습니다. A usable launch profile could not be located. - A usable launch profile could not be located. + 사용할 수 있는 시작 프로필을 찾을 수 없습니다. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + 시작 설정을 처리하는 동안 예기치 않은 예외가 발생했습니다. {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + 시작 설정 문서의 '프로필' 속성이 JSON 개체가 아닙니다. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + launchSettings.json을 읽는 동안 오류가 발생했습니다. {0} + + '{0}' is not a valid project file. + '{0}'은(는) 유효한 프로젝트 파일이 아닙니다. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf index 8690a8e73..aab3a4913 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf @@ -72,70 +72,75 @@ Bieżący element {1}: „{2}”. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + Nazwa profilu uruchamiania (jeśli istnieje), który ma być używany podczas uruchamiania aplikacji. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + Nie próbuj konfigurować aplikacji za pomocą pliku launchSettings.json. The specified launch profile could not be located. - The specified launch profile could not be located. + Nie można odnaleźć określonego profilu uruchamiania. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + Nie można zastosować profilu uruchamiania „{0}”. {1} (Default) - (Default) + (Domyślne) Using launch settings from {0}... - Using launch settings from {0}... + Używanie ustawień uruchamiania z profilu {0}... Launch profile is not a JSON object. - Launch profile is not a JSON object. + Profil uruchamiania nie jest obiektem JSON. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + Typ profilu uruchamiania „{0}” nie jest obsługiwany. A usable launch profile could not be located. - A usable launch profile could not be located. + Nie można odnaleźć nadającego się do użytku profilu uruchamiania. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Wystąpił nieoczekiwany wyjątek podczas przetwarzania ustawień uruchamiania: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + Właściwość „profiles” dokumentu ustawień uruchamiania nie jest obiektem JSON. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + Wystąpił błąd podczas odczytywania pliku launchSettings.json. {0} + + '{0}' is not a valid project file. + „{0}” nie jest prawidłowym plikiem projektu. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf index 7227491f9..2843c82ef 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf @@ -72,70 +72,75 @@ O {1} atual é '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + O nome do perfil de inicialização (se houver) a ser usado ao iniciar o aplicativo. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + Não tente usar o launchSettings.json para configurar o aplicativo. The specified launch profile could not be located. - The specified launch profile could not be located. + O perfil de inicialização especificado não pôde ser localizado. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + O perfil de inicialização "{0}" não pôde ser aplicado. {1} (Default) - (Default) + (Padrão) Using launch settings from {0}... - Using launch settings from {0}... + Usando as configurações de inicialização de {0}... Launch profile is not a JSON object. - Launch profile is not a JSON object. + O perfil de inicialização não é um objeto JSON. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + Não há suporte para o tipo de perfil de inicialização '{0}'. A usable launch profile could not be located. - A usable launch profile could not be located. + Um perfil de inicialização utilizável não pôde ser localizado. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Ocorreu uma exceção inesperada durante o processamento das configurações de inicialização: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + A propriedade 'perfis' do documento de configurações de inicialização não é um objeto JSON. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + Um erro foi encontrado durante a leitura do launchSettings.json. {0} + + '{0}' is not a valid project file. + '{0}' não é um arquivo de projeto válido. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf index 4cc54df57..95b1e0400 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf @@ -72,70 +72,75 @@ The current {1} is '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + Имя профиля запуска (если он есть), используемое при запуске приложения. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + Не используйте launchSettings.json для настройки приложения. The specified launch profile could not be located. - The specified launch profile could not be located. + Не удалось найти указанный профиль запуска. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + Не удалось применить профиль запуска "{0}". {1} (Default) - (Default) + (По умолчанию) Using launch settings from {0}... - Using launch settings from {0}... + Используются параметры запуска из {0}... Launch profile is not a JSON object. - Launch profile is not a JSON object. + Профиль запуска не является объектом JSON. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + Тип профиля запуска "{0}" не поддерживается. A usable launch profile could not be located. - A usable launch profile could not be located. + Не удалось найти подходящий для использования профиль запуска. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + При обработке параметров запуска возникло непредвиденное исключение: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + Свойство "profiles" документа параметров запуска не является объектом JSON. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + При чтении launchSettings.json обнаружена ошибка. {0} + + '{0}' is not a valid project file. + "{0}" не является допустимым файлом проекта. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf index 2d375d469..a3a9211fb 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf @@ -14,7 +14,7 @@ Build and run the app using the specified framework. The framework has to be specified in the project file. - Uygulamayı belirtilen çerçeveyi kullanarak derleyin ve çalıştırın. Çerçevenin proje dosyasında belirtilmesi gerekir. + Uygulamayı belirtilen çerçeveyi kullanarak derleyin ve çalıştırın. Çerçevenin proje dosyasında belirtilmesi gerekir. @@ -72,70 +72,75 @@ Geçerli {1}: '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + Uygulama başlatılırken kullanılacak başlatma profilinin (varsa) adı. Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + Uygulamayı yapılandırmak için launchSettings.json kullanmayı denemeyin. The specified launch profile could not be located. - The specified launch profile could not be located. + Belirtilen başlatma profili bulunamadı. The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + "{0}" başlatma profili uygulanamadı. {1} (Default) - (Default) + (Varsayılan) Using launch settings from {0}... - Using launch settings from {0}... + {0} içindeki başlatma ayarları kullanılıyor... Launch profile is not a JSON object. - Launch profile is not a JSON object. + Başlatma profili bir JSON nesnesi değil. The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + '{0}' başlatma profili türü desteklenmiyor. A usable launch profile could not be located. - A usable launch profile could not be located. + Kullanılabilir bir başlatma profili bulunamadı. An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + Başlatma ayarları işlenirken beklenmeyen bir özel durum oluştu: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + Başlatma ayarları belgesinin 'profiles' özelliği bir JSON nesnesi değil. An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + launchSettings.json okunurken bir hatayla karşılaşıldı. {0} + + '{0}' is not a valid project file. + '{0}' geçerli bir proje dosyası değil. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf index 2b962e69c..a4b5c43c2 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf @@ -72,70 +72,75 @@ The current {1} is '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + 启动应用程序时使用的启动配置文件名称(如果有)。 Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + 请勿尝试使用 launchSettings.json 配置应用程序。 The specified launch profile could not be located. - The specified launch profile could not be located. + 找不到指定的启动配置文件。 The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + 无法应用启动配置文件“{0}”。 {1} (Default) - (Default) + (默认值) Using launch settings from {0}... - Using launch settings from {0}... + 从 {0} 使用启动设置... Launch profile is not a JSON object. - Launch profile is not a JSON object. + 启动配置文件不是 JSON 对象。 The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + 不支持启动配置文件类型“{0}”。 A usable launch profile could not be located. - A usable launch profile could not be located. + 找不到可用的启动配置文件。 An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + 处理启动设置时出现意外异常: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + 启动设置文档的“profiles”属性不是 JSON 对象。 An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + 读取 launchSettings.json 时发生错误。 {0} + + '{0}' is not a valid project file. + “{0}”不是有效的项目文件。 + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf index f7a942ece..b9bd6e9c3 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf @@ -72,70 +72,75 @@ The current {1} is '{2}'. The name of the launch profile (if any) to use when launching the application. - The name of the launch profile (if any) to use when launching the application. + 啟動應用程式時,所要使用的啟動設定檔 (若有) 名稱。 Do not attempt to use launchSettings.json to configure the application. - Do not attempt to use launchSettings.json to configure the application. + 請勿嘗試使用 launchSettings.json 設定該應用程式。 The specified launch profile could not be located. - The specified launch profile could not be located. + 找不到指定的啟動設定檔。 The launch profile "{0}" could not be applied. {1} - The launch profile "{0}" could not be applied. + 無法套用啟動設定檔 "{0}"。 {1} (Default) - (Default) + (預設) Using launch settings from {0}... - Using launch settings from {0}... + 使用來自 {0} 的啟動設定... Launch profile is not a JSON object. - Launch profile is not a JSON object. + 啟動設定檔並非 JSON 物件。 The launch profile type '{0}' is not supported. - The launch profile type '{0}' is not supported. + 不支援啟動設定檔類型 '{0}'。 A usable launch profile could not be located. - A usable launch profile could not be located. + 找不到可用的啟動設定檔。 An unexpected exception occurred while processing launch settings: {0} - An unexpected exception occurred while processing launch settings: + 處理啟動設定時發生未預期的例外狀況: {0} The 'profiles' property of the launch settings document is not a JSON object. - The 'profiles' property of the launch settings document is not a JSON object. + 啟動設定文件的 'profiles' 屬性並非 JSON 物件。 An error was encountered when reading launchSettings.json. {0} - An error was encountered when reading launchSettings.json. + 讀取 launchSettings.json 時發生錯誤。 {0} + + '{0}' is not a valid project file. + '{0}' 並非有效的專案名稱。 + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.fr.xlf index aea4a6373..3c982c3d3 100644 --- a/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.fr.xlf @@ -9,7 +9,7 @@ OUTPUT_DIR - RÉP_SORTIE + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.pt-BR.xlf index 0125f5970..e9ff5a113 100644 --- a/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.pt-BR.xlf @@ -9,7 +9,7 @@ OUTPUT_DIR - DIRETÓRIO_DE_SAÍDA + OUTPUT_DIR diff --git a/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.tr.xlf index 2d31d47d1..8c17f8dc9 100644 --- a/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-store/xlf/LocalizableStrings.tr.xlf @@ -9,7 +9,7 @@ OUTPUT_DIR - OUTPUT_DIR + ÇIKIŞ_DİZİNİ diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf index 2c643dd52..d50458ccc 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf @@ -24,7 +24,7 @@ SETTINGS_FILE - SETTINGS_FILE + ARCHIVO_CONFIGURACIÓN @@ -39,7 +39,7 @@ EXPRESSION - EXPRESSION + EXPRESIÓN @@ -63,7 +63,7 @@ Use custom adapters from the given path in the test run. Example: --test-adapter-path <PATH_TO_ADAPTER> Indica que se usen adaptadores personalizados de la ruta de acceso dada en la serie de pruebas. - Ejemplo: --test-adapter-path <RUTA_ACCESO_ADAPTADOR> + Ejemplo: --test-adapter-path <RUTA_DE_ADAPTADOR> @@ -87,7 +87,7 @@ Configuration to use for building the project. Default for most projects is "Debug". - Configuración para usar para crear el proyecto. El valor predeterminado para la mayoría de los proyectos es "Depurar". + Configuración que se usará para crear el proyecto. El valor predeterminado para la mayoría de los proyectos es "Debug". @@ -129,19 +129,19 @@ PATH_TO_ADAPTER - PATH_TO_ADAPTER + RUTA_DE_ADAPTADOR The directory where the test results are going to be placed. The specified directory will be created if it does not exist. Example: --results-directory <PATH_TO_RESULTS_DIRECTORY> El directorio donde se van a colocar los resultados de prueba. Si no existe, se creará el directorio especificado. - Ejemplo: --results-directory <PATH_TO_RESULTS_DIRECTORY> + Ejemplo: --results-directory <RUTA_DE_DIRECTORIO_DE_RESULTADOS> PATH_TO_RESULTS_DIRECTORY - PATH_TO_RESULTS_DIRECTORY + RUTA_DE_DIRECTORIO_DE_RESULTADOS @@ -163,7 +163,7 @@ Argumentos RunSettings: DATA_COLLECTOR_FRIENDLY_NAME - DATA_COLLECTOR_FRIENDLY_NAME + NOMBRE_DESCRIPTIVO_DE_RECOPILADOR_DE_DATOS diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf index 79b7392d5..488c2a39a 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf @@ -14,7 +14,7 @@ PROJECT - PROJET + PROJECT @@ -24,7 +24,7 @@ SETTINGS_FILE - FICHIER_PARAMÈTRES + SETTINGS_FILE @@ -102,7 +102,7 @@ OUTPUT_DIR - RÉP_SORTIE + OUTPUT_DIR @@ -112,7 +112,7 @@ PATH_TO_FILE - CHEMIN_FICHIER + PATH_TO_FILE diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf index 5bd0d2355..18139bb2a 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf @@ -118,8 +118,8 @@ Enable verbose logs for test platform. Logs are written to the provided file. - テスト プラットフォームの詳細ログを有効にする - ログは指定されたファイルに書き込まれます。 + "テスト プラットフォームの詳細ログを有効にします。 + ログは指定されたファイルに書き込まれます。" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf index e946009c2..76e80193b 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf @@ -52,9 +52,9 @@ 지정된 식과 일치하는 테스트를 실행합니다. 예: - 우선 순위를 1로 설정하여 테스트 실행: --filter "Priority = 1" - 지정된 전체 이름으로 테스트 실행: --filter "FullyQualifiedName=Namespace.ClassName.MethodName" - 지정된 이름을 포함하는 테스트 실행: --filter "FullyQualifiedName~Namespace.Class" + 우선 순위가 1로 설정된 테스트 실행: --filter ""Priority = 1"" + 지정된 전체 이름이 있는 테스트 실행: --filter ""FullyQualifiedName=Namespace.ClassName.MethodName"" + 지정된 이름을 포함하는 테스트 실행: --filter ""FullyQualifiedName~Namespace.Class"" 필터링 지원에 대한 추가 정보: https://aka.ms/vstest-filtering diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf index 5b1399c48..eb78cae41 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf @@ -87,7 +87,7 @@ Configuration to use for building the project. Default for most projects is "Debug". - Konfiguracja do użycia na potrzeby kompilacji projektu. W przypadku większości projektów ustawienie domyślne to „Debug”. + Konfiguracja do użycia na potrzeby kompilacji projektu. W przypadku większości projektów ustawienie domyślne to „Debugowanie”. @@ -169,7 +169,7 @@ Argumenty RunSettings: Enables data collector for the test run. More info here : https://aka.ms/vstest-collect - Włącza moduł zbierający dane dla uruchomienia testu. + Włącza moduł zbierający dane dotyczące uruchomienia testu. Więcej informacji można znaleźć tutaj: https://aka.ms/vstest-collect diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf index 2769a6b99..24ab9fbb7 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf @@ -14,7 +14,7 @@ PROJECT - PROJETO + PROJECT @@ -24,7 +24,7 @@ SETTINGS_FILE - ARQUIVO_CONFIGURAÇÕES + SETTINGS_FILE @@ -39,7 +39,7 @@ EXPRESSION - EXPRESSÃO + EXPRESSION @@ -82,7 +82,7 @@ CONFIGURATION - CONFIGURAÇÃO + CONFIGURATION @@ -92,7 +92,7 @@ FRAMEWORK - ESTRUTURA + FRAMEWORK @@ -102,7 +102,7 @@ OUTPUT_DIR - DIRETÓRIO_DE_SAÍDA + OUTPUT_DIR @@ -112,7 +112,7 @@ PATH_TO_FILE - CAMINHO_PARA_ARQUIVO + PATH_TO_FILE diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf index f6db89c8e..a6d961ac2 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf @@ -24,7 +24,7 @@ SETTINGS_FILE - SETTINGS_FILE + AYAR_DOSYASI @@ -39,7 +39,7 @@ EXPRESSION - EXPRESSION + İFADE @@ -102,7 +102,7 @@ OUTPUT_DIR - OUTPUT_DIR + ÇIKIŞ_DİZİNİ @@ -112,7 +112,7 @@ PATH_TO_FILE - PATH_TO_FILE + DOSYA_YOLU diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj index 7ecb12147..71da96676 100644 --- a/src/dotnet/dotnet.csproj +++ b/src/dotnet/dotnet.csproj @@ -65,6 +65,7 @@ + diff --git a/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf index 1160093e9..56caa7e29 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Při spuštění příkazu neprovede implicitní obnovení. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/dotnet/xlf/CommonLocalizableStrings.de.xlf index b5ca6f072..b2c179985 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Führt beim Ausführen des Befehls keine implizite Wiederherstellung durch. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/dotnet/xlf/CommonLocalizableStrings.es.xlf index 91daeeb06..f1a9c6402 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -4,27 +4,27 @@ Could not find any project in `{0}`. - No se encuentra ningún proyecto en `{0}`. + No se encuentra ningún proyecto en "{0}". Found more than one project in `{0}`. Please specify which one to use. - Se han encontrado varios proyectos en `{0}`. Especifique el que debe usarse. + Se han encontrado varios proyectos en "{0}". Especifique el que debe usarse. Project already has a reference to `{0}`. - El proyecto ya tiene una referencia a `{0}`. + El proyecto ya tiene una referencia a "{0}". Project reference `{0}` could not be found. - No se encuentra la referencia de proyecto `{0}`. + No se encuentra la referencia de proyecto "{0}". Project reference `{0}` removed. - La referencia de proyecto `{0}` se ha quitado. + La referencia de proyecto "{0}" se ha quitado. @@ -104,7 +104,7 @@ Reference `{0}` added to the project. - Se ha agregado la referencia `{0}` al proyecto. + Se ha agregado la referencia "{0}" al proyecto. @@ -214,12 +214,12 @@ {0} `{1}` found but is invalid. - Se ha encontrado el {0} `{1}`, pero no es válido. + Se ha encontrado el {0} "{1}", pero no es válido. `{0}` found but is invalid. - Se ha encontrado `{0}`, pero no es válido. + Se ha encontrado "{0}", pero no es válido. @@ -244,12 +244,12 @@ {0} or {1} not found in `{2}`. - No se encuentran {0} ni {1} en `{2}`. + No se encuentran {0} ni {1} en "{2}". File `{0}` not found. - No se encuentra el archivo `{0}`. + No se encuentra el archivo "{0}". @@ -274,7 +274,7 @@ {0} already contains {1} `{2}`. - {0} ya contiene un {1} `{2}`. + {0} ya contiene un {1} "{2}". @@ -284,7 +284,7 @@ {0} already has {1} `{2}`. - {0} ya tiene el {1} `{2}`. + {0} ya tiene el {1} "{2}". @@ -329,17 +329,17 @@ Could not find project or directory `{0}`. - No se encuentra el proyecto o directorio `{0}`. + No se encuentra el proyecto o directorio "{0}". Found a project `{0}` but it is invalid. - Se ha encontrado el proyecto `{0}`, pero no es válido. + Se ha encontrado el proyecto "{0}", pero no es válido. Invalid project `{0}`. - El proyecto `{0}` no es válido. + El proyecto "{0}" no es válido. @@ -349,7 +349,7 @@ Could not find solution or directory `{0}`. - No se encuentra la solución o el directorio `{0}`. + No se encuentra la solución o el directorio "{0}". @@ -359,7 +359,7 @@ Reference `{0}` is invalid. - La referencia `{0}` no es válida. + La referencia "{0}" no es válida. @@ -369,12 +369,12 @@ Package reference `{0}` does not exist. - La referencia de paquete `{0}` no existe. + La referencia de paquete "{0}" no existe. Package reference `{0}` is invalid. - La referencia de paquete `{0}` no es válida. + La referencia de paquete "{0}" no es válida. @@ -384,12 +384,12 @@ Package reference `{0}` added to the project. - Se ha agregado la referencia de paquete `{0}` al proyecto. + Se ha agregado la referencia de paquete "{0}" al proyecto. Project {0} already has a reference `{1}`. - El proyecto {0} ya tiene una referencia `{1}`. + El proyecto {0} ya tiene una referencia "{1}". @@ -399,12 +399,12 @@ Project `{0}` does not exist. - El proyecto `{0}` no existe. + El proyecto "{0}" no existe. Project `{0}` is invalid. - El proyecto `{0}` no es válido. + El proyecto "{0}" no es válido. @@ -414,7 +414,7 @@ Project `{0}` added to the solution. - Se ha agregado el proyecto `{0}` a la solución. + Se ha agregado el proyecto "{0}" a la solución. @@ -424,7 +424,7 @@ Reference `{0}` deleted from the project. - Se ha eliminado la referencia “{0}” del proyecto. + Se ha eliminado la referencia "{0}" del proyecto. @@ -439,12 +439,12 @@ Package reference `{0}` could not be found in the project. - No se encuentra la referencia de paquete `{0}` en el proyecto. + No se encuentra la referencia de paquete "{0}" en el proyecto. Reference `{0}` deleted from the project. - Se ha eliminado la referencia “{0}” del proyecto. + Se ha eliminado la referencia "{0}" del proyecto. @@ -454,17 +454,17 @@ Package reference `{0}` deleted. - Se ha eliminado la referencia de paquete `{0}`. + Se ha eliminado la referencia de paquete "{0}". Project `{0}` could not be found in the solution. - No se encuentra el proyecto `{0}` en la solución. + No se encuentra el proyecto "{0}" en la solución. Project `{0}` removed from solution. - Se ha quitado el proyecto `{0}` de la solución. + Se ha quitado el proyecto "{0}" de la solución. @@ -474,7 +474,7 @@ Project `{0}` deleted from solution. - Se ha eliminado el proyecto `{0}` de la solución. + Se ha eliminado el proyecto "{0}" de la solución. @@ -509,17 +509,17 @@ Version of package `{0}` updated to `{1}`. - La versión del paquete `{0}` se ha actualizado a `{1}`. + La versión del paquete "{0}" se ha actualizado a "{1}". Version of package `{0}` updated. - Se ha actualizado la versión del paquete `{0}`. + Se ha actualizado la versión del paquete "{0}". Could not update the version of the package `{0}`. - No se puede actualizar la versión del paquete `{0}`. + No se puede actualizar la versión del paquete "{0}". @@ -656,7 +656,7 @@ Configuration to use for building the project. Default for most projects is "Debug". - Configuración que se usará para compilar el proyecto. El valor predeterminado para la mayoría de los proyectos es "Depurar". + Configuración que se usará para crear el proyecto. El valor predeterminado para la mayoría de los proyectos es "Debug". @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + No realiza una restauración implícita al ejecutar el comando. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf index 0d4bea569..b33c6611e 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -631,7 +631,7 @@ PROJECT - PROJET + PROJECT @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Ne fait pas de restauration implicite durant l'exécution de la commande. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/dotnet/xlf/CommonLocalizableStrings.it.xlf index 327d4020e..b1714f3e5 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -479,7 +479,7 @@ There are no {0} references in project {1}. ;; {0} is the type of the item being requested (project, package, p2p) and {1} is the object operated on (a project file or a solution file). - Non ci sono riferimenti a {0} nel progetto {1}. ;; {0} è il tipo dell'elemento richiesto (progetto, pacchetto o P2P) e {1} è l'oggetto su cui si interviene (file di progetto o di soluzione). + Non ci sono riferimenti a {0} nel progetto {1}. ;; {0} è il tipo dell'elemento richiesto (progetto, pacchetto o P2P) e {1} è l'oggetto su cui si interviene (file di progetto o di soluzione). @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Non esegue un ripristino implicito durante l'esecuzione del comando. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf index 160c55a32..f95dbf451 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + コマンドを実行するときに暗黙的復元を行いません。 diff --git a/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf index 8ff1ae7e6..029bc8c0c 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -4,27 +4,27 @@ Could not find any project in `{0}`. - `{0}`에서 프로젝트를 찾을 수 없습니다. + '{0}'에서 프로젝트를 찾을 수 없습니다. Found more than one project in `{0}`. Please specify which one to use. - `{0}`에서 프로젝트를 두 개 이상 찾았습니다. 사용할 파일을 지정하세요. + '{0}'에서 프로젝트를 두 개 이상 찾았습니다. 사용할 파일을 지정하세요. Project already has a reference to `{0}`. - 프로젝트에 이미 `{0}`에 대한 참조가 있습니다. + 프로젝트에 이미 '{0}'에 대한 참조가 있습니다. Project reference `{0}` could not be found. - 프로젝트 참조 `{0}`을(를) 찾을 수 없습니다. + 프로젝트 참조 '{0}'을(를) 찾을 수 없습니다. Project reference `{0}` removed. - 프로젝트 참조 `{0}`이(가) 제거되었습니다. + 프로젝트 참조 '{0}'이(가) 제거되었습니다. @@ -104,7 +104,7 @@ Reference `{0}` added to the project. - 프로젝트에 `{0}` 참조가 추가되었습니다. + 프로젝트에 '{0}' 참조가 추가되었습니다. @@ -214,7 +214,7 @@ {0} `{1}` found but is invalid. - {0} `{1}`이(가) 있지만 잘못되었습니다. + {0} '{1}'이(가) 있지만 잘못되었습니다. @@ -244,12 +244,12 @@ {0} or {1} not found in `{2}`. - `{2}`에서 '{0}' 또는 {1}을(를) 찾을 수 없습니다. + '{2}'에서 '{0}' 또는 {1}을(를) 찾을 수 없습니다. File `{0}` not found. - `{0}` 파일을 찾을 수 없습니다. + '{0}' 파일을 찾을 수 없습니다. @@ -259,7 +259,7 @@ {0} `{1}` does not exist. - {0} `{1}`이(가) 없습니다. + {0} '{1}'이(가) 없습니다. @@ -274,7 +274,7 @@ {0} already contains {1} `{2}`. - {0}에 {1} `{2}`이(가) 이미 있습니다. + {0}에 {1} '{2}'이(가) 이미 있습니다. @@ -284,7 +284,7 @@ {0} already has {1} `{2}`. - {0}에 {1} `{2}`이(가) 이미 있습니다. + {0}에 {1} '{2}'이(가) 이미 있습니다. @@ -334,12 +334,12 @@ Found a project `{0}` but it is invalid. - `{0}` 프로젝트가 있지만 잘못되었습니다. + '{0}' 프로젝트가 있지만 잘못되었습니다. Invalid project `{0}`. - `{0}` 프로젝트가 잘못되었습니다. + '{0}' 프로젝트가 잘못되었습니다. @@ -349,7 +349,7 @@ Could not find solution or directory `{0}`. - 솔루션 또는 디렉터리 `{0}`을(를) 찾을 수 없습니다. + 솔루션 또는 디렉터리 '{0}'을(를) 찾을 수 없습니다. @@ -359,7 +359,7 @@ Reference `{0}` is invalid. - `{0}` 참조가 잘못되었습니다. + '{0}' 참조가 잘못되었습니다. @@ -369,12 +369,12 @@ Package reference `{0}` does not exist. - 패키지 참조 `{0}`이(가) 없습니다. + 패키지 참조 '{0}'이(가) 없습니다. Package reference `{0}` is invalid. - 패키지 참조 `{0}`이(가) 잘못되었습니다. + 패키지 참조 '{0}'이(가) 잘못되었습니다. @@ -384,12 +384,12 @@ Package reference `{0}` added to the project. - 프로젝트에 패키지 참조 `{0}`이(가) 추가되었습니다. + 프로젝트에 패키지 참조 '{0}'이(가) 추가되었습니다. Project {0} already has a reference `{1}`. - {0} 프로젝트에 이미 `{1}` 참조가 있습니다. + {0} 프로젝트에 이미 '{1}' 참조가 있습니다. @@ -399,12 +399,12 @@ Project `{0}` does not exist. - `{0}` 프로젝트가 없습니다. + '{0}' 프로젝트가 없습니다. Project `{0}` is invalid. - `{0}` 프로젝트가 잘못되었습니다. + '{0}' 프로젝트가 잘못되었습니다. @@ -414,7 +414,7 @@ Project `{0}` added to the solution. - `{0}` 프로젝트가 솔루션에 추가되었습니다. + '{0}' 프로젝트가 솔루션에 추가되었습니다. @@ -424,7 +424,7 @@ Reference `{0}` deleted from the project. - `{0}` 참조가 프로젝트에서 삭제되었습니다. + '{0}' 참조가 프로젝트에서 삭제되었습니다. @@ -434,17 +434,17 @@ Reference `{0}` deleted. - `{0}` 참조가 삭제되었습니다. + '{0}' 참조가 삭제되었습니다. Package reference `{0}` could not be found in the project. - 프로젝트에서 패키지 참조 `{0}`을(를) 찾을 수 없습니다. + 프로젝트에서 패키지 참조 '{0}'을(를) 찾을 수 없습니다. Reference `{0}` deleted from the project. - `{0}` 참조가 프로젝트에서 삭제되었습니다. + '{0}' 참조가 프로젝트에서 삭제되었습니다. @@ -454,17 +454,17 @@ Package reference `{0}` deleted. - 패키지 참조 `{0}`이(가) 삭제되었습니다. + 패키지 참조 '{0}'이(가) 삭제되었습니다. Project `{0}` could not be found in the solution. - 솔루션에서 `{0}` 프로젝트를 찾을 수 없습니다. + 솔루션에서 '{0}' 프로젝트를 찾을 수 없습니다. Project `{0}` removed from solution. - `{0}` 프로젝트가 솔루션에서 제거되었습니다. + '{0}' 프로젝트가 솔루션에서 제거되었습니다. @@ -474,7 +474,7 @@ Project `{0}` deleted from solution. - `{0}` 프로젝트가 솔루션에서 삭제되었습니다. + '{0}' 프로젝트가 솔루션에서 삭제되었습니다. @@ -509,17 +509,17 @@ Version of package `{0}` updated to `{1}`. - `{0}` 패키지의 버전이 `{1}`(으)로 업데이트되었습니다. + '{0}' 패키지의 버전이 '{1}'(으)로 업데이트되었습니다. Version of package `{0}` updated. - `{0}` 패키지의 버전이 업데이트되었습니다. + '{0}' 패키지의 버전이 업데이트되었습니다. Could not update the version of the package `{0}`. - `{0}` 패키지의 버전을 업데이트할 수 없습니다. + '{0}' 패키지의 버전을 업데이트할 수 없습니다. @@ -569,7 +569,7 @@ Found more than one solution file in {0}. Please specify which one to use. - {0}에서 솔루션 파일이 두 개 이상 있습니다. 사용할 파일을 지정하세요. + {0}에서 솔루션 파일을 두 개 이상 찾았습니다. 사용할 파일을 지정하세요. @@ -611,7 +611,7 @@ Invalid solution `{0}`. {1}. - `{0}` 솔루션이 잘못되었습니다. {1} + '{0}' 솔루션이 잘못되었습니다. {1} @@ -636,7 +636,7 @@ Invalid project `{0}`. {1}. - `{0}` 프로젝트가 잘못되었습니다. {1}. + '{0}' 프로젝트가 잘못되었습니다. {1}. @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + 명령을 실행할 때 암시적 복원을 수행하지 않습니다. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf index 687827cff..1db654dd8 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -656,7 +656,7 @@ Configuration to use for building the project. Default for most projects is "Debug". - Konfiguracja do użycia na potrzeby kompilacji projektu. Opcją domyślną w przypadku większości projektów jest „Debug”. + Konfiguracja do użycia na potrzeby kompilacji projektu. W przypadku większości projektów ustawienie domyślne to „Debugowanie”. @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Nie wykonuje niejawnego przywracania podczas wykonywania polecenia. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index cdcbb7c0b..89cc1e55d 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -569,7 +569,7 @@ Found more than one solution file in {0}. Please specify which one to use. - Foi encontrado mais de um arquivo de solução em {0}. Especifique qual deles deve ser usado. + Foi encontrado mais de um arquivo de solução em {0}. Especifique qual deve ser usado. @@ -584,7 +584,7 @@ FRAMEWORK - ESTRUTURA + FRAMEWORK @@ -631,7 +631,7 @@ PROJECT - PROJETO + PROJECT @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Não faz uma restauração implícita ao executar o comando. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf index b605492e3..a63e439a0 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Не выполняет неявное восстановление при выполнении команды. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 85d37b1f2..6584fc018 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -584,7 +584,7 @@ FRAMEWORK - FRAMEWORK + ÇERÇEVE @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + Komut yürütülürken örtük geri yükleme gerçekleştirmez. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index e593eef52..2fdb31f54 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + 请勿在执行命令时进行隐式还原。 diff --git a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index 3fa8984d1..2e0845e40 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -671,7 +671,7 @@ Does not do an implicit restore when executing the command. - Does not do an implicit restore when executing the command. + 執行此命令時,請勿進行隱含還原。 diff --git a/src/dotnet/xlf/LocalizableStrings.es.xlf b/src/dotnet/xlf/LocalizableStrings.es.xlf index f58ba7e00..3b0543881 100644 --- a/src/dotnet/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/xlf/LocalizableStrings.es.xlf @@ -5,27 +5,27 @@ Could not find any project in `{0}`. - No se encuentra ningún proyecto en `{0}`. + No se encuentra ningún proyecto en "{0}". Found more than one project in `{0}`. Please specify which one to use. - Se han encontrado varios proyectos en `{0}`. Especifique el que debe usarse. + Se han encontrado varios proyectos en "{0}". Especifique el que debe usarse. Project already has a reference to `{0}`. - El proyecto ya tiene una referencia a `{0}`. + El proyecto ya tiene una referencia a "{0}". Project reference `{0}` could not be found. - No se encuentra la referencia de proyecto `{0}`. + No se encuentra la referencia de proyecto "{0}". Project reference `{0}` removed. - La referencia de proyecto `{0}` se ha quitado. + La referencia de proyecto "{0}" se ha quitado. @@ -225,12 +225,12 @@ {0} `{1}` found but is invalid. - Se ha encontrado el {0} `{1}`, pero no es válido. + Se ha encontrado el {0} "{1}", pero no es válido. `{0}` found but is invalid. - Se ha encontrado `{0}`, pero no es válido. + Se ha encontrado "{0}", pero no es válido. @@ -255,12 +255,12 @@ {0} or {1} not found in `{2}`. - No se encuentran {0} ni {1} en `{2}`. + No se encuentran {0} ni {1} en "{2}". File `{0}` not found. - No se encuentra el archivo `{0}`. + No se encuentra el archivo "{0}". @@ -285,7 +285,7 @@ {0} already contains {1} `{2}`. - {0} ya contiene un {1} `{2}`. + {0} ya contiene un {1} "{2}". @@ -295,7 +295,7 @@ {0} already has {1} `{2}`. - {0} ya tiene el {1} `{2}`. + {0} ya tiene el {1} "{2}". @@ -340,27 +340,27 @@ Could not find any project in `{0}`. - No se encuentra ningún proyecto en `{0}`. + No se encuentra ningún proyecto en "{0}". Could not find project or directory `{0}`. - No se encuentra el proyecto o directorio `{0}`. + No se encuentra el proyecto o directorio "{0}". Found more than one project in `{0}`. Please specify which one to use. - Se han encontrado varios proyectos en `{0}`. Especifique el que debe usarse. + Se han encontrado varios proyectos en "{0}". Especifique el que debe usarse. Found a project `{0}` but it is invalid. - Se ha encontrado el proyecto `{0}`, pero no es válido. + Se ha encontrado el proyecto "{0}", pero no es válido. Invalid project `{0}`. - El proyecto `{0}` no es válido. + El proyecto "{0}" no es válido. @@ -370,7 +370,7 @@ Could not find solution or directory `{0}`. - No se encuentra la solución o el directorio `{0}`. + No se encuentra la solución o el directorio "{0}". @@ -405,7 +405,7 @@ Reference `{0}` is invalid. - La referencia `{0}` no es válida. + La referencia "{0}" no es válida. @@ -415,22 +415,22 @@ Reference `{0}` added to the project. - Se ha agregado la referencia `{0}` al proyecto. + Se ha agregado la referencia "{0}" al proyecto. Project {0} already has a reference `{1}`. - El proyecto {0} ya tiene una referencia `{1}`. + El proyecto {0} ya tiene una referencia "{1}". Package reference `{0}` does not exist. - La referencia de paquete `{0}` no existe. + La referencia de paquete "{0}" no existe. Package reference `{0}` is invalid. - La referencia de paquete `{0}` no es válida. + La referencia de paquete "{0}" no es válida. @@ -440,12 +440,12 @@ Package reference `{0}` added to the project. - Se ha agregado la referencia de paquete `{0}` al proyecto. + Se ha agregado la referencia de paquete "{0}" al proyecto. Project {0} already has a reference `{1}`. - El proyecto {0} ya tiene una referencia `{1}`. + El proyecto {0} ya tiene una referencia "{1}". @@ -455,12 +455,12 @@ Project `{0}` does not exist. - El proyecto `{0}` no existe. + El proyecto "{0}" no existe. Project `{0}` is invalid. - El proyecto `{0}` no es válido. + El proyecto "{0}" no es válido. @@ -470,7 +470,7 @@ Project `{0}` added to the solution. - Se ha agregado el proyecto `{0}` a la solución. + Se ha agregado el proyecto "{0}" a la solución. @@ -485,7 +485,7 @@ Reference `{0}` deleted from the project. - Se ha eliminado la referencia “{0}” del proyecto. + Se ha eliminado la referencia "{0}" del proyecto. @@ -505,12 +505,12 @@ Package reference `{0}` could not be found in the project. - No se encuentra la referencia de paquete `{0}` en el proyecto. + No se encuentra la referencia de paquete "{0}" en el proyecto. Reference `{0}` deleted from the project. - Se ha eliminado la referencia “{0}” del proyecto. + Se ha eliminado la referencia "{0}" del proyecto. @@ -520,7 +520,7 @@ Package reference `{0}` deleted. - Se ha eliminado la referencia de paquete `{0}`. + Se ha eliminado la referencia de paquete "{0}". @@ -530,12 +530,12 @@ Project `{0}` could not be found in the solution. - No se encuentra el proyecto `{0}` en la solución. + No se encuentra el proyecto "{0}" en la solución. Project `{0}` removed from solution. - Se ha quitado el proyecto `{0}` de la solución. + Se ha quitado el proyecto "{0}" de la solución. @@ -545,7 +545,7 @@ Project `{0}` deleted from solution. - Se ha eliminado el proyecto `{0}` de la solución. + Se ha eliminado el proyecto "{0}" de la solución. @@ -585,17 +585,17 @@ Version of package `{0}` updated to `{1}`. - La versión del paquete `{0}` se ha actualizado a `{1}`. + La versión del paquete "{0}" se ha actualizado a "{1}". Version of package `{0}` updated. - Se ha actualizado la versión del paquete `{0}`. + Se ha actualizado la versión del paquete "{0}". Could not update the version of the package `{0}`. - No se puede actualizar la versión del paquete `{0}`. + No se puede actualizar la versión del paquete "{0}". diff --git a/src/dotnet/xlf/LocalizableStrings.ko.xlf b/src/dotnet/xlf/LocalizableStrings.ko.xlf index 9ea49568c..8cd26acff 100644 --- a/src/dotnet/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/xlf/LocalizableStrings.ko.xlf @@ -5,27 +5,27 @@ Could not find any project in `{0}`. - `{0}`에서 프로젝트를 찾을 수 없습니다. + '{0}'에서 프로젝트를 찾을 수 없습니다. Found more than one project in `{0}`. Please specify which one to use. - `{0}`에서 프로젝트를 두 개 이상 찾았습니다. 사용할 파일을 지정하세요. + '{0}'에서 프로젝트를 두 개 이상 찾았습니다. 사용할 파일을 지정하세요. Project already has a reference to `{0}`. - 프로젝트에 이미 `{0}`에 대한 참조가 있습니다. + 프로젝트에 이미 '{0}'에 대한 참조가 있습니다. Project reference `{0}` could not be found. - 프로젝트 참조 `{0}`을(를) 찾을 수 없습니다. + 프로젝트 참조 '{0}'을(를) 찾을 수 없습니다. Project reference `{0}` removed. - 프로젝트 참조 `{0}`이(가) 제거되었습니다. + 프로젝트 참조 '{0}'이(가) 제거되었습니다. @@ -225,7 +225,7 @@ {0} `{1}` found but is invalid. - {0} `{1}`이(가) 있지만 잘못되었습니다. + {0} '{1}'이(가) 있지만 잘못되었습니다. @@ -255,12 +255,12 @@ {0} or {1} not found in `{2}`. - `{2}`에서 '{0}' 또는 {1}을(를) 찾을 수 없습니다. + '{2}'에서 '{0}' 또는 {1}을(를) 찾을 수 없습니다. File `{0}` not found. - `{0}` 파일을 찾을 수 없습니다. + '{0}' 파일을 찾을 수 없습니다. @@ -270,7 +270,7 @@ {0} `{1}` does not exist. - {0} `{1}`이(가) 없습니다. + {0} '{1}'이(가) 없습니다. @@ -285,7 +285,7 @@ {0} already contains {1} `{2}`. - {0}에 {1} `{2}`이(가) 이미 있습니다. + {0}에 {1} '{2}'이(가) 이미 있습니다. @@ -295,7 +295,7 @@ {0} already has {1} `{2}`. - {0}에 {1} `{2}`이(가) 이미 있습니다. + {0}에 {1} '{2}'이(가) 이미 있습니다. @@ -340,7 +340,7 @@ Could not find any project in `{0}`. - `{0}`에서 프로젝트를 찾을 수 없습니다. + '{0}'에서 프로젝트를 찾을 수 없습니다. @@ -350,17 +350,17 @@ Found more than one project in `{0}`. Please specify which one to use. - `{0}`에서 프로젝트를 두 개 이상 찾았습니다. 사용할 파일을 지정하세요. + '{0}'에서 프로젝트를 두 개 이상 찾았습니다. 사용할 파일을 지정하세요. Found a project `{0}` but it is invalid. - `{0}` 프로젝트가 있지만 잘못되었습니다. + '{0}' 프로젝트가 있지만 잘못되었습니다. Invalid project `{0}`. - `{0}` 프로젝트가 잘못되었습니다. + '{0}' 프로젝트가 잘못되었습니다. @@ -370,7 +370,7 @@ Could not find solution or directory `{0}`. - 솔루션 또는 디렉터리 `{0}`을(를) 찾을 수 없습니다. + 솔루션 또는 디렉터리 '{0}'을(를) 찾을 수 없습니다. @@ -385,7 +385,7 @@ Invalid solution `{0}`. - `{0}` 솔루션이 잘못되었습니다. + '{0}' 솔루션이 잘못되었습니다. @@ -405,7 +405,7 @@ Reference `{0}` is invalid. - `{0}` 참조가 잘못되었습니다. + '{0}' 참조가 잘못되었습니다. @@ -415,22 +415,22 @@ Reference `{0}` added to the project. - 프로젝트에 `{0}` 참조가 추가되었습니다. + 프로젝트에 '{0}' 참조가 추가되었습니다. Project {0} already has a reference `{1}`. - {0} 프로젝트에 이미 `{1}` 참조가 있습니다. + {0} 프로젝트에 이미 '{1}' 참조가 있습니다. Package reference `{0}` does not exist. - 패키지 참조 `{0}`이(가) 없습니다. + 패키지 참조 '{0}'이(가) 없습니다. Package reference `{0}` is invalid. - 패키지 참조 `{0}`이(가) 잘못되었습니다. + 패키지 참조 '{0}'이(가) 잘못되었습니다. @@ -440,12 +440,12 @@ Package reference `{0}` added to the project. - 프로젝트에 패키지 참조 `{0}`이(가) 추가되었습니다. + 프로젝트에 패키지 참조 '{0}'이(가) 추가되었습니다. Project {0} already has a reference `{1}`. - {0} 프로젝트에 이미 `{1}` 참조가 있습니다. + {0} 프로젝트에 이미 '{1}' 참조가 있습니다. @@ -455,12 +455,12 @@ Project `{0}` does not exist. - `{0}` 프로젝트가 없습니다. + '{0}' 프로젝트가 없습니다. Project `{0}` is invalid. - `{0}` 프로젝트가 잘못되었습니다. + '{0}' 프로젝트가 잘못되었습니다. @@ -470,7 +470,7 @@ Project `{0}` added to the solution. - `{0}` 프로젝트가 솔루션에 추가되었습니다. + '{0}' 프로젝트가 솔루션에 추가되었습니다. @@ -485,7 +485,7 @@ Reference `{0}` deleted from the project. - `{0}` 참조가 프로젝트에서 삭제되었습니다. + '{0}' 참조가 프로젝트에서 삭제되었습니다. @@ -495,7 +495,7 @@ Reference `{0}` deleted. - `{0}` 참조가 삭제되었습니다. + '{0}' 참조가 삭제되었습니다. @@ -505,12 +505,12 @@ Package reference `{0}` could not be found in the project. - 프로젝트에서 패키지 참조 `{0}`을(를) 찾을 수 없습니다. + 프로젝트에서 패키지 참조 '{0}'을(를) 찾을 수 없습니다. Reference `{0}` deleted from the project. - `{0}` 참조가 프로젝트에서 삭제되었습니다. + '{0}' 참조가 프로젝트에서 삭제되었습니다. @@ -520,7 +520,7 @@ Package reference `{0}` deleted. - 패키지 참조 `{0}`이(가) 삭제되었습니다. + 패키지 참조 '{0}'이(가) 삭제되었습니다. @@ -530,12 +530,12 @@ Project `{0}` could not be found in the solution. - 솔루션에서 `{0}` 프로젝트를 찾을 수 없습니다. + 솔루션에서 '{0}' 프로젝트를 찾을 수 없습니다. Project `{0}` removed from solution. - `{0}` 프로젝트가 솔루션에서 제거되었습니다. + '{0}' 프로젝트가 솔루션에서 제거되었습니다. @@ -545,7 +545,7 @@ Project `{0}` deleted from solution. - `{0}` 프로젝트가 솔루션에서 삭제되었습니다. + '{0}' 프로젝트가 솔루션에서 삭제되었습니다. @@ -585,17 +585,17 @@ Version of package `{0}` updated to `{1}`. - `{0}` 패키지의 버전이 `{1}`(으)로 업데이트되었습니다. + '{0}' 패키지의 버전이 '{1}'(으)로 업데이트되었습니다. Version of package `{0}` updated. - `{0}` 패키지의 버전이 업데이트되었습니다. + '{0}' 패키지의 버전이 업데이트되었습니다. Could not update the version of the package `{0}`. - `{0}` 패키지의 버전을 업데이트할 수 없습니다. + '{0}' 패키지의 버전을 업데이트할 수 없습니다. diff --git a/src/dotnet/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/xlf/LocalizableStrings.pt-BR.xlf index ada5a7d27..6a4311c6a 100644 --- a/src/dotnet/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/xlf/LocalizableStrings.pt-BR.xlf @@ -375,7 +375,7 @@ Found more than one solution file in {0}. Please specify which one to use. - Foi encontrado mais de um arquivo de solução em {0}. Especifique qual usar. + Foi encontrado mais de um arquivo de solução em {0}. Especifique qual deve ser usado. diff --git a/src/dotnet/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/xlf/LocalizableStrings.zh-Hans.xlf index 0add89141..70cc1c504 100644 --- a/src/dotnet/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/xlf/LocalizableStrings.zh-Hans.xlf @@ -375,7 +375,7 @@ Found more than one solution file in {0}. Please specify which one to use. - {0} 中找到多个解决方案文件。请指定使用哪一个。 + 在 {0} 中找到多个解决方案文件。请指定使用哪一个。 diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index 665666da5..c45cd6bdf 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -142,6 +142,14 @@ AssetPath="%(NuPkgContentForMSBuildExtensionsRelativePaths.Identity)" /> + + + + + diff --git a/src/tool_fsharp/tool_fsc.csproj b/src/tool_fsharp/tool_fsc.csproj index d4ab96210..dcd58965a 100644 --- a/src/tool_fsharp/tool_fsc.csproj +++ b/src/tool_fsharp/tool_fsc.csproj @@ -13,6 +13,7 @@ + diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj index 89a201128..bd702ca7c 100644 --- a/src/tool_roslyn/tool_roslyn.csproj +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -16,7 +16,8 @@ - + + diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs index 24ed0a67e..a9a0e904b 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs @@ -233,5 +233,73 @@ namespace Microsoft.DotNet.Configurer.UnitTests _nugetCachePrimerMock.Verify(r => r.PrimeCache(), Times.Once); _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); } + + [Fact] + public void It_prints_the_first_time_use_notice_if_the_cache_sentinel_exists_but_the_first_notice_sentinel_does_not() + { + _nugetCacheSentinelMock.Setup(n => n.Exists()).Returns(true); + _firstTimeUseNoticeSentinelMock.Setup(n => n.Exists()).Returns(false); + + var dotnetFirstTimeUseConfigurer = new DotnetFirstTimeUseConfigurer( + _nugetCachePrimerMock.Object, + _nugetCacheSentinelMock.Object, + _firstTimeUseNoticeSentinelMock.Object, + _environmentProviderMock.Object, + _reporterMock.Object, + CliFallbackFolderPath); + + dotnetFirstTimeUseConfigurer.Configure(); + + _reporterMock.Verify(r => + r.WriteLine(It.Is(str => str == LocalizableStrings.FirstTimeWelcomeMessage))); + _reporterMock.Verify( + r => r.WriteLine(It.Is(str => str == LocalizableStrings.NugetCachePrimeMessage)), + Times.Never); + _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); + } + + [Fact] + public void It_prints_the_unauthorized_notice_if_the_cache_sentinel_reports_Unauthorized() + { + _nugetCacheSentinelMock.Setup(n => n.UnauthorizedAccess).Returns(true); + + var dotnetFirstTimeUseConfigurer = new DotnetFirstTimeUseConfigurer( + _nugetCachePrimerMock.Object, + _nugetCacheSentinelMock.Object, + _firstTimeUseNoticeSentinelMock.Object, + _environmentProviderMock.Object, + _reporterMock.Object, + CliFallbackFolderPath); + + dotnetFirstTimeUseConfigurer.Configure(); + + _reporterMock.Verify(r => + r.WriteLine(It.Is(str => str == LocalizableStrings.FirstTimeWelcomeMessage))); + _reporterMock.Verify(r => + r.WriteLine(It.Is(str => + str == string.Format(LocalizableStrings.UnauthorizedAccessMessage, CliFallbackFolderPath)))); + _reporterMock.Verify( + r => r.WriteLine(It.Is(str => str == LocalizableStrings.NugetCachePrimeMessage)), + Times.Never); + _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); + } + + [Fact] + public void It_does_not_prime_the_cache_if_the_cache_sentinel_reports_Unauthorized() + { + _nugetCacheSentinelMock.Setup(n => n.UnauthorizedAccess).Returns(true); + + var dotnetFirstTimeUseConfigurer = new DotnetFirstTimeUseConfigurer( + _nugetCachePrimerMock.Object, + _nugetCacheSentinelMock.Object, + _firstTimeUseNoticeSentinelMock.Object, + _environmentProviderMock.Object, + _reporterMock.Object, + CliFallbackFolderPath); + + dotnetFirstTimeUseConfigurer.Configure(); + + _nugetCachePrimerMock.Verify(r => r.PrimeCache(), Times.Never); + } } } diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs new file mode 100644 index 000000000..0957b162d --- /dev/null +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs @@ -0,0 +1,175 @@ +// 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 FluentAssertions; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Configurer; +using Microsoft.Extensions.DependencyModel.Tests; +using Microsoft.Extensions.EnvironmentAbstractions; +using Moq; +using Xunit; + +namespace Microsoft.DotNet.Configurer.UnitTests +{ + public class GivenAFirstTimeUseNoticeSentinel + { + private const string DOTNET_USER_PROFILE_FOLDER_PATH = "some path"; + + private FileSystemMockBuilder _fileSystemMockBuilder; + + public GivenAFirstTimeUseNoticeSentinel() + { + _fileSystemMockBuilder = FileSystemMockBuilder.Create(); + } + + [Fact] + public void TheSentinelHasTheCurrentVersionInItsName() + { + FirstTimeUseNoticeSentinel.SENTINEL.Should().Contain($"{Product.Version}"); + } + + [Fact] + public void ItReturnsTrueIfTheSentinelExists() + { + _fileSystemMockBuilder.AddFiles(DOTNET_USER_PROFILE_FOLDER_PATH, FirstTimeUseNoticeSentinel.SENTINEL); + + var fileSystemMock = _fileSystemMockBuilder.Build(); + + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeTrue(); + } + + [Fact] + public void ItReturnsFalseIfTheSentinelDoesNotExist() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeFalse(); + } + + [Fact] + public void ItCreatesTheSentinelInTheDotnetUserProfileFolderPathIfItDoesNotExistAlready() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeFalse(); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + firstTimeUseNoticeSentinel.Exists().Should().BeTrue(); + } + + [Fact] + public void ItDoesNotCreateTheSentinelAgainIfItAlreadyExistsInTheDotnetUserProfileFolderPath() + { + const string contentToValidateSentinalWasNotReplaced = "some string"; + var sentinel = Path.Combine(DOTNET_USER_PROFILE_FOLDER_PATH, FirstTimeUseNoticeSentinel.SENTINEL); + _fileSystemMockBuilder.AddFile(sentinel, contentToValidateSentinalWasNotReplaced); + + var fileSystemMock = _fileSystemMockBuilder.Build(); + + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeTrue(); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + fileSystemMock.File.ReadAllText(sentinel).Should().Be(contentToValidateSentinalWasNotReplaced); + } + + [Fact] + public void ItCreatesTheDotnetUserProfileFolderIfItDoesNotExistAlreadyWhenCreatingTheSentinel() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + var directoryMock = new DirectoryMock(); + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + directoryMock); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + directoryMock.Exists(DOTNET_USER_PROFILE_FOLDER_PATH).Should().BeTrue(); + directoryMock.CreateDirectoryInvoked.Should().BeTrue(); + } + + [Fact] + public void ItDoesNotAttemptToCreateTheDotnetUserProfileFolderIfItAlreadyExistsWhenCreatingTheSentinel() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + var directoryMock = new DirectoryMock(new List { DOTNET_USER_PROFILE_FOLDER_PATH }); + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + directoryMock); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + directoryMock.CreateDirectoryInvoked.Should().BeFalse(); + } + + private class DirectoryMock : IDirectory + { + private IList _directories; + + public bool CreateDirectoryInvoked { get; set; } + + public DirectoryMock(IList directories = null) + { + _directories = directories ?? new List(); + } + + public bool Exists(string path) + { + return _directories.Any(d => d == path); + } + + public ITemporaryDirectory CreateTemporaryDirectory() + { + throw new NotImplementedException(); + } + + public IEnumerable GetFiles(string path, string searchPattern) + { + throw new NotImplementedException(); + } + + public string GetDirectoryFullName(string path) + { + throw new NotImplementedException(); + } + + public void CreateDirectory(string path) + { + _directories.Add(path); + CreateDirectoryInvoked = true; + } + } + } +} \ No newline at end of file diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs new file mode 100644 index 000000000..4dfaf9c9d --- /dev/null +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs @@ -0,0 +1,165 @@ +// 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 FluentAssertions; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Configurer; +using Microsoft.Extensions.DependencyModel.Tests; +using Microsoft.Extensions.EnvironmentAbstractions; +using Moq; +using Xunit; + +namespace Microsoft.DotNet.Configurer.UnitTests +{ + public class GivenAFunctionReturnStringAndFakeFileSystem + { + private const string DOTNET_USER_PROFILE_FOLDER_PATH = "some path"; + + private FileSystemMockBuilder _fileSystemMockBuilder; + private UserLevelCacheWriter _userLevelCacheWriter; + private IFileSystem _fileSystemMock; + + public GivenAFunctionReturnStringAndFakeFileSystem() + { + _fileSystemMockBuilder = FileSystemMockBuilder.Create(); + _fileSystemMock = _fileSystemMockBuilder.Build(); + _userLevelCacheWriter = + new UserLevelCacheWriter( + DOTNET_USER_PROFILE_FOLDER_PATH, + _fileSystemMock.File, + _fileSystemMock.Directory); + } + + [Fact] + public void ItReturnsTheFunctionResult() + { + _userLevelCacheWriter.RunWithCache("fooKey", () => "foo").Should().Be("foo"); + } + + [Fact] + public void ItRunsTheFunctionOnlyOnceWhenInvokeTwice() + { + var counter = new Counter(); + Func func = () => + { + counter.Increase(); + return "foo"; + }; + + _userLevelCacheWriter.RunWithCache("fookey", func).Should().Be("foo"); + _userLevelCacheWriter.RunWithCache("fookey", func).Should().Be("foo"); + counter.Count.Should().Be(1); + } + + [Fact] + public void ItKeepsTheCacheInUserProfileWithCacheKey() + { + _userLevelCacheWriter.RunWithCache("fooKey", () => "foo"); + var path = Path.Combine("some path", $"{Product.Version}_fooKey.dotnetUserLevelCache"); + _fileSystemMock.File.Exists(path); + _fileSystemMock.File.ReadAllText(path).Should().Be("foo"); + } + + [Fact] + public void ItRunsAndReturnsTheValueIfCacheCreationFailed() + { + var mockFile = new Mock(); + + var systemUndertest = + new UserLevelCacheWriter( + DOTNET_USER_PROFILE_FOLDER_PATH, + new NoPermissionFileFake(), + new NoPermissionDirectoryFake()); + + var counter = new Counter(); + Func func = () => + { + counter.Increase(); + return "foo"; + }; + + systemUndertest.RunWithCache("fookey", func).Should().Be("foo"); + systemUndertest.RunWithCache("fookey", func).Should().Be("foo"); + counter.Count.Should().Be(2); + } + + private class NoPermissionFileFake : IFile + { + public bool Exists(string path) + { + return false; + } + + public string ReadAllText(string path) + { + throw new UnauthorizedAccessException(); + } + + public Stream OpenRead(string path) + { + throw new UnauthorizedAccessException(); + } + + public Stream OpenFile( + string path, + FileMode fileMode, + FileAccess fileAccess, + FileShare fileShare, + int bufferSize, + FileOptions fileOptions) + { + throw new NotImplementedException(); + } + + public void CreateEmptyFile(string path) + { + throw new UnauthorizedAccessException(); + } + + public void WriteAllText(string path, string content) + { + throw new UnauthorizedAccessException(); + } + } + + private class NoPermissionDirectoryFake : IDirectory + { + + public ITemporaryDirectory CreateTemporaryDirectory() + { + throw new NotImplementedException(); + } + + public IEnumerable GetFiles(string path, string searchPattern) + { + throw new UnauthorizedAccessException(); + } + + public string GetDirectoryFullName(string path) + { + throw new NotImplementedException(); + } + + public bool Exists(string path) + { + return false; + } + + public void CreateDirectory(string path) + { + throw new UnauthorizedAccessException(); + } + } + + private class Counter + { + public int Count { get; private set; } + public void Increase() { Count++; } + + } + } +} diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCacheSentinel.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCacheSentinel.cs index 97397d79d..23ae45c4a 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCacheSentinel.cs +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCacheSentinel.cs @@ -70,6 +70,18 @@ namespace Microsoft.DotNet.Configurer.UnitTests nugetCacheSentinel.InProgressSentinelAlreadyExists().Should().BeTrue(); } + [Fact] + public void It_returns_false_to_the_in_progress_sentinel_already_exists_when_it_fails_to_get_a_handle_to_it_but_it_failed_because_it_was_unauthorized() + { + var fileMock = new FileMock(); + var directoryMock = new DirectoryMock(); + fileMock.InProgressSentinel = null; + var nugetCacheSentinel = + new NuGetCacheSentinel(NUGET_CACHE_PATH, fileMock, directoryMock); + + nugetCacheSentinel.InProgressSentinelAlreadyExists().Should().BeFalse(); + } + [Fact] public void It_returns_false_to_the_in_progress_sentinel_already_exists_when_it_succeeds_in_getting_a_handle_to_it() { diff --git a/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs index 73cc41a64..97e1db0be 100644 --- a/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs +++ b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs @@ -13,6 +13,8 @@ using Xunit; using Xunit.Abstractions; using System; +[assembly: CollectionBehavior(DisableTestParallelization = true)] + namespace Microsoft.DotNet.Cli.Utils.Tests { public class GivenAnMSBuildSdkResolver : TestBase @@ -106,11 +108,59 @@ namespace Microsoft.DotNet.Cli.Utils.Tests } [Fact] - public void ItReturnsTheVersionIfItIsEqualToTheMinVersion() + public void ItReturnsNullWhenTheDefaultVSRequiredSDKVersionIsHigherThanTheSDKVersionAvailable() + { + var environment = new TestEnvironment(); + var expected = + environment.CreateSdkDirectory(ProgramFiles.X64, "Some.Test.Sdk", "1.0.1"); + environment.CreateMuxerAndAddToPath(ProgramFiles.X64); + + var resolver = environment.CreateResolver(); + var result = (MockResult)resolver.Resolve( + new SdkReference("Some.Test.Sdk", null, "1.0.0"), + new MockContext { ProjectFilePath = environment.TestDirectory.FullName }, + new MockFactory()); + + result.Success.Should().BeFalse(); + result.Path.Should().BeNull(); + result.Version.Should().BeNull(); + result.Warnings.Should().BeNullOrEmpty(); + result.Errors.Should().Contain($"Version 1.0.1 of the .NET Core SDK is smaller than the minimum version" + + " 1.0.4 required by Visual Studio. Check that a recent enough" + + " .NET Core SDK is installed or increase the version specified in global.json."); + } + + [Fact] + public void ItReturnsNullWhenTheTheVSRequiredSDKVersionIsHigherThanTheSDKVersionAvailable() + { + var environment = new TestEnvironment(); + var expected = + environment.CreateSdkDirectory(ProgramFiles.X64, "Some.Test.Sdk", "1.0.1"); + environment.CreateMuxerAndAddToPath(ProgramFiles.X64); + environment.CreateMinimumVSDefinedSDKVersionFile("2.0.0"); + + var resolver = environment.CreateResolver(); + var result = (MockResult)resolver.Resolve( + new SdkReference("Some.Test.Sdk", null, "1.0.0"), + new MockContext { ProjectFilePath = environment.TestDirectory.FullName }, + new MockFactory()); + + result.Success.Should().BeFalse(); + result.Path.Should().BeNull(); + result.Version.Should().BeNull(); + result.Warnings.Should().BeNullOrEmpty(); + result.Errors.Should().Contain($"Version 1.0.1 of the .NET Core SDK is smaller than the minimum version" + + " 2.0.0 required by Visual Studio. Check that a recent enough" + + " .NET Core SDK is installed or increase the version specified in global.json."); + } + + [Fact] + public void ItReturnsTheVersionIfItIsEqualToTheMinVersionAndTheVSDefinedMinVersion() { var environment = new TestEnvironment(); var expected = environment.CreateSdkDirectory(ProgramFiles.X64, "Some.Test.Sdk", "99.99.99"); environment.CreateMuxerAndAddToPath(ProgramFiles.X64); + environment.CreateMinimumVSDefinedSDKVersionFile("99.99.99"); var resolver = environment.CreateResolver(); var result = (MockResult)resolver.Resolve( @@ -126,11 +176,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests } [Fact] - public void ItReturnsTheVersionIfItIsHigherThanTheMinVersion() + public void ItReturnsTheVersionIfItIsHigherThanTheMinVersionAndTheVSDefinedMinVersion() { var environment = new TestEnvironment(); var expected = environment.CreateSdkDirectory(ProgramFiles.X64, "Some.Test.Sdk", "999.99.99"); environment.CreateMuxerAndAddToPath(ProgramFiles.X64); + environment.CreateMinimumVSDefinedSDKVersionFile("999.99.98"); var resolver = environment.CreateResolver(); var result = (MockResult)resolver.Resolve( @@ -167,6 +218,8 @@ namespace Microsoft.DotNet.Cli.Utils.Tests identifier: identifier, callingMethod: callingMethod); + DeleteMinimumVSDefinedSDKVersionFile(); + PathEnvironmentVariable = string.Empty; } @@ -248,6 +301,22 @@ namespace Microsoft.DotNet.Cli.Utils.Tests return null; } } + + public void CreateMinimumVSDefinedSDKVersionFile(string version) + { + File.WriteAllText(GetMinimumVSDefinedSDKVersionFilePath(), version); + } + + private void DeleteMinimumVSDefinedSDKVersionFile() + { + File.Delete(GetMinimumVSDefinedSDKVersionFilePath()); + } + + private string GetMinimumVSDefinedSDKVersionFilePath() + { + string baseDirectory = AppContext.BaseDirectory; + return Path.Combine(baseDirectory, "minimumVSDefinedSDKVersion"); + } } private sealed class MockContext : SdkResolverContext diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs index e2e1269a6..b377b4331 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -23,6 +24,15 @@ namespace Microsoft.DotNet.Tools.Test.Utilities private TempRoot _temp; private static TestAssets s_testAssets; + static TestBase() + { + // set culture of test process to match CLI sub-processes when the UI language is overriden. + string overriddenUILanguage = Environment.GetEnvironmentVariable("DOTNET_CLI_UI_LANGUAGE"); + if (overriddenUILanguage != null) + { + CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(overriddenUILanguage); + } + } protected static string RepoRoot { diff --git a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs index 42545e31c..bbe339071 100644 --- a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs +++ b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs @@ -15,9 +15,7 @@ namespace Microsoft.DotNet.Cli.Add.Reference.Tests { public class GivenDotnetAddReference : TestBase { - private const string HelpText = @".NET Add Project to Project reference Command - -Usage: dotnet add reference [options] + private const string HelpText = @"Usage: dotnet add reference [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -28,9 +26,7 @@ Options: -f, --framework Add reference only when targeting a specific framework "; - private const string AddCommandHelpText = @".NET Add Command - -Usage: dotnet add [options] [command] + private const string AddCommandHelpText = @"Usage: dotnet add [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -129,8 +125,8 @@ Commands: .WithProject("one two three") .Execute("proj.csproj"); cmd.ExitCode.Should().NotBe(0); - cmd.StdErr.Should().BeVisuallyEquivalentTo( - "Unrecognized command or argument 'two'\r\nUnrecognized command or argument 'three'"); + cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "two")} +{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "three")}"); } [Theory] diff --git a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index d6dc5a530..febd7a9b3 100644 --- a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -82,7 +82,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests .WithWorkingDirectory(testInstance.Root) .ExecuteWithCapturedOutput("--no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index 700367832..29c00b2fb 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -16,7 +16,7 @@ namespace Microsoft.DotNet.Help.Tests { private const string HelpText = @"Usage: dotnet [runtime-options] [path-to-application] -Usage: dotnet [command] [arguments] [command-options] +Usage: dotnet [sdk-options] [command] [arguments] [command-options] path-to-application: The path to an application .dll file to execute. @@ -38,9 +38,6 @@ SDK commands: nuget Provides additional NuGet commands. msbuild Runs Microsoft Build Engine (MSBuild). vstest Runs Microsoft Test Execution Command Line Tool. - -v|--version Display .NET Core SDK version. - -i|--info Display .NET Core information. - -d|--diagnostics Enable diagnostic output. Common options: -v|--verbosity Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. @@ -48,10 +45,13 @@ Common options: Run 'dotnet COMMAND --help' for more information on a command. +sdk-options: + --version Display .NET Core SDK version. + --info Display .NET Core information. + -d|--diagnostics Enable diagnostic output. + runtime-options: --additionalprobingpath Path containing probing policy and assemblies to probe for. - --depsfile Path to .deps.json file. - --runtimeconfig Path to .runtimeconfig.json file. --fx-version Version of the installed Shared Framework to use to run the application. --roll-forward-on-no-candidate-fx Roll forward on no candidate shared framework is enabled. --additional-deps Path to additonal deps.json file."; diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs index ab13b7f9c..7561f1b3e 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs @@ -11,9 +11,7 @@ namespace Microsoft.DotNet.Help.Tests public class GivenThatIWantToShowHelpForDotnetHelpCommand : TestBase { private const string HelpText = -@".NET CLI help utility - -Usage: dotnet help [options] +@"Usage: dotnet help [options] Arguments: CLI command for which to view more detailed help. diff --git a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs index 7d55ff688..12766e983 100644 --- a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs +++ b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.List.Reference.Tests { public class GivenDotnetListReference : TestBase { - private const string HelpText = @".NET Core Project-to-Project dependency viewer - -Usage: dotnet list reference [options] + private const string HelpText = @"Usage: dotnet list reference [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -25,9 +23,7 @@ Options: -h, --help Show help information. "; - private const string ListCommandHelpText = @".NET List Command - -Usage: dotnet list [options] [command] + private const string ListCommandHelpText = @"Usage: dotnet list [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -73,8 +69,8 @@ Commands: .WithProject("one two three") .Execute("proj.csproj"); cmd.ExitCode.Should().NotBe(0); - cmd.StdErr.Should().BeVisuallyEquivalentTo( - "Unrecognized command or argument 'two'\r\nUnrecognized command or argument 'three'"); + cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "two")} +{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "three")}"); } [Theory] diff --git a/test/dotnet-msbuild.Tests/GivenDotnetMSBuildBuildsProjects.cs b/test/dotnet-msbuild.Tests/GivenDotnetMSBuildBuildsProjects.cs index e05eead68..52d776505 100644 --- a/test/dotnet-msbuild.Tests/GivenDotnetMSBuildBuildsProjects.cs +++ b/test/dotnet-msbuild.Tests/GivenDotnetMSBuildBuildsProjects.cs @@ -18,6 +18,7 @@ using MSBuildCommand = Microsoft.DotNet.Tools.Test.Utilities.MSBuildCommand; using System.Diagnostics; using System.Threading; + // There are tests which modify static Telemetry.CurrentSessionId and they cannot run in parallel [assembly: CollectionBehavior(DisableTestParallelization = true)] @@ -129,7 +130,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests [Fact] public void WhenTelemetryIsEnabledTheLoggerIsAddedToTheCommandLine() { - Telemetry telemetry; + Telemetry.Telemetry telemetry; string[] allArgs = GetArgsForMSBuild(() => true, out telemetry); // telemetry will still be disabled if environment variable is set if (telemetry.Enabled) @@ -156,14 +157,15 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests private string[] GetArgsForMSBuild(Func sentinelExists) { - Telemetry telemetry; + Telemetry.Telemetry telemetry; return GetArgsForMSBuild(sentinelExists, out telemetry); } - private string[] GetArgsForMSBuild(Func sentinelExists, out Telemetry telemetry) + private string[] GetArgsForMSBuild(Func sentinelExists, out Telemetry.Telemetry telemetry) { - Telemetry.CurrentSessionId = null; // reset static session id modified by telemetry constructor - telemetry = new Telemetry(new MockNuGetCacheSentinel(sentinelExists)); + + Telemetry.Telemetry.CurrentSessionId = null; // reset static session id modified by telemetry constructor + telemetry = new Telemetry.Telemetry(new MockNuGetCacheSentinel(sentinelExists)); MSBuildForwardingApp msBuildForwardingApp = new MSBuildForwardingApp(Enumerable.Empty()); diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index 34d706979..96bb47c51 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -31,6 +31,10 @@ namespace Microsoft.DotNet.New.Tests [InlineData("F#", "mstest", false, false)] [InlineData("F#", "xunit", false, false)] [InlineData("F#", "mvc", true, false)] + [InlineData("VB", "console", false, false)] + [InlineData("VB", "classlib", false, false)] + [InlineData("VB", "mstest", false, false)] + [InlineData("VB", "xunit", false, false)] public void TemplateRestoresAndBuildsWithoutWarnings( string language, string projectType, @@ -38,9 +42,10 @@ namespace Microsoft.DotNet.New.Tests bool skipSpaWebpackSteps) { string rootPath = TestAssets.CreateTestDirectory(identifier: $"{language}_{projectType}").FullName; + string noRestoreDirective = "--no-restore"; new TestCommand("dotnet") { WorkingDirectory = rootPath } - .Execute($"new {projectType} -lang {language} -o {rootPath} --debug:ephemeral-hive --no-restore") + .Execute($"new {projectType} -lang {language} -o {rootPath} --debug:ephemeral-hive {noRestoreDirective}") .Should().Pass(); if (useNuGetConfigForAspNet) diff --git a/test/dotnet-new.Tests/NewCommandTests.cs b/test/dotnet-new.Tests/NewCommandTests.cs index 45eccf5c7..e22cb821c 100644 --- a/test/dotnet-new.Tests/NewCommandTests.cs +++ b/test/dotnet-new.Tests/NewCommandTests.cs @@ -7,7 +7,7 @@ using Xunit; namespace Microsoft.DotNet.New.Tests { - public class NewCommandTests + public class NewCommandTests : TestBase { [Fact] public void WhenSwitchIsSkippedThenItPrintsError() @@ -16,7 +16,10 @@ namespace Microsoft.DotNet.New.Tests cmd.ExitCode.Should().NotBe(0); - cmd.StdErr.Should().StartWith("No templates matched the input template name: Web1.1."); + if (!DotnetUnderTest.IsLocalized()) + { + cmd.StdErr.Should().StartWith("No templates matched the input template name: Web1.1."); + } } [Fact] @@ -26,7 +29,10 @@ namespace Microsoft.DotNet.New.Tests cmd.ExitCode.Should().NotBe(0); - cmd.StdErr.Should().StartWith("Unable to determine the desired template from the input template name: c."); + if (!DotnetUnderTest.IsLocalized()) + { + cmd.StdErr.Should().StartWith("Unable to determine the desired template from the input template name: c."); + } } } } diff --git a/test/dotnet-pack.Tests/PackTests.cs b/test/dotnet-pack.Tests/PackTests.cs index cceb09ec1..32b940a45 100644 --- a/test/dotnet-pack.Tests/PackTests.cs +++ b/test/dotnet-pack.Tests/PackTests.cs @@ -197,7 +197,7 @@ namespace Microsoft.DotNet.Tools.Pack.Tests .WithWorkingDirectory(testInstance.Root) .ExecuteWithCapturedOutput("--no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index ddad9808c..2db2018fa 100644 --- a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -92,7 +92,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput("--framework netcoreapp2.0 --no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs b/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs index 43dd1af98..0ff55170f 100644 --- a/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs +++ b/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs @@ -12,9 +12,7 @@ namespace Microsoft.DotNet.Cli.Remove.Package.Tests { public class GivenDotnetRemovePackage : TestBase { - private const string HelpText = @".NET Remove Package reference Command. - -Usage: dotnet remove package [options] + private const string HelpText = @"Usage: dotnet remove package [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -24,9 +22,7 @@ Options: -h, --help Show help information. "; - private const string RemoveCommandHelpText = @".NET Remove Command - -Usage: dotnet remove [options] [command] + private const string RemoveCommandHelpText = @"Usage: dotnet remove [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. diff --git a/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs b/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs index 0a61664fc..65da417b2 100644 --- a/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs +++ b/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Remove.Reference.Tests { public class GivenDotnetRemoveReference : TestBase { - private const string HelpText = @".NET Remove Project to Project reference Command - -Usage: dotnet remove reference [options] + private const string HelpText = @"Usage: dotnet remove reference [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -27,9 +25,7 @@ Options: -f, --framework Remove reference only when targeting a specific framework "; - private const string RemoveCommandHelpText = @".NET Remove Command - -Usage: dotnet remove [options] [command] + private const string RemoveCommandHelpText = @"Usage: dotnet remove [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -155,7 +151,8 @@ Commands: .WithProject("one two three") .Execute("proj.csproj"); cmd.ExitCode.Should().NotBe(0); - cmd.StdErr.Should().BeVisuallyEquivalentTo("Unrecognized command or argument 'two'\r\nUnrecognized command or argument 'three'"); + cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "two")} +{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "three")}"); } [Theory] diff --git a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs index 88cc49dcf..5fa67328e 100644 --- a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs +++ b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs @@ -7,6 +7,8 @@ using Microsoft.DotNet.TestFramework; using Microsoft.DotNet.Tools.Test.Utilities; using Xunit; +using LocalizableStrings = Microsoft.DotNet.Tools.Run.LocalizableStrings; + namespace Microsoft.DotNet.Cli.Run.Tests { public class GivenDotnetRunBuildsCsproj : TestBase @@ -87,7 +89,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput("--no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] @@ -280,7 +282,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests .ExecuteWithCapturedOutput("--launch-profile test") .Should().Pass() .And.HaveStdOutContaining("Hello World!") - .And.HaveStdErrContaining("The specified launch profile could not be located."); + .And.HaveStdErrContaining(LocalizableStrings.RunCommandExceptionCouldNotLocateALaunchSettingsFile); } [Fact] @@ -368,7 +370,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests .ExecuteWithCapturedOutput("--launch-profile Third") .Should().Pass() .And.HaveStdOutContaining("(NO MESSAGE)") - .And.HaveStdErrContaining("The launch profile \"Third\" could not be applied."); + .And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, "Third", "").Trim()); } [Fact] @@ -396,7 +398,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests .ExecuteWithCapturedOutput("--launch-profile \"IIS Express\"") .Should().Pass() .And.HaveStdOutContaining("(NO MESSAGE)") - .And.HaveStdErrContaining("The launch profile \"IIS Express\" could not be applied."); + .And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, "IIS Express", "").Trim()); } [Fact] @@ -485,7 +487,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests cmd.Should().Pass() .And.HaveStdOutContaining("(NO MESSAGE)") - .And.HaveStdErrContaining("The launch profile \"(Default)\" could not be applied."); + .And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, LocalizableStrings.DefaultLaunchProfileDisplayName, "").Trim()); } [Fact] @@ -514,7 +516,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests cmd.Should().Pass() .And.HaveStdOutContaining("(NO MESSAGE)") - .And.HaveStdErrContaining("The launch profile \"(Default)\" could not be applied."); + .And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, LocalizableStrings.DefaultLaunchProfileDisplayName, "").Trim()); } } } diff --git a/test/dotnet-run.Tests/GivenThatWeCanPassNonProjectFilesToDotnetRun.cs b/test/dotnet-run.Tests/GivenThatWeCanPassNonProjectFilesToDotnetRun.cs new file mode 100644 index 000000000..fafb147be --- /dev/null +++ b/test/dotnet-run.Tests/GivenThatWeCanPassNonProjectFilesToDotnetRun.cs @@ -0,0 +1,35 @@ +// 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; +using FluentAssertions; +using Microsoft.DotNet.TestFramework; +using Microsoft.DotNet.Tools.Test.Utilities; +using Xunit; + +namespace Microsoft.DotNet.Cli.Run.Tests +{ + public class GivenThatWeCanPassNonProjectFilesToDotnetRun : TestBase + { + [Fact] + public void ItFailsWithAnAppropriateErrorMessage() + { + var projectDirectory = TestAssets + .Get("SlnFileWithNoProjectReferences") + .CreateInstance() + .WithSourceFiles() + .Root + .FullName; + + var slnFullPath = Path.Combine(projectDirectory, "SlnFileWithNoProjectReferences.sln"); + + new RunCommand() + .ExecuteWithCapturedOutput($"-p {slnFullPath}") + .Should().Fail() + .And.HaveStdErrContaining( + string.Format( + Microsoft.DotNet.Tools.Run.LocalizableStrings.RunCommandSpecifiecFileIsNotAValidProject, + slnFullPath)); + } + } +} \ No newline at end of file diff --git a/test/dotnet-run.Tests/dotnet-run.Tests.csproj b/test/dotnet-run.Tests/dotnet-run.Tests.csproj index e552a93fc..e1b7fbe50 100644 --- a/test/dotnet-run.Tests/dotnet-run.Tests.csproj +++ b/test/dotnet-run.Tests/dotnet-run.Tests.csproj @@ -6,11 +6,15 @@ $(CLI_SharedFrameworkVersion) true dotnet-run.Tests + ../../tools/Key.snk + true + true $(AssetTargetFallback);dotnet5.4;portable-net451+win8 + diff --git a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs index af2678e06..3d245115f 100644 --- a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs +++ b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs @@ -16,9 +16,7 @@ namespace Microsoft.DotNet.Cli.Sln.Add.Tests { public class GivenDotnetSlnAdd : TestBase { - private string HelpText = @".NET Add project(s) to a solution file Command - -Usage: dotnet sln add [options] + private string HelpText = @"Usage: dotnet sln add [options] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -28,9 +26,7 @@ Options: -h, --help Show help information. "; - private const string SlnCommandHelpText = @".NET modify solution file command - -Usage: dotnet sln [options] [command] + private const string SlnCommandHelpText = @"Usage: dotnet sln [options] [command] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -220,7 +216,9 @@ EndGlobal var cmd = new DotnetCommand() .ExecuteWithCapturedOutput("sln one.sln two.sln three.sln add"); cmd.Should().Fail(); - cmd.StdErr.Should().BeVisuallyEquivalentTo($"Unrecognized command or argument 'two.sln'\r\nUnrecognized command or argument 'three.sln'\r\n{CommonLocalizableStrings.SpecifyAtLeastOneProjectToAdd}"); + cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "two.sln")} +{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "three.sln")} +{CommonLocalizableStrings.SpecifyAtLeastOneProjectToAdd}"); } [Theory] diff --git a/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs b/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs index e0800974d..fdc2d9a55 100644 --- a/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs +++ b/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Sln.List.Tests { public class GivenDotnetSlnList : TestBase { - private const string HelpText = @".NET List project(s) in a solution file Command - -Usage: dotnet sln list [options] + private const string HelpText = @"Usage: dotnet sln list [options] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -25,9 +23,7 @@ Options: -h, --help Show help information. "; - private const string SlnCommandHelpText = @".NET modify solution file command - -Usage: dotnet sln [options] [command] + private const string SlnCommandHelpText = @"Usage: dotnet sln [options] [command] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -70,7 +66,8 @@ Commands: var cmd = new DotnetCommand() .ExecuteWithCapturedOutput("sln one.sln two.sln three.sln list"); cmd.Should().Fail(); - cmd.StdErr.Should().BeVisuallyEquivalentTo("Unrecognized command or argument 'two.sln'\r\nUnrecognized command or argument 'three.sln'"); + cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "two.sln")} +{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "three.sln")}"); } [Theory] diff --git a/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs b/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs index f0d190fbb..78f64b25f 100644 --- a/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs +++ b/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Sln.Remove.Tests { public class GivenDotnetSlnRemove : TestBase { - private const string HelpText = @".NET Remove project(s) from a solution file Command - -Usage: dotnet sln remove [options] + private const string HelpText = @"Usage: dotnet sln remove [options] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -26,9 +24,7 @@ Options: -h, --help Show help information. "; - private const string SlnCommandHelpText = @".NET modify solution file command - -Usage: dotnet sln [options] [command] + private const string SlnCommandHelpText = @"Usage: dotnet sln [options] [command] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -192,7 +188,9 @@ EndGlobal var cmd = new DotnetCommand() .ExecuteWithCapturedOutput("sln one.sln two.sln three.sln remove"); cmd.Should().Fail(); - cmd.StdErr.Should().BeVisuallyEquivalentTo($"Unrecognized command or argument 'two.sln'\r\nUnrecognized command or argument 'three.sln'\r\n{CommonLocalizableStrings.SpecifyAtLeastOneProjectToRemove}"); + cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "two.sln")} +{string.Format(CommandLine.LocalizableStrings.UnrecognizedCommandOrArgument, "three.sln")} +{CommonLocalizableStrings.SpecifyAtLeastOneProjectToRemove}"); } [Theory] diff --git a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs index 8345159fe..807688463 100644 --- a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs +++ b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet.Tests/FakeRecordEventNameTelemetry.cs b/test/dotnet.Tests/FakeRecordEventNameTelemetry.cs new file mode 100644 index 000000000..4690ef771 --- /dev/null +++ b/test/dotnet.Tests/FakeRecordEventNameTelemetry.cs @@ -0,0 +1,39 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Concurrent; +using System.Collections.Generic; +using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Cli.Telemetry; + +namespace Microsoft.DotNet.Tests +{ + public class FakeRecordEventNameTelemetry : ITelemetry + { + public bool Enabled { get; set; } + + public string EventName { get; set; } + + public void TrackEvent(string eventName, + IDictionary properties, + IDictionary measurements) + { + LogEntries.Add( + new LogEntry + { + EventName = eventName, + Measurement = measurements, + Properties = properties + }); + } + + public ConcurrentBag LogEntries { get; set; } = new ConcurrentBag(); + + public class LogEntry + { + public string EventName { get; set; } + public IDictionary Properties { get; set; } + public IDictionary Measurement { get; set; } + } + } +} diff --git a/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs b/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs index 026053261..4fd1fb660 100644 --- a/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs +++ b/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs @@ -20,15 +20,17 @@ namespace Microsoft.DotNet.Tests private static CommandResult _firstDotnetNonVerbUseCommandResult; private static CommandResult _firstDotnetVerbUseCommandResult; private static DirectoryInfo _nugetFallbackFolder; + private static DirectoryInfo _dotDotnetFolder; + private static string _testDirectory; static GivenThatTheUserIsRunningDotNetForTheFirstTime() { - var testDirectory = TestAssets.CreateTestDirectory("Dotnet_first_time_experience_tests"); - var testNuGetHome = Path.Combine(testDirectory.FullName, "nuget_home"); + _testDirectory = TestAssets.CreateTestDirectory("Dotnet_first_time_experience_tests").FullName; + var testNuGetHome = Path.Combine(_testDirectory, "nuget_home"); var cliTestFallbackFolder = Path.Combine(testNuGetHome, ".dotnet", "NuGetFallbackFolder"); var command = new DotnetCommand() - .WithWorkingDirectory(testDirectory); + .WithWorkingDirectory(_testDirectory); command.Environment["HOME"] = testNuGetHome; command.Environment["USERPROFILE"] = testNuGetHome; command.Environment["APPDATA"] = testNuGetHome; @@ -40,6 +42,7 @@ namespace Microsoft.DotNet.Tests _firstDotnetVerbUseCommandResult = command.ExecuteWithCapturedOutput("new --debug:ephemeral-hive"); _nugetFallbackFolder = new DirectoryInfo(cliTestFallbackFolder); + _dotDotnetFolder = new DirectoryInfo(Path.Combine(testNuGetHome, ".dotnet")); } [Fact] @@ -77,6 +80,61 @@ namespace Microsoft.DotNet.Tests .HaveFile($"{GetDotnetVersion()}.dotnetSentinel"); } + [Fact] + public void ItCreatesAFirstUseSentinelFileUnderTheDotDotNetFolder() + { + _dotDotnetFolder + .Should() + .HaveFile($"{GetDotnetVersion()}.dotnetFirstUseSentinel"); + } + + [Fact] + public void ItDoesNotCreateAFirstUseSentinelFileUnderTheDotDotNetFolderWhenInternalReportInstallSuccessIsInvoked() + { + var emptyHome = Path.Combine(_testDirectory, "empty_home"); + + var command = new DotnetCommand() + .WithWorkingDirectory(_testDirectory); + command.Environment["HOME"] = emptyHome; + command.Environment["USERPROFILE"] = emptyHome; + command.Environment["APPDATA"] = emptyHome; + command.Environment["DOTNET_CLI_TEST_FALLBACKFOLDER"] = _nugetFallbackFolder.FullName; + command.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = ""; + // Disable to prevent the creation of the .dotnet folder by optimizationdata. + command.Environment["DOTNET_DISABLE_MULTICOREJIT"] = "true"; + command.Environment["SkipInvalidConfigurations"] = "true"; + + command.ExecuteWithCapturedOutput("internal-reportinstallsuccess test").Should().Pass(); + + var homeFolder = new DirectoryInfo(Path.Combine(emptyHome, ".dotnet")); + string[] fileEntries = Directory.GetFiles(homeFolder.ToString()); + fileEntries.Should().OnlyContain(x => !x.Contains(".dotnetFirstUseSentinel")); + } + + [Fact] + public void ItShowsTheTelemetryNoticeWhenInvokingACommandAfterInternalReportInstallSuccessHasBeenInvoked() + { + var newHome = Path.Combine(_testDirectory, "new_home"); + var newHomeFolder = new DirectoryInfo(Path.Combine(newHome, ".dotnet")); + + var command = new DotnetCommand() + .WithWorkingDirectory(_testDirectory); + command.Environment["HOME"] = newHome; + command.Environment["USERPROFILE"] = newHome; + command.Environment["APPDATA"] = newHome; + command.Environment["DOTNET_CLI_TEST_FALLBACKFOLDER"] = _nugetFallbackFolder.FullName; + command.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = ""; + command.Environment["SkipInvalidConfigurations"] = "true"; + + command.ExecuteWithCapturedOutput("internal-reportinstallsuccess test").Should().Pass(); + + var result = command.ExecuteWithCapturedOutput("new --debug:ephemeral-hive"); + + result.StdOut + .Should() + .ContainVisuallySameFragment(Configurer.LocalizableStrings.FirstTimeWelcomeMessage); + } + [Fact] public void ItRestoresTheNuGetPackagesToTheNuGetCacheFolder() { diff --git a/test/dotnet.Tests/ParserTests/AddReferenceParserTests.cs b/test/dotnet.Tests/ParserTests/AddReferenceParserTests.cs index 2aa5beec8..b1684d4cf 100644 --- a/test/dotnet.Tests/ParserTests/AddReferenceParserTests.cs +++ b/test/dotnet.Tests/ParserTests/AddReferenceParserTests.cs @@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Tests.ParserTests .Errors .Select(e => e.Message) .Should() - .BeEquivalentTo("Required argument missing for command: reference"); + .BeEquivalentTo(string.Format(LocalizableStrings.RequiredArgumentMissingForCommand, "reference")); } } } \ No newline at end of file diff --git a/test/dotnet.Tests/ParserTests/ValdidationMessageTests.cs b/test/dotnet.Tests/ParserTests/ValdidationMessageTests.cs new file mode 100644 index 000000000..41d184d6a --- /dev/null +++ b/test/dotnet.Tests/ParserTests/ValdidationMessageTests.cs @@ -0,0 +1,71 @@ +// 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 FluentAssertions; +using Microsoft.DotNet.Cli.CommandLine; +using Microsoft.DotNet.Tools.Test.Utilities; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.Tests.ParserTests +{ + public class ValidationMessageTests + { + [Fact] + public void ValidationMessagesFormatCorrectly() + { + // Since not all validation messages that we provided to the command-line parser are triggered by our + // tests (and some may not be possible to trigger with our current usage), unit test that we can + // obtain validation messages through the same interface as the command-line parser. + // + // In English configuration, we check that the messages are exactly what we expect and otherwise we at + // lest ensure that we don't get a FormatException. + + IValidationMessages m = new CommandLineValidationMessages(); + + m.CommandAcceptsOnlyOneArgument("xyz", 3) + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Command 'xyz' only accepts a single argument but 3 were provided."); + + m.CommandAcceptsOnlyOneSubcommand("zyx", "a;b;c") + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Command 'zyx' only accepts a single subcommand but multiple were provided: a;b;c"); + + m.FileDoesNotExist("abc.def") + .Should().BeVisuallyEquivalentToIfNotLocalized( + "File does not exist: abc.def"); + + m.NoArgumentsAllowed("zzz") + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Arguments not allowed for option: zzz"); + + m.OptionAcceptsOnlyOneArgument("qqq", 4) + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Option 'qqq' only accepts a single argument but 4 were provided."); + + m.RequiredArgumentMissingForCommand("www") + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Required argument missing for command: www"); + + m.RequiredArgumentMissingForOption("rrr") + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Required argument missing for option: rrr"); + + m.RequiredCommandWasNotProvided() + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Required command was not provided."); + + m.UnrecognizedArgument("apple", new[] { "banana", "orange" }) + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Argument 'apple' not recognized. Must be one of: \n\t'banana'\n\t\'orange'"); + + m.UnrecognizedCommandOrArgument("ppp") + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Unrecognized command or argument 'ppp'"); + + m.UnrecognizedOption("apple", new[] { "banana", "orange" }) + .Should().BeVisuallyEquivalentToIfNotLocalized( + "Option 'apple' not recognized. Must be one of: \n\t'banana'\n\t\'orange'"); + } + } +} \ No newline at end of file diff --git a/test/dotnet.Tests/TelemetryCommandTest.cs b/test/dotnet.Tests/TelemetryCommandTest.cs index cb4a943c2..356667009 100644 --- a/test/dotnet.Tests/TelemetryCommandTest.cs +++ b/test/dotnet.Tests/TelemetryCommandTest.cs @@ -1,39 +1,235 @@ // 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.Collections.Generic; -using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Cli; -using Microsoft.DotNet.Tools.Test.Utilities; -using Xunit; using FluentAssertions; +using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Cli.Telemetry; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Tools.Test.Utilities; +using System.Collections.Generic; +using Xunit; namespace Microsoft.DotNet.Tests { - public class MockTelemetry : ITelemetry - { - public bool Enabled { get; set; } - - public string EventName { get; set; } - - public void TrackEvent(string eventName, IDictionary properties, IDictionary measurements) - { - EventName = eventName; - } - } - - public class TelemetryCommandTests : TestBase { - [Fact] - public void TestProjectDependencyIsNotAvailableThroughDriver() + private readonly FakeRecordEventNameTelemetry _fakeTelemetry; + + public string EventName { get; set; } + public IDictionary Properties { get; set; } + public TelemetryCommandTests() { - MockTelemetry mockTelemetry = new MockTelemetry(); - string[] args = { "help" }; - Microsoft.DotNet.Cli.Program.ProcessArgs(args, mockTelemetry); - Assert.Equal(mockTelemetry.EventName, args[0]); + _fakeTelemetry = new FakeRecordEventNameTelemetry(); + TelemetryEventEntry.Subscribe(_fakeTelemetry.TrackEvent); + TelemetryEventEntry.TelemetryFilter = new TelemetryFilter(); + } + + [Fact] + public void TopLevelCommandNameShouldBeSentToTelemetry() + { + string[] args = {"help"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry.LogEntries.Should().Contain(e => e.EventName == args[0]); + } + + [Fact] + public void DotnetNewCommandFirstArgumentShouldBeSentToTelemetry() + { + const string argumentToSend = "console"; + string[] args = {"new", argumentToSend}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-new" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetHelpCommandFirstArgumentShouldBeSentToTelemetry() + { + const string argumentToSend = "something"; + string[] args = {"help", argumentToSend}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-help" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetAddCommandFirstArgumentShouldBeSentToTelemetry() + { + const string argumentToSend = "package"; + string[] args = {"add", argumentToSend, "aPackageName"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-add" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetAddCommandFirstArgumentShouldBeSentToTelemetry2() + { + const string argumentToSend = "reference"; + string[] args = {"add", argumentToSend, "aPackageName"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-add" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetRemoveCommandFirstArgumentShouldBeSentToTelemetry() + { + const string argumentToSend = "package"; + string[] args = {"remove", argumentToSend, "aPackageName"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-remove" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetListCommandFirstArgumentShouldBeSentToTelemetry() + { + const string argumentToSend = "reference"; + string[] args = {"list", argumentToSend, "aPackageName"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-list" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetSlnCommandFirstArgumentShouldBeSentToTelemetry() + { + const string argumentToSend = "list"; + string[] args = {"sln", "aSolution", argumentToSend}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-sln" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetNugetCommandFirstArgumentShouldBeSentToTelemetry() + { + const string argumentToSend = "push"; + string[] args = {"nuget", argumentToSend, "aRoot"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-nuget" && e.Properties.ContainsKey("argument") && + e.Properties["argument"] == argumentToSend); + } + + [Fact] + public void DotnetNewCommandLanguageOpinionShouldBeSentToTelemetry() + { + const string optionKey = "language"; + const string optionValueToSend = "c#"; + string[] args = {"new", "console", "--" + optionKey, optionValueToSend}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-new" && e.Properties.ContainsKey(optionKey) && + e.Properties[optionKey] == optionValueToSend); + } + + [Fact] + public void AnyDotnetCommandVerbosityOpinionShouldBeSentToTelemetry() + { + const string optionKey = "verbosity"; + const string optionValueToSend = "minimal"; + string[] args = {"restore", "--" + optionKey, optionValueToSend}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-restore" && e.Properties.ContainsKey(optionKey) && + e.Properties[optionKey] == optionValueToSend); + } + + [Fact] + public void DotnetBuildAndPublishCommandOpinionsShouldBeSentToTelemetry() + { + const string optionKey = "configuration"; + const string optionValueToSend = "Debug"; + string[] args = {"build", "--" + optionKey, optionValueToSend}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-build" && e.Properties.ContainsKey(optionKey) && + e.Properties[optionKey] == optionValueToSend); + } + + [Fact] + public void DotnetPublishCommandRuntimeOpinionsShouldBeSentToTelemetry() + { + const string optionKey = "runtime"; + const string optionValueToSend = "win10-x64"; + string[] args = { "publish", "--" + optionKey, optionValueToSend }; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-publish" && e.Properties.ContainsKey(optionKey) && + e.Properties[optionKey] == optionValueToSend); + } + + [Fact] + public void DotnetBuildAndPublishCommandOpinionsShouldBeSentToTelemetryWhenThereIsMultipleOption() + { + string[] args = {"build", "--configuration", "Debug", "--runtime", "osx.10.11-x64"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-build" && e.Properties.ContainsKey("configuration") && + e.Properties["configuration"] == "Debug"); + + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-build" && e.Properties.ContainsKey("runtime") && + e.Properties["runtime"] == "osx.10.11-x64"); + } + + [Fact] + public void DotnetRunCleanTestCommandOpinionsShouldBeSentToTelemetryWhenThereIsMultipleOption() + { + string[] args = {"clean", "--configuration", "Debug", "--framework", "netcoreapp1.0"}; + Cli.Program.ProcessArgs(args); + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-clean" && e.Properties.ContainsKey("configuration") && + e.Properties["configuration"] == "Debug"); + + _fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "dotnet-clean" && e.Properties.ContainsKey("framework") && + e.Properties["framework"] == "netcoreapp1.0"); + } + + [WindowsOnlyFact] + public void InternalreportinstallsuccessCommandCollectExeNameWithEventname() + { + FakeRecordEventNameTelemetry fakeTelemetry = new FakeRecordEventNameTelemetry(); + string[] args = { "c:\\mypath\\dotnet-sdk-latest-win-x64.exe" }; + + InternalReportinstallsuccess.ProcessInputAndSendTelemetry(args, fakeTelemetry); + + fakeTelemetry + .LogEntries.Should() + .Contain(e => e.EventName == "reportinstallsuccess" && e.Properties.ContainsKey("exeName") && + e.Properties["exeName"] == "dotnet-sdk-latest-win-x64.exe"); + } + + [Fact] + public void InternalreportinstallsuccessCommandIsRegistedInBuiltIn() + { + BuiltInCommandsCatalog.Commands.Should().ContainKey("internal-reportinstallsuccess"); } } } diff --git a/test/dotnet.Tests/TelemetryCommonPropertiesTests.cs b/test/dotnet.Tests/TelemetryCommonPropertiesTests.cs new file mode 100644 index 000000000..b30e59e9d --- /dev/null +++ b/test/dotnet.Tests/TelemetryCommonPropertiesTests.cs @@ -0,0 +1,54 @@ +// 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 FluentAssertions; +using Microsoft.DotNet.Tools.Test.Utilities; +using Xunit; +using System; +using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Cli.Telemetry; +using Microsoft.DotNet.Configurer; + +namespace Microsoft.DotNet.Tests +{ + public class TelemetryCommonPropertiesTests : TestBase + { + [Fact] + public void TelemetryCommonPropertiesShouldContainIfItIsInDockerOrNot() + { + var unitUnderTest = new TelemetryCommonProperties(userLevelCacheWriter: new NothingCache()); + unitUnderTest.GetTelemetryCommonProperties().Should().ContainKey("Docker Container"); + } + + [Fact] + public void TelemetryCommonPropertiesShouldReturnHashedPath() + { + var unitUnderTest = new TelemetryCommonProperties(() => "ADirectory", userLevelCacheWriter: new NothingCache()); + unitUnderTest.GetTelemetryCommonProperties()["Current Path Hash"].Should().NotBe("ADirectory"); + } + + [Fact] + public void TelemetryCommonPropertiesShouldReturnHashedMachineId() + { + var unitUnderTest = new TelemetryCommonProperties(getMACAddress: () => "plaintext", userLevelCacheWriter: new NothingCache()); + unitUnderTest.GetTelemetryCommonProperties()["Machine ID"].Should().NotBe("plaintext"); + } + + [Fact] + public void TelemetryCommonPropertiesShouldReturnNewGuidWhenCannotGetMacAddress() + { + var unitUnderTest = new TelemetryCommonProperties(getMACAddress: () => null, userLevelCacheWriter: new NothingCache()); + var assignedMachineId = unitUnderTest.GetTelemetryCommonProperties()["Machine ID"]; + + Guid.TryParse(assignedMachineId, out var _).Should().BeTrue("it should be a guid"); + } + + private class NothingCache : IUserLevelCacheWriter + { + public string RunWithCache(string cacheKey, Func getValueToCache) + { + return getValueToCache(); + } + } + } +} diff --git a/test/msbuild.IntegrationTests/FakeRecordEventNameTelemetry.cs b/test/msbuild.IntegrationTests/FakeRecordEventNameTelemetry.cs new file mode 100644 index 000000000..091ededb3 --- /dev/null +++ b/test/msbuild.IntegrationTests/FakeRecordEventNameTelemetry.cs @@ -0,0 +1,38 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Concurrent; +using System.Collections.Generic; +using Microsoft.DotNet.Cli; + +namespace Microsoft.DotNet.Cli.MSBuild.IntegrationTests +{ + public class FakeRecordEventNameTelemetry + { + public bool Enabled { get; set; } + + public string EventName { get; set; } + + public void TrackEvent(string eventName, + IDictionary properties, + IDictionary measurements) + { + LogEntries.Add( + new LogEntry + { + EventName = eventName, + Measurement = measurements, + Properties = properties + }); + } + + public ConcurrentBag LogEntries { get; set; } = new ConcurrentBag(); + + public class LogEntry + { + public string EventName { get; set; } + public IDictionary Properties { get; set; } + public IDictionary Measurement { get; set; } + } + } +}