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

This commit is contained in:
Nick Guerrera 2018-05-31 11:59:29 -07:00 committed by GitHub
commit 81c7f9a3e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
459 changed files with 7400 additions and 5417 deletions

View file

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

View file

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>library</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<Target Name="PrintWarning" BeforeTargets="CoreBuild">
<Warning Text="NoWarn => $(NoWarn)"/>
</Target>
</Project>

View file

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

View file

@ -5,7 +5,7 @@
<MicrosoftAspNetCoreAppPackageVersion>$(MicrosoftAspNetCoreAllPackageVersion)</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
<MicrosoftBuildPackageVersion>15.7.179</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion>15.8.0-preview-000060</MicrosoftBuildPackageVersion>
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
<MicrosoftBuildRuntimePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildRuntimePackageVersion>
<MicrosoftBuildLocalizationPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildLocalizationPackageVersion>
@ -16,7 +16,7 @@
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
<MicrosoftNETSdkPackageVersion>2.1.300</MicrosoftNETSdkPackageVersion>
<MicrosoftNETSdkPackageVersion>1.0.0-preview-62924-09</MicrosoftNETSdkPackageVersion>
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>$(MicrosoftAspNetCoreAppPackageVersion)</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftNETSdkWebPackageVersion>2.1.300</MicrosoftNETSdkWebPackageVersion>
@ -36,7 +36,7 @@
<MicrosoftDotNetProjectJsonMigrationPackageVersion>1.3.1</MicrosoftDotNetProjectJsonMigrationPackageVersion>
<MicrosoftDotNetToolsMigrateCommandPackageVersion>$(MicrosoftDotNetProjectJsonMigrationPackageVersion)</MicrosoftDotNetToolsMigrateCommandPackageVersion>
<MicrosoftDotNetArchivePackageVersion>0.2.0-beta-62628-01</MicrosoftDotNetArchivePackageVersion>
<NuGetBuildTasksPackageVersion>4.7.0-rtm.5148</NuGetBuildTasksPackageVersion>
<NuGetBuildTasksPackageVersion>4.8.0-preview1.5196</NuGetBuildTasksPackageVersion>
<NuGetBuildTasksPackPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetBuildTasksPackPackageVersion>
<NuGetCommonPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetCommonPackageVersion>
<NuGetCommandLineXPlatPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetCommandLineXPlatPackageVersion>
@ -45,7 +45,8 @@
<NuGetPackagingPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetPackagingPackageVersion>
<NuGetProjectModelPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetProjectModelPackageVersion>
<NuGetVersioningPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetVersioningPackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.7.0</MicrosoftNETTestSdkPackageVersion>
<NuGetSdkResolverPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetSdkResolverPackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.8.0-preview-20180510-03</MicrosoftNETTestSdkPackageVersion>
<MicrosoftTestPlatformCLIPackageVersion>$(MicrosoftNETTestSdkPackageVersion)</MicrosoftTestPlatformCLIPackageVersion>
<MicrosoftTestPlatformBuildPackageVersion>$(MicrosoftNETTestSdkPackageVersion)</MicrosoftTestPlatformBuildPackageVersion>
<XliffTasksPackageVersion>0.2.0-beta-000042</XliffTasksPackageVersion>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<VersionMajor>2</VersionMajor>
<VersionMinor>1</VersionMinor>
<VersionPatch>301</VersionPatch>
<VersionPatch>400</VersionPatch>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview</ReleaseSuffix>
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>

View file

@ -8,9 +8,6 @@ PACKAGE=$1
INSTALL_DESTINATION=$2
INSTALL_TEMP_HOME=/tmp/dotnet-installer
# A temporary fix for the permissions issue(s)
chmod -R 755 $INSTALL_DESTINATION
first_run() {
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
}

View file

@ -522,6 +522,7 @@ else {
throw "Invalid value for `$Runtime"
}
# Check if the SDK version is already installed.
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
if ($isAssetInstalled) {
Say "$assetName version $SpecificVersion is already installed."
@ -561,6 +562,12 @@ catch {
Say "Extracting zip from $DownloadLink"
Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
# Check if the SDK version is now installed; if not, fail the installation.
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
if (!$isAssetInstalled) {
throw "$assetName version $SpecificVersion failed to install with an unknown error."
}
Remove-Item $ZipPath
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath

View file

@ -754,6 +754,7 @@ install_dotnet() {
return 1
fi
# Check if the SDK version is already installed.
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
say "$asset_name version $specific_version is already installed."
return 0
@ -791,6 +792,12 @@ install_dotnet() {
say "Extracting zip from $download_link"
extract_dotnet_package "$zip_path" "$install_root"
# Check if the SDK version is now installed; if not, fail the installation.
if ! is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
say_err "$asset_name version $specific_version failed to install with an unknown error."
return 1
fi
return 0
}

View file

@ -59,14 +59,10 @@ namespace Microsoft.DotNet.Cli.Utils
/// <returns></returns>
private static IEnumerable<string> EscapeArgArray(IEnumerable<string> args)
{
var escapedArgs = new List<string>();
foreach (var arg in args)
{
escapedArgs.Add(EscapeSingleArg(arg));
yield return EscapeSingleArg(arg);
}
return escapedArgs;
}
/// <summary>
@ -79,23 +75,19 @@ namespace Microsoft.DotNet.Cli.Utils
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
private static IEnumerable<string> EscapeArgArrayForCmd(IEnumerable<string> arguments)
private static IEnumerable<string> EscapeArgArrayForCmd(IEnumerable<string> args)
{
var escapedArgs = new List<string>();
foreach (var arg in arguments)
foreach (var arg in args)
{
escapedArgs.Add(EscapeArgForCmd(arg));
yield return EscapeArgForCmd(arg);
}
return escapedArgs;
}
public static string EscapeSingleArg(string arg)
public static string EscapeSingleArg(string arg, bool forceQuotes = false)
{
var sb = new StringBuilder();
var needsQuotes = ShouldSurroundWithQuotes(arg);
var needsQuotes = forceQuotes || ShouldSurroundWithQuotes(arg);
var isQuoted = needsQuotes || IsSurroundedWithQuotes(arg);
if (needsQuotes) sb.Append("\"");

View file

@ -3,6 +3,7 @@
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Utils
@ -47,5 +48,35 @@ namespace Microsoft.DotNet.Cli.Utils
}
}
}
/// <summary>
/// Run Directory.Move and File.Move in Windows has a chance to get IOException with
/// HResult 0x80070005 due to Indexer. But this error is transient.
/// </summary>
internal static void RetryOnMoveAccessFailure(Action action)
{
const int ERROR_HRESULT_ACCESS_DENIED = unchecked((int)0x80070005);
int nextWaitTime = 10;
int remainRetry = 10;
while (true)
{
try
{
action();
break;
}
catch (IOException e) when (e.HResult == ERROR_HRESULT_ACCESS_DENIED)
{
Thread.Sleep(nextWaitTime);
nextWaitTime *= 2;
remainRetry--;
if (remainRetry == 0)
{
throw;
}
}
}
}
}
}

View file

@ -34,7 +34,7 @@ namespace Microsoft.DotNet.Cli.Utils
{
_forwardingApp = new ForwardingAppImplementation(
msbuildPath ?? GetMSBuildExePath(),
_msbuildRequiredParameters.Concat(argsToForward.Select(Escape)),
_msbuildRequiredParameters.Concat(argsToForward.Select(QuotePropertyValue)),
environmentVariables: _msbuildRequiredEnvironmentVariables);
}
@ -49,13 +49,6 @@ namespace Microsoft.DotNet.Cli.Utils
return GetProcessStartInfo().Execute();
}
private static string Escape(string arg) =>
// this is a workaround for https://github.com/Microsoft/msbuild/issues/1622
IsRestoreSources(arg) ?
arg.Replace(";", "%3B")
.Replace("://", ":%2F%2F") :
arg;
private static string GetMSBuildExePath()
{
return Path.Combine(
@ -82,12 +75,37 @@ namespace Microsoft.DotNet.Cli.Utils
return new Muxer().MuxerPath;
}
private static bool IsRestoreSources(string arg)
private static bool IsPropertyArgument(string arg)
{
return arg.StartsWith("/p:RestoreSources=", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("/property:RestoreSources=", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("-p:RestoreSources=", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("-property:RestoreSources=", StringComparison.OrdinalIgnoreCase);
return
arg.StartsWith("/p:", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("/property:", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("-p:", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("-property:", StringComparison.OrdinalIgnoreCase);
}
private static string QuotePropertyValue(string arg)
{
if (!IsPropertyArgument(arg))
{
return arg;
}
var parts = arg.Split(new[] { '=' }, 2);
if (parts.Length != 2)
{
return arg;
}
// Escaping `://` is a workaround for https://github.com/Microsoft/msbuild/issues/1622
// The issue is that MSBuild is collapsing multiple slashes to a single slash due to a bad regex.
var value = parts[1].Replace("://", ":%2f%2f");
if (ArgumentEscaper.IsSurroundedWithQuotes(value))
{
return $"{parts[0]}={value}";
}
return $"{parts[0]}={ArgumentEscaper.EscapeSingleArg(value, forceQuotes: true)}";
}
}
}

View file

@ -119,6 +119,11 @@ namespace Microsoft.DotNet.Tools.Common
/// </summary>
public static string GetRelativePath(string path1, string path2)
{
if (!Path.IsPathRooted(path1) || !Path.IsPathRooted(path2))
{
throw new ArgumentException("both paths need to be rooted/full path");
}
return GetRelativePath(path1, path2, Path.DirectorySeparatorChar, true);
}

View file

@ -7,6 +7,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyMetadataAttribute("Serviceable", "True")]
[assembly: InternalsVisibleTo("dotnet, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Configurer, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Cli.Utils.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.TestFramework, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View file

@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Configurer
private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL);
public AspNetCertificateSentinel(CliFolderPathCalculator cliFallbackFolderPathCalculator) :
public AspNetCertificateSentinel() :
this(
CliFolderPathCalculator.DotnetUserProfileFolderPath,
FileSystemWrapper.Default.File,

View file

@ -4,40 +4,59 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Utils;
using NuGet.Common;
namespace Microsoft.DotNet.Configurer
{
public class CliFolderPathCalculator
public static class CliFolderPathCalculator
{
public const string DotnetHomeVariableName = "DOTNET_CLI_HOME";
private const string DotnetProfileDirectoryName = ".dotnet";
private const string ToolsShimFolderName = "tools";
public string CliFallbackFolderPath => Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_FALLBACKFOLDER") ??
Path.Combine(new DirectoryInfo(AppContext.BaseDirectory).Parent.FullName, "NuGetFallbackFolder");
public string ToolsShimPath => Path.Combine(DotnetUserProfileFolderPath, ToolsShimFolderName);
public string ToolsPackagePath => ToolPackageFolderPathCalculator.GetToolPackageFolderPath(ToolsShimPath);
public BashPathUnderHomeDirectory ToolsShimPathInUnix
public static string CliFallbackFolderPath =>
Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_FALLBACKFOLDER") ??
Path.Combine(new DirectoryInfo(AppContext.BaseDirectory).Parent.FullName, "NuGetFallbackFolder");
public static string ToolsShimPath => Path.Combine(DotnetUserProfileFolderPath, ToolsShimFolderName);
public static string ToolsPackagePath => ToolPackageFolderPathCalculator.GetToolPackageFolderPath(ToolsShimPath);
public static BashPathUnderHomeDirectory ToolsShimPathInUnix =>
new BashPathUnderHomeDirectory(
DotnetHomePath,
Path.Combine(DotnetProfileDirectoryName, ToolsShimFolderName));
public static string DotnetUserProfileFolderPath =>
Path.Combine(DotnetHomePath, DotnetProfileDirectoryName);
public static string PlatformHomeVariableName =>
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME";
public static string DotnetHomePath
{
get
{
return new BashPathUnderHomeDirectory(Environment.GetEnvironmentVariable("HOME"),
Path.Combine(DotnetProfileDirectoryName, ToolsShimFolderName));
var home = Environment.GetEnvironmentVariable(DotnetHomeVariableName);
if (string.IsNullOrEmpty(home))
{
home = Environment.GetEnvironmentVariable(PlatformHomeVariableName);
if (string.IsNullOrEmpty(home))
{
throw new ConfigurationException(
string.Format(
LocalizableStrings.FailedToDetermineUserHomeDirectory,
DotnetHomeVariableName))
.DisplayAsError();
}
}
return home;
}
}
public static string DotnetUserProfileFolderPath
{
get
{
string profileDir = Environment.GetEnvironmentVariable(
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME");
return Path.Combine(profileDir, DotnetProfileDirectoryName);
}
}
public string NuGetUserSettingsDirectory =>
public static string NuGetUserSettingsDirectory =>
NuGetEnvironment.GetFolderPath(NuGetFolderPath.UserSettingsDirectory);
}
}

View file

@ -0,0 +1,22 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace Microsoft.DotNet.Configurer
{
internal class ConfigurationException : Exception
{
public ConfigurationException()
{
}
public ConfigurationException(string message) : base(message)
{
}
public ConfigurationException(string message, Exception innerException) : base(message, innerException)
{
}
}
}

View file

@ -0,0 +1,24 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.Configurer
{
public class DotnetFirstRunConfiguration
{
public bool GenerateAspNetCertificate { get; }
public bool PrintTelemetryMessage { get; }
public bool SkipFirstRunExperience { get; }
public DotnetFirstRunConfiguration(
bool generateAspNetCertificate,
bool printTelemetryMessage,
bool skipFirstRunExperience)
{
GenerateAspNetCertificate = generateAspNetCertificate;
PrintTelemetryMessage = printTelemetryMessage;
SkipFirstRunExperience = skipFirstRunExperience;
}
}
}

View file

@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Configurer
public class DotnetFirstTimeUseConfigurer
{
private IReporter _reporter;
private IEnvironmentProvider _environmentProvider;
private DotnetFirstRunConfiguration _dotnetFirstRunConfiguration;
private INuGetCachePrimer _nugetCachePrimer;
private INuGetCacheSentinel _nugetCacheSentinel;
private IFirstTimeUseNoticeSentinel _firstTimeUseNoticeSentinel;
@ -29,7 +29,7 @@ namespace Microsoft.DotNet.Configurer
IAspNetCertificateSentinel aspNetCertificateSentinel,
IAspNetCoreCertificateGenerator aspNetCoreCertificateGenerator,
IFileSentinel toolPathSentinel,
IEnvironmentProvider environmentProvider,
DotnetFirstRunConfiguration dotnetFirstRunConfiguration,
IReporter reporter,
string cliFallbackFolderPath,
IEnvironmentPath pathAdder)
@ -40,7 +40,7 @@ namespace Microsoft.DotNet.Configurer
_aspNetCertificateSentinel = aspNetCertificateSentinel;
_aspNetCoreCertificateGenerator = aspNetCoreCertificateGenerator;
_toolPathSentinel = toolPathSentinel;
_environmentProvider = environmentProvider;
_dotnetFirstRunConfiguration = dotnetFirstRunConfiguration;
_reporter = reporter;
_cliFallbackFolderPath = cliFallbackFolderPath;
_pathAdder = pathAdder ?? throw new ArgumentNullException(nameof(pathAdder));
@ -93,11 +93,8 @@ namespace Microsoft.DotNet.Configurer
#if EXCLUDE_ASPNETCORE
return false;
#else
var generateAspNetCertificate =
_environmentProvider.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", true);
return ShouldRunFirstRunExperience() &&
generateAspNetCertificate &&
_dotnetFirstRunConfiguration.GenerateAspNetCertificate &&
!_aspNetCertificateSentinel.Exists();
#endif
}
@ -116,11 +113,8 @@ namespace Microsoft.DotNet.Configurer
private bool ShouldPrintFirstTimeUseNotice()
{
var showFirstTimeUseNotice =
_environmentProvider.GetEnvironmentVariableAsBool("DOTNET_PRINT_TELEMETRY_MESSAGE", true);
return ShouldRunFirstRunExperience() &&
showFirstTimeUseNotice &&
_dotnetFirstRunConfiguration.PrintTelemetryMessage &&
!_firstTimeUseNoticeSentinel.Exists();
}
@ -157,10 +151,7 @@ namespace Microsoft.DotNet.Configurer
private bool ShouldRunFirstRunExperience()
{
var skipFirstTimeExperience =
_environmentProvider.GetEnvironmentVariableAsBool("DOTNET_SKIP_FIRST_TIME_EXPERIENCE", false);
return !skipFirstTimeExperience;
return !_dotnetFirstRunConfiguration.SkipFirstRunExperience;
}
}
}

View file

@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Configurer
private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL);
public FirstTimeUseNoticeSentinel(CliFolderPathCalculator cliFolderPathCalculator) :
public FirstTimeUseNoticeSentinel() :
this(
CliFolderPathCalculator.DotnetUserProfileFolderPath,
FileSystemWrapper.Default.File,

View file

@ -154,4 +154,7 @@ Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</value>
</data>
<data name="FailedToDetermineUserHomeDirectory" xml:space="preserve">
<value>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</value>
</data>
</root>

View file

@ -17,6 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
<PackageReference Include="NuGet.Common" Version="$(NuGetCommonPackageVersion)" />
<PackageReference Include="NuGet.Configuration" Version="$(NuGetConfigurationPackageVersion)" />
<PackageReference Include="Microsoft.DotNet.Archive" Version="$(MicrosoftDotNetArchivePackageVersion)" />

View file

@ -17,31 +17,20 @@ namespace Microsoft.DotNet.Configurer
private readonly INuGetCacheSentinel _nuGetCacheSentinel;
private readonly CliFolderPathCalculator _cliFolderPathCalculator;
public NuGetCachePrimer(
INuGetPackagesArchiver nugetPackagesArchiver,
INuGetCacheSentinel nuGetCacheSentinel,
CliFolderPathCalculator cliFolderPathCalculator)
: this(nugetPackagesArchiver,
nuGetCacheSentinel,
cliFolderPathCalculator,
FileSystemWrapper.Default.File)
public NuGetCachePrimer(INuGetPackagesArchiver nugetPackagesArchiver, INuGetCacheSentinel nuGetCacheSentinel)
: this(nugetPackagesArchiver, nuGetCacheSentinel, FileSystemWrapper.Default.File)
{
}
internal NuGetCachePrimer(
INuGetPackagesArchiver nugetPackagesArchiver,
INuGetCacheSentinel nuGetCacheSentinel,
CliFolderPathCalculator cliFolderPathCalculator,
IFile file)
{
_nugetPackagesArchiver = nugetPackagesArchiver;
_nuGetCacheSentinel = nuGetCacheSentinel;
_cliFolderPathCalculator = cliFolderPathCalculator;
_file = file;
}
@ -52,7 +41,7 @@ namespace Microsoft.DotNet.Configurer
return;
}
var nuGetFallbackFolder = _cliFolderPathCalculator.CliFallbackFolderPath;
var nuGetFallbackFolder = CliFolderPathCalculator.CliFallbackFolderPath;
_nugetPackagesArchiver.ExtractArchive(nuGetFallbackFolder);

View file

@ -27,8 +27,8 @@ namespace Microsoft.DotNet.Configurer
private Stream InProgressSentinel { get; set; }
public NuGetCacheSentinel(CliFolderPathCalculator cliFolderPathCalculator) :
this(cliFolderPathCalculator.CliFallbackFolderPath,
public NuGetCacheSentinel() :
this(CliFolderPathCalculator.CliFallbackFolderPath,
FileSystemWrapper.Default.File,
FileSystemWrapper.Default.Directory)
{

View file

@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Configurer
private readonly IDirectory _directory;
private string _dotnetUserProfileFolderPath;
public UserLevelCacheWriter(CliFolderPathCalculator cliFolderPathCalculator) :
public UserLevelCacheWriter() :
this(
CliFolderPathCalculator.DotnetUserProfileFolderPath,
FileSystemWrapper.Default.File,

View file

@ -71,6 +71,11 @@ Pokud chcete certifikátu důvěřovat (platí jenom pro Windows a macOS), nains
Další informace o konfiguraci protokolu HTTPS najdete na webu https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ Um dem Zertifikat zu vertrauen (nur Windows und macOS), installieren Sie zuerst
Weitere Informationen zur Konfiguration von HTTPS finden Sie unter https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -70,6 +70,11 @@ Para confiar en el certificado (solo Windows y macOS), instale primero la herram
Para obtener más información sobre la configuración HTTPS, vea https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ Pour approuver le certificat (Windows et macOS uniquement), installez d'abord l'
Pour plus d'informations sur la configuration du protocole HTTPS, consultez https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ Per considerare attendibile il certificato (solo Windows e macOS), installare pr
Per altre informazioni sulla configurazione di HTTPS, vedere https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ ASP.NET Core HTTPS 開発証明書が正常にインストールされました
HTTPS を構成する方法の詳細については、https://go.microsoft.com/fwlink/?linkid=848054 をご覧ください。</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ ASP.NET Core HTTPS 개발 인증서를 설치했습니다.
HTTPS 구성에 대한 자세한 내용은 https://go.microsoft.com/fwlink/?linkid=848054를 참조하세요.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ Aby ufać temu certyfikatowi (dotyczy tylko systemów Windows i macOS), najpierw
Aby uzyskać więcej informacji dotyczących konfigurowania protokołu HTTPS, zobacz https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ Para confiar no certificado (apenas Windows e macOS), primeiramente instale a fe
Para saber mais sobre a configuração de HTTPS, acesse https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?l
Дополнительные сведения о настройке HTTPS: https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ Sertifikaya güvenmek için (yalnızca Windows ve macOS) önce 'dotnet tool inst
HTTPS yapılandırması hakkında daha fazla bilgi için bkz. https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?l
有关配置 HTTPS 的详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=848054。</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -71,6 +71,11 @@ For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?l
如需如何設定 HTTPS 的詳細資訊,請參閱 https://go.microsoft.com/fwlink/?linkid=848054。</target>
<note />
</trans-unit>
<trans-unit id="FailedToDetermineUserHomeDirectory">
<source>The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</source>
<target state="new">The user's home directory could not be determined. Set the '{0}' environment variable to specify the directory to use.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -133,7 +133,7 @@
<value>Response file '{0}' doesn't exist.</value>
</data>
<data name="ShowHelpInfo" xml:space="preserve">
<value>Show help information</value>
<value>Show command line help.</value>
</data>
<data name="ShowVersionInfo" xml:space="preserve">
<value>Show version information</value>

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Zobrazit nápovědu</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Zobrazit nápovědu</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Hilfeinformationen anzeigen</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Hilfeinformationen anzeigen</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Mostrar información de ayuda</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Mostrar información de ayuda</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Afficher les informations d'aide</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Afficher les informations d'aide</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Visualizza la Guida</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Visualizza la Guida</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">ヘルプ情報を表示する</target>
<source>Show command line help.</source>
<target state="needs-review-translation">ヘルプ情報を表示する</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">도움말 정보 표시</target>
<source>Show command line help.</source>
<target state="needs-review-translation">도움말 정보 표시</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Wyświetl informacje pomocy</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Wyświetl informacje pomocy</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Mostrar informações de ajuda</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Mostrar informações de ajuda</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Показать справку</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Показать справку</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">Yardım bilgilerini göster</target>
<source>Show command line help.</source>
<target state="needs-review-translation">Yardım bilgilerini göster</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">显示帮助信息</target>
<source>Show command line help.</source>
<target state="needs-review-translation">显示帮助信息</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -23,8 +23,8 @@
<note />
</trans-unit>
<trans-unit id="ShowHelpInfo">
<source>Show help information</source>
<target state="translated">顯示說明資訊</target>
<source>Show command line help.</source>
<target state="needs-review-translation">顯示說明資訊</target>
<note />
</trans-unit>
<trans-unit id="ShowVersionInfo">

View file

@ -432,18 +432,12 @@
<data name="ArgumentsProjectOrSolutionDescription" xml:space="preserve">
<value>The project or solution to operation on. If a file is not specified, the current directory is searched.</value>
</data>
<data name="ArgumentsProjectDescription" xml:space="preserve">
<value>The project file to operate on. If a file is not specified, the command will search the current directory for one.</value>
</data>
<data name="ArgumentsSolutionDescription" xml:space="preserve">
<value>Solution file to operate on. If not specified, the command will search the current directory for one.</value>
</data>
<data name="CmdSlnFile" xml:space="preserve">
<value>SLN_FILE</value>
</data>
<data name="CmdProjectFile" xml:space="preserve">
<data name="ProjectArgumentName" xml:space="preserve">
<value>PROJECT</value>
</data>
<data name="ProjectArgumentDescription" xml:space="preserve">
<value>The project file to operate on. If a file is not specified, the command will search the current directory for one.</value>
</data>
<data name="CmdFramework" xml:space="preserve">
<value>FRAMEWORK</value>
</data>
@ -500,25 +494,16 @@
{1}.</value>
</data>
<data name="VerbosityOptionDescription" xml:space="preserve">
<value>Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].</value>
</data>
<data name="FrameworkOptionDescription" xml:space="preserve">
<value>Target framework to publish for. The target framework has to be specified in the project file.</value>
</data>
<data name="RuntimeOptionDescription" xml:space="preserve">
<value>Publish the project for a given runtime. This is used when creating self-contained deployment. Default is to publish a framework-dependent app.</value>
</data>
<data name="ConfigurationOptionDescription" xml:space="preserve">
<value>Configuration to use for building the project. Default for most projects is "Debug".</value>
<value>Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].</value>
</data>
<data name="CmdVersionSuffixDescription" xml:space="preserve">
<value>Defines the value for the $(VersionSuffix) property in the project.</value>
<value>Set the value of the $(VersionSuffix) property to use when building the project.</value>
</data>
<data name="ShowHelpDescription" xml:space="preserve">
<value>Show help information.</value>
<value>Show command line help.</value>
</data>
<data name="NoRestoreDescription" xml:space="preserve">
<value>Does not do an implicit restore when executing the command.</value>
<value>Do not restore the project before building.</value>
</data>
<data name="ToolSettingsInvalidXml" xml:space="preserve">
<value>Invalid XML: {0}</value>
@ -646,4 +631,19 @@ setx PATH "%PATH%;{0}"
<data name="FailedToReadNuGetLockFile" xml:space="preserve">
<value>Failed to read NuGet LockFile for tool package '{0}': {1}</value>
</data>
<data name="LevelArgumentName" xml:space="preserve">
<value>LEVEL</value>
</data>
<data name="FrameworkArgumentName" xml:space="preserve">
<value>FRAMEWORK</value>
</data>
<data name="RuntimeIdentifierArgumentName" xml:space="preserve">
<value>RUNTIME_IDENTIFIER</value>
</data>
<data name="ConfigurationArgumentName" xml:space="preserve">
<value>CONFIGURATION</value>
</data>
<data name="VersionSuffixArgumentName" xml:space="preserve">
<value>VERSION_SUFFIX</value>
</data>
</root>

View file

@ -25,32 +25,33 @@ namespace Microsoft.DotNet.Cli
"n", "normal",
"d", "detailed",
"diag", "diagnostic")
.With(name: CommonLocalizableStrings.LevelArgumentName)
.ForwardAsSingle(o => $"-verbosity:{o.Arguments.Single()}"));
public static Option FrameworkOption() =>
public static Option FrameworkOption(string description) =>
Create.Option(
"-f|--framework",
CommonLocalizableStrings.FrameworkOptionDescription,
description,
Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
.With(name: "FRAMEWORK")
.With(name: CommonLocalizableStrings.FrameworkArgumentName)
.ForwardAsSingle(o => $"-property:TargetFramework={o.Arguments.Single()}"));
public static Option RuntimeOption() =>
public static Option RuntimeOption(string description) =>
Create.Option(
"-r|--runtime",
CommonLocalizableStrings.RuntimeOptionDescription,
description,
Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
.With(name: "RUNTIME_IDENTIFIER")
.With(name: CommonLocalizableStrings.RuntimeIdentifierArgumentName)
.ForwardAsSingle(o => $"-property:RuntimeIdentifier={o.Arguments.Single()}"));
public static Option ConfigurationOption() =>
public static Option ConfigurationOption(string description) =>
Create.Option(
"-c|--configuration",
CommonLocalizableStrings.ConfigurationOptionDescription,
description,
Accept.ExactlyOneArgument()
.With(name: "CONFIGURATION")
.With(name: CommonLocalizableStrings.ConfigurationArgumentName)
.WithSuggestionsFrom("DEBUG", "RELEASE")
.ForwardAsSingle(o => $"-property:Configuration={o.Arguments.Single()}"));
@ -59,7 +60,7 @@ namespace Microsoft.DotNet.Cli
"--version-suffix",
CommonLocalizableStrings.CmdVersionSuffixDescription,
Accept.ExactlyOneArgument()
.With(name: "VERSION_SUFFIX")
.With(name: CommonLocalizableStrings.VersionSuffixArgumentName)
.ForwardAsSingle(o => $"-property:VersionSuffix={o.Arguments.Single()}"));
public static ArgumentsRule DefaultToCurrentDirectory(this ArgumentsRule rule) =>

View file

@ -10,7 +10,7 @@ namespace Microsoft.DotNet.Cli
public static class ParseResultExtensions
{
public static void ShowHelp(this ParseResult parseResult) =>
Console.WriteLine(parseResult.Command().HelpView());
Console.WriteLine(parseResult.Command().HelpView().TrimEnd());
public static void ShowHelpOrErrorIfAppropriate(this ParseResult parseResult)
{
@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Cli
throw new CommandParsingException(
message: string.Join(Environment.NewLine,
parseResult.Errors.Select(e => e.Message)),
helpText: parseResult?.Command()?.HelpView());
helpText: parseResult?.Command()?.HelpView().TrimEnd());
}
}
@ -34,7 +34,7 @@ namespace Microsoft.DotNet.Cli
appliedCommand.Arguments.Contains("/?"))
{
// NOTE: this is a temporary stage in refactoring toward the ClicCommandLineParser being used at the CLI entry point.
throw new HelpException(parseResult.Command().HelpView());
throw new HelpException(parseResult.Command().HelpView().TrimEnd());
}
}
}

View file

@ -3,14 +3,23 @@
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Tools.Help;
using Microsoft.DotNet.Tools.New;
using static System.Environment;
using static Microsoft.DotNet.Cli.CommandLine.LocalizableStrings;
using LocalizableStrings = Microsoft.DotNet.Tools.Run.LocalizableStrings;
using NewCommandParser = Microsoft.TemplateEngine.Cli.CommandParsing.CommandParserSupport;
namespace Microsoft.DotNet.Cli
{
public static class Parser
{
// This is used for descriptions of commands and options that are only defined for `dotnet complete` (i.e. command line completion).
// For example, a NuGet assembly handles parsing the `nuget` command and options.
// To get completion for such a command, we have to define a parser that is used for the completion.
// Command and option help text cannot be empty, otherwise the parser will hide them from the completion list.
// The value of `-` has no special meaning; it simply prevents these commands and options from being hidden.
internal const string CompletionOnlyDescription = "-";
static Parser()
{
ConfigureCommandLineLocalizedStrings();
@ -35,7 +44,7 @@ namespace Microsoft.DotNet.Cli
options: Create.Command("dotnet",
".NET Command Line Tools",
Accept.NoArguments(),
NewCommandParser.New(),
NewCommandParser.CreateNewCommandWithoutTemplateInfo(NewCommandShim.CommandName),
RestoreCommandParser.Restore(),
BuildCommandParser.Build(),
PublishCommandParser.Publish(),
@ -51,15 +60,17 @@ namespace Microsoft.DotNet.Cli
NuGetCommandParser.NuGet(),
StoreCommandParser.Store(),
HelpCommandParser.Help(),
Create.Command("msbuild", ""),
Create.Command("vstest", ""),
Create.Command("msbuild", CompletionOnlyDescription),
Create.Command("vstest", CompletionOnlyDescription),
CompleteCommandParser.Complete(),
InternalReportinstallsuccessCommandParser.InternalReportinstallsuccess(),
ToolCommandParser.Tool(),
BuildServerCommandParser.CreateCommand(),
CommonOptions.HelpOption(),
Create.Option("--info", ""),
Create.Option("-d", ""),
Create.Option("--debug", "")));
Create.Option("--info", CompletionOnlyDescription),
Create.Option("-d|--diagnostics", CompletionOnlyDescription),
Create.Option("--version", CompletionOnlyDescription),
Create.Option("--list-sdks", CompletionOnlyDescription),
Create.Option("--list-runtimes", CompletionOnlyDescription)));
}
}

View file

@ -88,15 +88,14 @@ namespace Microsoft.DotNet.Cli
var success = true;
var command = string.Empty;
var lastArg = 0;
var cliFallbackFolderPathCalculator = new CliFolderPathCalculator();
TopLevelCommandParserResult topLevelCommandParserResult = TopLevelCommandParserResult.Empty;
using (INuGetCacheSentinel nugetCacheSentinel = new NuGetCacheSentinel(cliFallbackFolderPathCalculator))
using (INuGetCacheSentinel nugetCacheSentinel = new NuGetCacheSentinel())
using (IFirstTimeUseNoticeSentinel disposableFirstTimeUseNoticeSentinel =
new FirstTimeUseNoticeSentinel(cliFallbackFolderPathCalculator))
new FirstTimeUseNoticeSentinel())
{
IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel = disposableFirstTimeUseNoticeSentinel;
IAspNetCertificateSentinel aspNetCertificateSentinel = new AspNetCertificateSentinel(cliFallbackFolderPathCalculator);
IAspNetCertificateSentinel aspNetCertificateSentinel = new AspNetCertificateSentinel();
IFileSentinel toolPathSentinel = new FileSentinel(
new FilePath(
Path.Combine(
@ -141,6 +140,15 @@ namespace Microsoft.DotNet.Cli
command = "help";
}
var environmentProvider = new EnvironmentProvider();
bool generateAspNetCertificate =
environmentProvider.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", true);
bool printTelemetryMessage =
environmentProvider.GetEnvironmentVariableAsBool("DOTNET_PRINT_TELEMETRY_MESSAGE", true);
bool skipFirstRunExperience =
environmentProvider.GetEnvironmentVariableAsBool("DOTNET_SKIP_FIRST_TIME_EXPERIENCE", false);
topLevelCommandParserResult = new TopLevelCommandParserResult(command);
var hasSuperUserAccess = false;
if (IsDotnetBeingInvokedFromNativeInstaller(topLevelCommandParserResult))
@ -149,15 +157,25 @@ namespace Microsoft.DotNet.Cli
firstTimeUseNoticeSentinel = new NoOpFirstTimeUseNoticeSentinel();
toolPathSentinel = new NoOpFileSentinel(exists: false);
hasSuperUserAccess = true;
// When running through a native installer, we want the cache expansion to happen, so
// we need to override this.
skipFirstRunExperience = false;
}
var dotnetFirstRunConfiguration = new DotnetFirstRunConfiguration(
generateAspNetCertificate,
printTelemetryMessage,
skipFirstRunExperience);
ConfigureDotNetForFirstTimeUse(
nugetCacheSentinel,
firstTimeUseNoticeSentinel,
aspNetCertificateSentinel,
toolPathSentinel,
cliFallbackFolderPathCalculator,
hasSuperUserAccess);
hasSuperUserAccess,
dotnetFirstRunConfiguration,
environmentProvider);
break;
}
@ -221,21 +239,18 @@ namespace Microsoft.DotNet.Cli
IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel,
IAspNetCertificateSentinel aspNetCertificateSentinel,
IFileSentinel toolPathSentinel,
CliFolderPathCalculator cliFolderPathCalculator,
bool hasSuperUserAccess)
bool hasSuperUserAccess,
DotnetFirstRunConfiguration dotnetFirstRunConfiguration,
IEnvironmentProvider environmentProvider)
{
var environmentProvider = new EnvironmentProvider();
using (PerfTrace.Current.CaptureTiming())
{
var nugetPackagesArchiver = new NuGetPackagesArchiver();
var environmentPath =
EnvironmentPathFactory.CreateEnvironmentPath(cliFolderPathCalculator, hasSuperUserAccess, environmentProvider);
var environmentPath = EnvironmentPathFactory.CreateEnvironmentPath(hasSuperUserAccess, environmentProvider);
var commandFactory = new DotNetCommandFactory(alwaysRunOutOfProc: true);
var nugetCachePrimer = new NuGetCachePrimer(
nugetPackagesArchiver,
nugetCacheSentinel,
cliFolderPathCalculator);
nugetCacheSentinel);
var aspnetCertificateGenerator = new AspNetCoreCertificateGenerator();
var dotnetConfigurer = new DotnetFirstTimeUseConfigurer(
nugetCachePrimer,
@ -244,9 +259,9 @@ namespace Microsoft.DotNet.Cli
aspNetCertificateSentinel,
aspnetCertificateGenerator,
toolPathSentinel,
environmentProvider,
dotnetFirstRunConfiguration,
Reporter.Output,
cliFolderPathCalculator.CliFallbackFolderPath,
CliFolderPathCalculator.CliFallbackFolderPath,
environmentPath);
dotnetConfigurer.Configure();

View file

@ -39,8 +39,8 @@ namespace Microsoft.DotNet.ShellShim
appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension);
}
var appHostDestinationFilePath = shimPath.Value;
var appBinaryFilePath = PathUtility.GetRelativePath(appHostDestinationFilePath, entryPoint.Value);
var appHostDestinationFilePath = Path.GetFullPath(shimPath.Value);
var appBinaryFilePath = Path.GetRelativePath(Path.GetDirectoryName(appHostDestinationFilePath), Path.GetFullPath(entryPoint.Value));
EmbedAppNameInHost.EmbedAndReturnModifiedAppHostPath(
appHostSourceFilePath: appHostSourcePath,

View file

@ -14,15 +14,9 @@ namespace Microsoft.DotNet.ShellShim
internal static class EnvironmentPathFactory
{
public static IEnvironmentPath CreateEnvironmentPath(
CliFolderPathCalculator cliFolderPathCalculator = null,
bool hasSuperUserAccess = false,
IEnvironmentProvider environmentProvider = null)
{
if (cliFolderPathCalculator == null)
{
cliFolderPathCalculator = new CliFolderPathCalculator();
}
if (environmentProvider == null)
{
environmentProvider = new EnvironmentProvider();
@ -32,14 +26,14 @@ namespace Microsoft.DotNet.ShellShim
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
environmentPath = new WindowsEnvironmentPath(
cliFolderPathCalculator.ToolsShimPath,
CliFolderPathCalculator.ToolsShimPath,
Reporter.Output,
environmentProvider);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && hasSuperUserAccess)
{
environmentPath = new LinuxEnvironmentPath(
cliFolderPathCalculator.ToolsShimPathInUnix,
CliFolderPathCalculator.ToolsShimPathInUnix,
Reporter.Output,
environmentProvider,
new FileWrapper());
@ -47,7 +41,7 @@ namespace Microsoft.DotNet.ShellShim
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && hasSuperUserAccess)
{
environmentPath = new OSXEnvironmentPath(
executablePath: cliFolderPathCalculator.ToolsShimPathInUnix,
executablePath: CliFolderPathCalculator.ToolsShimPathInUnix,
reporter: Reporter.Output,
environmentProvider: environmentProvider,
fileSystem: new FileWrapper());
@ -57,10 +51,9 @@ namespace Microsoft.DotNet.ShellShim
}
public static IEnvironmentPathInstruction CreateEnvironmentPathInstruction(
CliFolderPathCalculator cliFolderPathCalculator = null,
IEnvironmentProvider environmentProvider = null)
{
return CreateEnvironmentPath(cliFolderPathCalculator, true, environmentProvider);
return CreateEnvironmentPath(true, environmentProvider);
}
}
}

View file

@ -113,7 +113,7 @@ namespace Microsoft.DotNet.ShellShim
foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value)))
{
var tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
_fileSystem.File.Move(file.Value, tempPath);
FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath));
files[file.Value] = tempPath;
}
}
@ -137,7 +137,7 @@ namespace Microsoft.DotNet.ShellShim
rollback: () => {
foreach (var kvp in files)
{
_fileSystem.File.Move(kvp.Value, kvp.Key);
FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(kvp.Value, kvp.Key));
}
});
}

View file

@ -15,8 +15,7 @@ namespace Microsoft.DotNet.ShellShim
private static DirectoryPath GetShimLocation()
{
var cliFolderPathCalculator = new CliFolderPathCalculator();
return new DirectoryPath(cliFolderPathCalculator.ToolsShimPath);
return new DirectoryPath(CliFolderPathCalculator.ToolsShimPath);
}
}
}

View file

@ -30,7 +30,7 @@ namespace Microsoft.DotNet.Cli.Telemetry
_hasher = hasher ?? Sha256Hasher.Hash;
_getMACAddress = getMACAddress ?? MacAddressGetter.GetMacAddress;
_dockerContainerDetector = dockerContainerDetector ?? new DockerContainerDetectorForTelemetry();
_userLevelCacheWriter = userLevelCacheWriter ?? new UserLevelCacheWriter(new CliFolderPathCalculator());
_userLevelCacheWriter = userLevelCacheWriter ?? new UserLevelCacheWriter();
}
private readonly IDockerContainerDetector _dockerContainerDetector;

View file

@ -9,7 +9,6 @@ namespace Microsoft.DotNet.ToolPackage
internal interface IProjectRestorer
{
void Restore(FilePath project,
DirectoryPath assetJsonOutput,
FilePath? nugetConfig = null,
string verbosity = null);
}

View file

@ -34,8 +34,7 @@ namespace Microsoft.DotNet.ToolPackage
private static DirectoryPath GetPackageLocation()
{
var cliFolderPathCalculator = new CliFolderPathCalculator();
return new DirectoryPath(cliFolderPathCalculator.ToolsPackagePath);
return new DirectoryPath(CliFolderPathCalculator.ToolsPackagePath);
}
}
}

View file

@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Xml.Linq;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Configurer;
using Microsoft.DotNet.Tools;
using Microsoft.Extensions.EnvironmentAbstractions;
@ -27,7 +28,7 @@ namespace Microsoft.DotNet.ToolPackage
_store = store ?? throw new ArgumentNullException(nameof(store));
_projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer));
_tempProject = tempProject;
_offlineFeed = offlineFeed ?? new DirectoryPath(new CliFolderPathCalculator().CliFallbackFolderPath);
_offlineFeed = offlineFeed ?? new DirectoryPath(CliFolderPathCalculator.CliFallbackFolderPath);
}
public IToolPackage InstallPackage(PackageId packageId,
@ -54,6 +55,7 @@ namespace Microsoft.DotNet.ToolPackage
versionRange: versionRange,
targetFramework: targetFramework ?? BundledTargetFramework.GetTargetFrameworkMoniker(),
restoreDirectory: stageDirectory,
assetJsonOutputDirectory: stageDirectory,
rootConfigDirectory: rootConfigDirectory,
additionalFeeds: additionalFeeds);
@ -61,7 +63,6 @@ namespace Microsoft.DotNet.ToolPackage
{
_projectRestorer.Restore(
tempProject,
stageDirectory,
nugetConfig,
verbosity: verbosity);
}
@ -82,7 +83,7 @@ namespace Microsoft.DotNet.ToolPackage
}
Directory.CreateDirectory(packageRootDirectory.Value);
Directory.Move(stageDirectory.Value, packageDirectory.Value);
FileAccessRetrier.RetryOnMoveAccessFailure(() => Directory.Move(stageDirectory.Value, packageDirectory.Value));
rollbackDirectory = packageDirectory.Value;
return new ToolPackageInstance(_store, packageId, version, packageDirectory);
@ -116,6 +117,7 @@ namespace Microsoft.DotNet.ToolPackage
VersionRange versionRange,
string targetFramework,
DirectoryPath restoreDirectory,
DirectoryPath assetJsonOutputDirectory,
DirectoryPath? rootConfigDirectory,
string[] additionalFeeds)
{
@ -132,7 +134,11 @@ namespace Microsoft.DotNet.ToolPackage
var tempProjectContent = new XDocument(
new XElement("Project",
new XAttribute("Sdk", "Microsoft.NET.Sdk"),
new XElement("PropertyGroup",
new XElement("MsBuildProjectExtensionsPath", assetJsonOutputDirectory.Value)), // change the output directory of asset.json
new XElement(("Import"),
new XAttribute("Project", "Sdk.props"),
new XAttribute("Sdk", "Microsoft.NET.Sdk")),
new XElement("PropertyGroup",
new XElement("TargetFramework", targetFramework),
new XElement("RestorePackagesPath", restoreDirectory.Value),
@ -148,9 +154,10 @@ namespace Microsoft.DotNet.ToolPackage
new XElement("PackageReference",
new XAttribute("Include", packageId.ToString()),
new XAttribute("Version",
versionRange?.ToString("S", new VersionRangeFormatter()) ?? "*") // nuget will restore latest stable for *
))
));
versionRange?.ToString("S", new VersionRangeFormatter()) ?? "*"))), // nuget will restore latest stable for *
new XElement(("Import"),
new XAttribute("Project", "Sdk.targets"),
new XAttribute("Sdk", "Microsoft.NET.Sdk"))));
File.WriteAllText(tempProject.Value, tempProjectContent.ToString());
return tempProject;

View file

@ -8,6 +8,7 @@ using Microsoft.Extensions.EnvironmentAbstractions;
using NuGet.ProjectModel;
using NuGet.Versioning;
using Microsoft.DotNet.Cli.Utils;
using System.Threading;
namespace Microsoft.DotNet.ToolPackage
{
@ -79,7 +80,7 @@ namespace Microsoft.DotNet.ToolPackage
// Use the staging directory for uninstall
// This prevents cross-device moves when temp is mounted to a different device
var tempPath = _store.GetRandomStagingDirectory().Value;
Directory.Move(PackageDirectory.Value, tempPath);
FileAccessRetrier.RetryOnMoveAccessFailure(() => Directory.Move(PackageDirectory.Value, tempPath));
tempPackageDirectory = tempPath;
}
@ -111,7 +112,7 @@ namespace Microsoft.DotNet.ToolPackage
if (tempPackageDirectory != null)
{
Directory.CreateDirectory(rootDirectory.Value);
Directory.Move(tempPackageDirectory, PackageDirectory.Value);
FileAccessRetrier.RetryOnMoveAccessFailure(() => Directory.Move(tempPackageDirectory, PackageDirectory.Value));
}
});
}

View file

@ -17,8 +17,9 @@ namespace Microsoft.DotNet.Cli
LocalizableStrings.NetAddCommand,
Accept.ExactlyOneArgument()
.DefaultToCurrentDirectory()
.With(name: CommonLocalizableStrings.CmdProjectFile,
description: CommonLocalizableStrings.ArgumentsProjectDescription), AddPackageParser.AddPackage(),
.With(name: CommonLocalizableStrings.ProjectArgumentName,
description: CommonLocalizableStrings.ProjectArgumentDescription),
AddPackageParser.AddPackage(),
AddProjectToProjectReferenceParser.AddProjectReference(),
CommonOptions.HelpOption());
}

View file

@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Tools.Add
protected override string CommandName => "add";
protected override string FullCommandNameLocalized => LocalizableStrings.NetAddCommand;
protected override string ArgumentName => Constants.ProjectArgumentName;
protected override string ArgumentDescriptionLocalized => CommonLocalizableStrings.ArgumentsProjectDescription;
protected override string ArgumentDescriptionLocalized => CommonLocalizableStrings.ProjectArgumentDescription;
internal override Dictionary<string, Func<AppliedOption, CommandBase>> SubCommands =>
new Dictionary<string, Func<AppliedOption, CommandBase>>

View file

@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Cli
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdFramework)
.ForwardAsSingle(o => $"--framework {o.Arguments.Single()}")),
Create.Option("-n|--no-restore ",
Create.Option("-n|--no-restore",
LocalizableStrings.CmdNoRestoreDescription),
Create.Option("-s|--source",
LocalizableStrings.CmdSourceDescription,

View file

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AppFullName" xml:space="preserve">
<value>.NET Add Package reference Command</value>
<value>Add a NuGet package reference to the project.</value>
</data>
<data name="AppDescription" xml:space="preserve">
<value>Command to add package reference</value>
@ -130,19 +130,19 @@
<value>Please specify one package reference to add.</value>
</data>
<data name="CmdFrameworkDescription" xml:space="preserve">
<value>Adds reference only when targeting a specific framework.</value>
<value>Add the reference only when targeting a specific framework.</value>
</data>
<data name="CmdNoRestoreDescription" xml:space="preserve">
<value>Adds reference without performing restore preview and compatibility check.</value>
<value>Add the reference without performing restore preview and compatibility check.</value>
</data>
<data name="CmdSourceDescription" xml:space="preserve">
<value>Specifies NuGet package sources to use during the restore.</value>
<value>The NuGet package source to use during the restore.</value>
</data>
<data name="CmdPackageDirectoryDescription" xml:space="preserve">
<value>Restores the packages to the specified directory.</value>
<value>The directory to restore packages to.</value>
</data>
<data name="CmdVersionDescription" xml:space="preserve">
<value>Version for the package to be added.</value>
<value>The version of the package to add.</value>
</data>
<data name="CmdDGFileException" xml:space="preserve">
<value>Unable to create dependency graph file for project '{0}'. Cannot add package reference.</value>
@ -160,7 +160,7 @@
<value>SOURCE</value>
</data>
<data name="CmdPackageDirectory" xml:space="preserve">
<value>PACKAGE_DIRECTORY</value>
<value>PACKAGE_DIR</value>
</data>
<data name="CmdDGFileIOException" xml:space="preserve">
<value>Unable to generate a temporary file for project '{0}'. Cannot add package reference. Please clear the temp directory and try again.</value>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">Příkaz rozhraní .NET pro přidání odkazu na balíček</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">Příkaz rozhraní .NET pro přidání odkazu na balíček</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Přidá odkaz jen v případě, že cílem je konkrétní architektura.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Přidá odkaz jen v případě, že cílem je konkrétní architektura.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Přidá odkaz bez provedení náhledu obnovení a kontroly kompatibility.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Přidá odkaz bez provedení náhledu obnovení a kontroly kompatibility.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Určuje zdroje balíčků NuGet, které se mají použít při obnovení.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Určuje zdroje balíčků NuGet, které se mají použít při obnovení.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Obnoví balíčky do zadaného adresáře.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Obnoví balíčky do zadaného adresáře.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Verze balíčku, která se má přidat.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Verze balíčku, která se má přidat.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">.NET Add-Befehl für Paketverweise</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">.NET Add-Befehl für Paketverweise</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Fügt nur bei Verwendung eines bestimmten Zielframeworks einen Verweis hinzu.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Fügt nur bei Verwendung eines bestimmten Zielframeworks einen Verweis hinzu.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Fügt ohne Durchführen einer Wiederherstellungsvorschau und einer Kompatibilitätsprüfung einen Verweis hinzu.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Fügt ohne Durchführen einer Wiederherstellungsvorschau und einer Kompatibilitätsprüfung einen Verweis hinzu.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Gibt NuGet-Paketquellen für die Wiederherstellung an.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Gibt NuGet-Paketquellen für die Wiederherstellung an.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Stellt die Pakete im angegebenen Verzeichnis wieder her.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Stellt die Pakete im angegebenen Verzeichnis wieder her.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Version für das Paket, das hinzugefügt werden soll.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Version für das Paket, das hinzugefügt werden soll.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">Comando de .NET para agregar referencia de paquete</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">Comando de .NET para agregar referencia de paquete</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Agrega una referencia solo cuando el destino es una plataforma específica.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Agrega una referencia solo cuando el destino es una plataforma específica.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Agrega una referencia sin realizar la vista previa de restauración y la comprobación de compatibilidad.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Agrega una referencia sin realizar la vista previa de restauración y la comprobación de compatibilidad.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Especifica orígenes de paquete NuGet para usar durante la restauración.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Especifica orígenes de paquete NuGet para usar durante la restauración.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Restaura los paquetes en el directorio especificado.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Restaura los paquetes en el directorio especificado.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Versión del paquete que se va a agregar.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Versión del paquete que se va a agregar.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">DIRECTORIO_DE_PAQUETE</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">DIRECTORIO_DE_PAQUETE</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="fr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">Commande Ajouter une référence de package .NET</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">Commande Ajouter une référence de package .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Ajoute une référence uniquement en cas de ciblage d'un framework spécifique.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Ajoute une référence uniquement en cas de ciblage d'un framework spécifique.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Ajoute une référence sans effectuer d'aperçu de restauration ni de vérification de compatibilité.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Ajoute une référence sans effectuer d'aperçu de restauration ni de vérification de compatibilité.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Spécifie les sources de package NuGet à utiliser durant la restauration.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Spécifie les sources de package NuGet à utiliser durant la restauration.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Restaure les packages dans le répertoire spécifié.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Restaure les packages dans le répertoire spécifié.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Version du package à ajouter.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Version du package à ajouter.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="it" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">Comando Aggiungi riferimento al pacchetto .NET</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">Comando Aggiungi riferimento al pacchetto .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Aggiunge il riferimento solo se destinato a un framework specifico.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Aggiunge il riferimento solo se destinato a un framework specifico.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Aggiunge il riferimento senza eseguire l'anteprima di restore e la verifica della compatibilità.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Aggiunge il riferimento senza eseguire l'anteprima di restore e la verifica della compatibilità.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Consente di specificare le origini pacchetto NuGet da usare durante il ripristino.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Consente di specificare le origini pacchetto NuGet da usare durante il ripristino.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Ripristina i pacchetti nella directory specificata.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Ripristina i pacchetti nella directory specificata.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Versione del pacchetto da aggiungere.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Versione del pacchetto da aggiungere.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">DIRECTORY_PACCHETTO</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">DIRECTORY_PACCHETTO</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">.NET Add Package 参照コマンド</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">.NET Add Package 参照コマンド</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">特定のフレームワークを対象とする場合にのみ参照を追加します。</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">特定のフレームワークを対象とする場合にのみ参照を追加します。</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">復元のプレビューや互換性チェックを行わずに参照を追加します。</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">復元のプレビューや互換性チェックを行わずに参照を追加します。</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">復元中に使用する NuGet パッケージ ソースを指定します。</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">復元中に使用する NuGet パッケージ ソースを指定します。</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">指定されたディレクトリにパッケージを復元します。</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">指定されたディレクトリにパッケージを復元します。</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">追加するパッケージのバージョン。</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">追加するパッケージのバージョン。</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ko" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">.NET 패키지 참조 추가 명령</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">.NET 패키지 참조 추가 명령</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">특정 프레임워크를 대상으로 지정할 때에만 참조를 추가합니다.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">특정 프레임워크를 대상으로 지정할 때에만 참조를 추가합니다.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">미리 보기 복원 및 호환성 검사를 수행하지 않고 참조를 추가합니다.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">미리 보기 복원 및 호환성 검사를 수행하지 않고 참조를 추가합니다.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">복원 중 사용할 NuGet 패키지 소스를 지정합니다.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">복원 중 사용할 NuGet 패키지 소스를 지정합니다.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">패키지를 지정된 디렉터리에 복원합니다.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">패키지를 지정된 디렉터리에 복원합니다.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">추가할 패키지의 버전입니다.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">추가할 패키지의 버전입니다.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="pl" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">Polecenie dodawania odwołania do pakietu platformy .NET</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">Polecenie dodawania odwołania do pakietu platformy .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Dodaje odwołanie tylko w przypadku określenia konkretnej platformy docelowej.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Dodaje odwołanie tylko w przypadku określenia konkretnej platformy docelowej.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Dodaje odwołanie bez tworzenia podglądu przywracania i sprawdzania zgodności.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Dodaje odwołanie bez tworzenia podglądu przywracania i sprawdzania zgodności.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Określa źródła pakietów NuGet podczas przywracania.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Określa źródła pakietów NuGet podczas przywracania.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Przywraca pakiety do określonego katalogu.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Przywraca pakiety do określonego katalogu.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Wersja pakietu do dodania.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Wersja pakietu do dodania.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">KATALOG_PAKIETU</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">KATALOG_PAKIETU</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">Comando de adicionar referência do pacote do .NET</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">Comando de adicionar referência do pacote do .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Adiciona referência apenas ao definir uma estrutura específica como destino.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Adiciona referência apenas ao definir uma estrutura específica como destino.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Adiciona referência sem executar a visualização da restauração e a verificação de compatibilidade.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Adiciona referência sem executar a visualização da restauração e a verificação de compatibilidade.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Especifica as fontes de pacote NuGet a serem usadas durante a restauração.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Especifica as fontes de pacote NuGet a serem usadas durante a restauração.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Restaura os pacotes para o diretório especificado.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Restaura os pacotes para o diretório especificado.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Versão do pacote a ser adicionada.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Versão do pacote a ser adicionada.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ru" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">Команда добавления ссылки на пакет .NET</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">Команда добавления ссылки на пакет .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Добавляет ссылку только при выборе конкретной целевой платформы.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Добавляет ссылку только при выборе конкретной целевой платформы.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Добавляет ссылку без предварительной проверки восстановления и совместимости.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Добавляет ссылку без предварительной проверки восстановления и совместимости.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Указывает источники пакетов NuGet, используемые во время восстановления.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Указывает источники пакетов NuGet, используемые во время восстановления.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Восстанавливает пакеты в указанном каталоге.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Восстанавливает пакеты в указанном каталоге.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Версия добавляемого пакета.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Версия добавляемого пакета.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">.NET Paket Başvurusu Ekleme Komutu</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">.NET Paket Başvurusu Ekleme Komutu</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">Yalnızca belirli bir çerçeveyi hedeflerken başvuru ekler.</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Yalnızca belirli bir çerçeveyi hedeflerken başvuru ekler.</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">Geri yükleme önizlemesi ve uyumluluk denetimi gerçekleştirmeden başvuru ekler.</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">Geri yükleme önizlemesi ve uyumluluk denetimi gerçekleştirmeden başvuru ekler.</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">Geri yükleme sırasında kullanılacak NuGet paketi kaynaklarını belirtir.</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">Geri yükleme sırasında kullanılacak NuGet paketi kaynaklarını belirtir.</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">Paketleri belirtilen dizine geri yükler.</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">Paketleri belirtilen dizine geri yükler.</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">Eklenecek paketin sürümü.</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">Eklenecek paketin sürümü.</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">.NET 添加包引用命令</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">.NET 添加包引用命令</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">仅针对特定框架添加引用。</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">仅针对特定框架添加引用。</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">在没有执行还原预览和兼容性检查的情况下添加引用。</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">在没有执行还原预览和兼容性检查的情况下添加引用。</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">使用还原期间所用的特定 NuGet 包源。</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">使用还原期间所用的特定 NuGet 包源。</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">将包还原到指定目录。</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">将包还原到指定目录。</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">要添加的包的版本。</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">要添加的包的版本。</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Package reference Command</source>
<target state="translated">.NET 新增套件參考命令</target>
<source>Add a NuGet package reference to the project.</source>
<target state="needs-review-translation">.NET 新增套件參考命令</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -18,28 +18,28 @@
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Adds reference only when targeting a specific framework.</source>
<target state="translated">只有在以特定架構為目標時才新增參考。</target>
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">只有在以特定架構為目標時才新增參考。</target>
<note />
</trans-unit>
<trans-unit id="CmdNoRestoreDescription">
<source>Adds reference without performing restore preview and compatibility check.</source>
<target state="translated">無須執行還原預覽及相容性檢查,即可新增參考。</target>
<source>Add the reference without performing restore preview and compatibility check.</source>
<target state="needs-review-translation">無須執行還原預覽及相容性檢查,即可新增參考。</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>Specifies NuGet package sources to use during the restore.</source>
<target state="translated">指定在還原期間要使用的 NuGet 套件來源。</target>
<source>The NuGet package source to use during the restore.</source>
<target state="needs-review-translation">指定在還原期間要使用的 NuGet 套件來源。</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectoryDescription">
<source>Restores the packages to the specified directory.</source>
<target state="translated">將套件還原到指定目錄。</target>
<source>The directory to restore packages to.</source>
<target state="needs-review-translation">將套件還原到指定目錄。</target>
<note />
</trans-unit>
<trans-unit id="CmdVersionDescription">
<source>Version for the package to be added.</source>
<target state="translated">要新增的套件版本。</target>
<source>The version of the package to add.</source>
<target state="needs-review-translation">要新增的套件版本。</target>
<note />
</trans-unit>
<trans-unit id="CmdDGFileException">
@ -63,8 +63,8 @@
<note />
</trans-unit>
<trans-unit id="CmdPackageDirectory">
<source>PACKAGE_DIRECTORY</source>
<target state="translated">PACKAGE_DIRECTORY</target>
<source>PACKAGE_DIR</source>
<target state="needs-review-translation">PACKAGE_DIRECTORY</target>
<note />
</trans-unit>
<trans-unit id="CmdPackageDescription">

View file

@ -14,8 +14,8 @@ namespace Microsoft.DotNet.Cli
"reference",
LocalizableStrings.AppFullName,
Accept.OneOrMoreArguments()
.With(name: "args",
description: LocalizableStrings.AppHelpText),
.With(name: LocalizableStrings.ProjectPathArgumentName,
description: LocalizableStrings.ProjectPathArgumentDescription),
CommonOptions.HelpOption(),
Create.Option("-f|--framework", LocalizableStrings.CmdFrameworkDescription,
Accept.ExactlyOneArgument()

View file

@ -118,15 +118,18 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AppFullName" xml:space="preserve">
<value>.NET Add Project to Project reference Command</value>
<value>Add a project-to-project reference to the project.</value>
</data>
<data name="AppDescription" xml:space="preserve">
<value>Command to add project to project reference</value>
</data>
<data name="AppHelpText" xml:space="preserve">
<value>Project to project references to add</value>
<data name="ProjectPathArgumentName" xml:space="preserve">
<value>PROJECT_PATH</value>
</data>
<data name="ProjectPathArgumentDescription" xml:space="preserve">
<value>The paths to the projects to add as references.</value>
</data>
<data name="CmdFrameworkDescription" xml:space="preserve">
<value>Add reference only when targeting a specific framework</value>
<value>Add the reference only when targeting a specific framework.</value>
</data>
</root>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">Příkaz rozhraní .NET pro přidání odkazu mezi projekty</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">Příkaz rozhraní .NET pro přidání odkazu mezi projekty</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Příkaz pro přidání odkazu mezi projekty</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Přidávané odkazy mezi projekty</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Přidat odkaz jen v případě, že cílem je konkrétní architektura</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Přidat odkaz jen v případě, že cílem je konkrétní architektura</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">.NET-Befehl zum Hinzufügen von Projekt-zu-Projekt-Verweisen</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">.NET-Befehl zum Hinzufügen von Projekt-zu-Projekt-Verweisen</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Befehl zum Hinzufügen eines Projekt-zu-Projekt-Verweises</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Hinzuzufügender Projekt-zu-Projekt-Verweis</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Verweis nur bei Verwendung eines bestimmten Zielframeworks hinzufügen</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Verweis nur bei Verwendung eines bestimmten Zielframeworks hinzufügen</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">Comando de .NET para agregar una referencia de proyecto a proyecto</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">Comando de .NET para agregar una referencia de proyecto a proyecto</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Comando para agregar una referencia de proyecto a proyecto</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Referencias de proyecto a proyecto para agregar</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Agrega una referencia solo cuando el destino es una plataforma específica.</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Agrega una referencia solo cuando el destino es una plataforma específica.</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="fr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">Commande .NET Ajouter une référence projet à projet</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">Commande .NET Ajouter une référence projet à projet</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Commande permettant d'ajouter le projet à la référence du projet</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Références projet à projet à ajouter</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Ajouter une référence uniquement en cas de ciblage d'un framework spécifique</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Ajouter une référence uniquement en cas de ciblage d'un framework spécifique</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="it" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">Comando Aggiungi riferimento P2P (da progetto a progetto) .NET</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">Comando Aggiungi riferimento P2P (da progetto a progetto) .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Comando per aggiungere il riferimento P2P (da progetto a progetto)</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Riferimenti P2P (da progetto a progetto) da aggiungere</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Aggiunge il riferimento solo se destinato a un framework specifico</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Aggiunge il riferimento solo se destinato a un framework specifico</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">.NET Add Project to Project reference コマンド</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">.NET Add Project to Project reference コマンド</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">プロジェクト間参照を追加するコマンド</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">追加するプロジェクト間参照</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">特定のフレームワークを対象とする場合にのみ参照を追加します</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">特定のフレームワークを対象とする場合にのみ参照を追加します</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ko" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">.NET 프로젝트 간 참조 추가 명령</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">.NET 프로젝트 간 참조 추가 명령</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">프로젝트 간 참조 추가 명령</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">추가할 프로젝트 간 참조입니다.</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">특정 프레임워크를 대상으로 지정할 때에만 참조를 추가합니다.</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">특정 프레임워크를 대상으로 지정할 때에만 참조를 추가합니다.</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="pl" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">Polecenie dodawania odwołania między projektami dla platformy .NET</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">Polecenie dodawania odwołania między projektami dla platformy .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Polecenie służące do dodawania odwołania między projektami</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Odwołania między projektami, które mają zostać dodane</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Dodaje odwołanie tylko w przypadku określenia konkretnej platformy docelowej</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Dodaje odwołanie tylko w przypadku określenia konkretnej platformy docelowej</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">Comando Adicionar Referência de Projeto para Projeto do .NET</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">Comando Adicionar Referência de Projeto para Projeto do .NET</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Comando para adicionar a referência de projeto para projeto</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Referências de projeto para projeto a serem adicionadas</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Adicionar referência apenas ao definir uma estrutura específica como destino</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Adicionar referência apenas ao definir uma estrutura específica como destino</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ru" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">Команда .NET "Добавить ссылку из одного проекта на другой"</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">Команда .NET "Добавить ссылку из одного проекта на другой"</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Эта команда добавляет ссылку из одного проекта на другой</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Добавляемые ссылки проекта на проект.</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Добавлять ссылку только при выборе конкретной целевой платформы</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Добавлять ссылку только при выборе конкретной целевой платформы</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">.NET Projeden Projeye başvuru ekle Komutu</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">.NET Projeden Projeye başvuru ekle Komutu</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">Projeden Projeye başvuru ekleme komutu</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">Eklenecek olan, projeden projeye başvurular</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">Yalnızca belirli bir çerçeveyi hedeflerken başvuru ekler</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">Yalnızca belirli bir çerçeveyi hedeflerken başvuru ekler</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">.NET“添加项目到项目引用”命令</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">.NET“添加项目到项目引用”命令</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">用于添加项目到项目引用的命令</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">要添加的项目到项目引用</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">仅针对特定框架添加引用</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">仅针对特定框架添加引用</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>.NET Add Project to Project reference Command</source>
<target state="translated">.NET 新增專案對專案參考命令</target>
<source>Add a project-to-project reference to the project.</source>
<target state="needs-review-translation">.NET 新增專案對專案參考命令</target>
<note />
</trans-unit>
<trans-unit id="AppDescription">
@ -12,14 +12,19 @@
<target state="translated">用以新增專案對專案參考的命令</target>
<note />
</trans-unit>
<trans-unit id="AppHelpText">
<source>Project to project references to add</source>
<target state="translated">要新增的專案對專案參考</target>
<trans-unit id="CmdFrameworkDescription">
<source>Add the reference only when targeting a specific framework.</source>
<target state="needs-review-translation">只有在以特定架構為目標時才新增參考</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Add reference only when targeting a specific framework</source>
<target state="translated">只有在以特定架構為目標時才新增參考</target>
<trans-unit id="ProjectPathArgumentName">
<source>PROJECT_PATH</source>
<target state="new">PROJECT_PATH</target>
<note />
</trans-unit>
<trans-unit id="ProjectPathArgumentDescription">
<source>The paths to the projects to add as references.</source>
<target state="new">The paths to the projects to add as references.</target>
<note />
</trans-unit>
</body>

View file

@ -16,9 +16,8 @@ namespace Microsoft.DotNet.Cli
"build",
LocalizableStrings.AppFullName,
Accept.ZeroOrMoreArguments()
.With(name: CommonLocalizableStrings.CmdProjectFile,
description:
"The MSBuild project file to build. If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in `proj` and uses that file."),
.With(name: CommonLocalizableStrings.ProjectArgumentName,
description: CommonLocalizableStrings.ProjectArgumentDescription),
CommonOptions.HelpOption(),
Create.Option(
"-o|--output",
@ -26,9 +25,9 @@ namespace Microsoft.DotNet.Cli
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.OutputOptionName)
.ForwardAsSingle(o => $"-property:OutputPath={o.Arguments.Single()}")),
CommonOptions.FrameworkOption(),
CommonOptions.RuntimeOption(),
CommonOptions.ConfigurationOption(),
CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription),
CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription),
CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription),
CommonOptions.VersionSuffixOption(),
Create.Option(
"--no-incremental",

View file

@ -124,15 +124,24 @@
<value>.NET Builder</value>
</data>
<data name="NoDependenciesOptionDescription" xml:space="preserve">
<value>Set this flag to ignore project-to-project references and only build the root project</value>
<value>Do not build project-to-project references and only build the specified project.</value>
</data>
<data name="NoIncrementialOptionDescription" xml:space="preserve">
<value>Disables incremental build.</value>
<value>Do not use incremental building.</value>
</data>
<data name="OutputOptionDescription" xml:space="preserve">
<value>Output directory in which to place built artifacts.</value>
<value>The output directory to place built artifacts in.</value>
</data>
<data name="OutputOptionName" xml:space="preserve">
<value>OUTPUT_DIR</value>
</data>
<data name="FrameworkOptionDescription" xml:space="preserve">
<value>The target framework to build for. The target framework must also be specified in the project file.</value>
</data>
<data name="RuntimeOptionDescription" xml:space="preserve">
<value>The target runtime to build for.</value>
</data>
<data name="ConfigurationOptionDescription" xml:space="preserve">
<value>The configuration to use for building the project. The default for most projects is 'Debug'.</value>
</data>
</root>

View file

@ -13,18 +13,18 @@
<note />
</trans-unit>
<trans-unit id="NoDependenciesOptionDescription">
<source>Set this flag to ignore project-to-project references and only build the root project</source>
<target state="translated">Když nastavíte tento příznak, ignorují se odkazy mezi projekty a sestaví se jenom kořenový projekt.</target>
<source>Do not build project-to-project references and only build the specified project.</source>
<target state="needs-review-translation">Když nastavíte tento příznak, ignorují se odkazy mezi projekty a sestaví se jenom kořenový projekt.</target>
<note />
</trans-unit>
<trans-unit id="NoIncrementialOptionDescription">
<source>Disables incremental build.</source>
<target state="translated">Přírůstkové sestavení se vypne.</target>
<source>Do not use incremental building.</source>
<target state="needs-review-translation">Přírůstkové sestavení se vypne.</target>
<note />
</trans-unit>
<trans-unit id="OutputOptionDescription">
<source>Output directory in which to place built artifacts.</source>
<target state="translated">Výstupní adresář, do kterého se ukládají sestavené artefakty.</target>
<source>The output directory to place built artifacts in.</source>
<target state="needs-review-translation">Výstupní adresář, do kterého se ukládají sestavené artefakty.</target>
<note />
</trans-unit>
<trans-unit id="OutputOptionName">
@ -32,6 +32,21 @@
<target state="translated">OUTPUT_DIR</target>
<note />
</trans-unit>
<trans-unit id="FrameworkOptionDescription">
<source>The target framework to build for. The target framework must also be specified in the project file.</source>
<target state="new">The target framework to build for. The target framework must also be specified in the project file.</target>
<note />
</trans-unit>
<trans-unit id="RuntimeOptionDescription">
<source>The target runtime to build for.</source>
<target state="new">The target runtime to build for.</target>
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the project. The default for most projects is 'Debug'.</source>
<target state="new">The configuration to use for building the project. The default for most projects is 'Debug'.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

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