From 38f8f5b548fa20b5b906a72e870a3af18778fec2 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 21 Jun 2017 16:20:51 -0700 Subject: [PATCH 01/29] Correct usages of Write-Output with Write-Host --- scripts/dev-dotnet.ps1 | 4 ++-- scripts/obtain/dotnet-install.ps1 | 32 +++++++++++++++---------------- scripts/use-dev.ps1 | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/dev-dotnet.ps1 b/scripts/dev-dotnet.ps1 index afcfe46d5..9276b89d8 100644 --- a/scripts/dev-dotnet.ps1 +++ b/scripts/dev-dotnet.ps1 @@ -10,12 +10,12 @@ try { throw "You need to have a version of 'dotnet' on your path so we can determine the RID" } - $rid = dotnet --version | where { $_ -match "^ Runtime Id:\s*(.*)$" } | foreach { $matches[1] } + $rid = dotnet --version | where { $_ -match "^ Runtime Id:\s*(.*)$" } | foreach { $matches[1] } $stage2 = "$PSScriptRoot\..\artifacts\$rid\stage2\bin" if (Test-Path $stage2) { $env:PATH="$stage2;$env:PATH" } else { - Write-Output "You don't have a dev build in the 'artifacts\$rid\stage2' folder!" + Write-Host "You don't have a dev build in the 'artifacts\$rid\stage2' folder!" } dotnet @args diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 93d964540..5423e4f8a 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -85,7 +85,7 @@ $VersionRegEx="/\d+\.\d+[^/]+/" $OverrideNonVersionedFiles=$true function Say($str) { - Write-Output "dotnet-install: $str" + Write-Host "dotnet-install: $str" } function Say-Verbose($str) { @@ -182,7 +182,7 @@ function GetHTTPResponse([Uri] $Uri) $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler $HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{Address=$ProxyAddress;UseDefaultCredentials=$ProxyUseDefaultCredentials} $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler - } + } else { $HttpClient = New-Object System.Net.Http.HttpClient } @@ -208,7 +208,7 @@ function GetHTTPResponse([Uri] $Uri) $HttpClient.Dispose() } } - }) + }) } @@ -227,7 +227,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" } } - + $Response = GetHTTPResponse -Uri $VersionFileUrl $StringContent = $Response.Content.ReadAsStringAsync().Result @@ -262,7 +262,7 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation - + if ($SharedRuntime) { $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip" } @@ -277,7 +277,7 @@ function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$Specif function Get-LegacyDownload-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation - + if ($SharedRuntime) { $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip" } @@ -314,7 +314,7 @@ function Get-Version-Info-From-Version-File([string]$InstallRoot, [string]$Relat $VersionFile = Join-Path -Path $InstallRoot -ChildPath $RelativePathToVersionFile Say-Verbose "Local version file: $VersionFile" - + if (Test-Path $VersionFile) { $VersionText = cat $VersionFile Say-Verbose "Local version file text: $VersionText" @@ -328,7 +328,7 @@ function Get-Version-Info-From-Version-File([string]$InstallRoot, [string]$Relat function Is-Dotnet-Package-Installed([string]$InstallRoot, [string]$RelativePathToPackage, [string]$SpecificVersion) { Say-Invocation $MyInvocation - + $DotnetPackagePath = Join-Path -Path $InstallRoot -ChildPath $RelativePathToPackage | Join-Path -ChildPath $SpecificVersion Say-Verbose "Is-Dotnet-Package-Installed: Path to a package: $DotnetPackagePath" return Test-Path $DotnetPackagePath -PathType Container @@ -346,13 +346,13 @@ function Get-Path-Prefix-With-Version($path) { if ($match.Success) { return $entry.FullName.Substring(0, $match.Index + $match.Length) } - + return $null } function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([System.IO.Compression.ZipArchive]$Zip, [string]$OutPath) { Say-Invocation $MyInvocation - + $ret = @() foreach ($entry in $Zip.Entries) { $dir = Get-Path-Prefix-With-Version $entry.FullName @@ -363,12 +363,12 @@ function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([Sys } } } - + $ret = $ret | Sort-Object | Get-Unique - + $values = ($ret | foreach { "$_" }) -join ";" Say-Verbose "Directories to unpack: $values" - + return $ret } @@ -392,9 +392,9 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) { Set-Variable -Name Zip try { $Zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath) - + $DirectoriesToUnpack = Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package -Zip $Zip -OutPath $OutPath - + foreach ($entry in $Zip.Entries) { $PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) { @@ -470,7 +470,7 @@ if ($IsSdkInstalled) { New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null $installDrive = $((Get-Item $InstallRoot).PSDrive.Name); -Write-Output "${installDrive}:"; +Write-Host "${installDrive}:"; $free = Get-CimInstance -Class win32_logicaldisk | where Deviceid -eq "${installDrive}:" if ($free.Freespace / 1MB -le 100 ) { Say "There is not enough disk space on drive ${installDrive}:" diff --git a/scripts/use-dev.ps1 b/scripts/use-dev.ps1 index 1d7225bd6..acd2fff86 100644 --- a/scripts/use-dev.ps1 +++ b/scripts/use-dev.ps1 @@ -12,5 +12,5 @@ if (Test-Path $stage2) { $env:PATH="$stage2;$env:PATH" } } else { - Write-Output "You don't have a dev build in the 'artifacts\win10-x64\stage2' folder!" + Write-Host "You don't have a dev build in the 'artifacts\win10-x64\stage2' folder!" } From d308b4a7ec6f58bcbe87924c0549820c71613f29 Mon Sep 17 00:00:00 2001 From: Rick Anderson Date: Fri, 23 Jun 2017 11:51:11 -0700 Subject: [PATCH 02/29] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9d0fa0bdc..1e3660625 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,19 @@ [![.NET Slack Status](https://aspnetcoreslack.herokuapp.com/badge.svg?2)](http://tattoocoder.com/aspnet-slack-sign-up/) [![Join the chat at https://gitter.im/dotnet/cli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -This repo contains the source code for cross-platform [.NET Core](http://github.com/dotnet/core) command line toolchain. It contains the implementation of each command, the native packages for various supported platforms as well as documentation. +This repo contains the source code for cross-platform [.NET Core](http://github.com/dotnet/core) command line toolchain. It contains the implementation of each command, the native packages for various supported platforms and the documentation. Looking for V1 of the .NET Core tooling? ---------------------------------------- -If you are looking for the v1.0.1 release of the .NET Core tools (CLI, MSBuild and the new csproj), head over to https://dot.net/core and download! +If you are looking for the v1.0.1 release of the .NET Core tools (CLI, MSBuild and the new csproj), see https://dot.net/core. -> **Note:** the release/2.0.0 branch of the CLI repo is based on the upcoming v2 of .NET Core and is considered pre-release. For production-level usage, please use the +> **Note:** the release/2.0.0 branch of the CLI repo is based on the upcoming v2 of .NET Core and is considered pre-release. For production-level usage, use > v1 of the tools. Found an issue? --------------- -You can consult the [known issues page](https://github.com/dotnet/core/blob/release/2.0.0/cli/known-issues.md) to find out the current issues and to see the workarounds. +You can consult the [known issues page](https://github.com/dotnet/core/blob/release/2.0.0/cli/known-issues.md) to find out the current issues and to see workarounds. If you don't find your issue, please file one! However, given that this is a very high-frequency repo, we've setup some [basic guidelines](Documentation/project-docs/issue-filing-guide.md) to help you. Please consult those first. @@ -62,10 +62,10 @@ Installers and Binaries You can download .NET Core SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). .NET Core SDK contains both the .NET Core runtime and CLI tools. -In order to download just the .NET Core runtime without the SDK, please visit https://github.com/dotnet/core-setup#daily-builds. +In order to download the .NET Core runtime without the SDK, see https://github.com/dotnet/core-setup#daily-builds. -> **Note:** please be aware that below installers are the **latest bits**. If you -> want to install the latest released versions, please check out the [section above](#looking-for-v1-of-the-net-core-tooling). +> **Note:** The following installers are the **latest prerelease bits**. If you +> want to install the latest released versions, see the [preceding section](#looking-for-v1-of-the-net-core-tooling). | Platform | release/2.0.0
[![][version-badge]][version] | | -------- | :-------------------------------------: | From be47c19b43bdb51de9078b87d93632203e81c6cd Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 28 Jun 2017 17:25:57 -0700 Subject: [PATCH 03/29] Remove line that only writes "C:" to console output --- scripts/obtain/dotnet-install.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 5423e4f8a..d26e1e801 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -470,7 +470,6 @@ if ($IsSdkInstalled) { New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null $installDrive = $((Get-Item $InstallRoot).PSDrive.Name); -Write-Host "${installDrive}:"; $free = Get-CimInstance -Class win32_logicaldisk | where Deviceid -eq "${installDrive}:" if ($free.Freespace / 1MB -le 100 ) { Say "There is not enough disk space on drive ${installDrive}:" From bc6c795338a71bb194fd490d6cb1e235de49ab46 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 4 Aug 2017 16:28:28 -0700 Subject: [PATCH 04/29] Add prereq check for libcurl --- scripts/obtain/dotnet-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 451525269..aecede122 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -194,6 +194,7 @@ check_pre_reqs() { [ -z "$($LDCONFIG_COMMAND -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true [ -z "$($LDCONFIG_COMMAND -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && failing=true [ -z "$($LDCONFIG_COMMAND -p | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && failing=true + [ -z "$($LDCONFIG_COMMAND -p | grep -F libcurl.so)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && failing=true fi if [ "$failing" = true ]; then From 869e077388f426c056547b8e2c524b22e6625ca2 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Thu, 10 Aug 2017 08:40:02 +1000 Subject: [PATCH 05/29] Clarified the examples for the `--logger` parameter --- src/dotnet/commands/dotnet-test/LocalizableStrings.resx | 4 +++- .../commands/dotnet-test/xlf/LocalizableStrings.cs.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.de.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.es.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.fr.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.it.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.ja.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.ko.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.pl.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.ru.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.tr.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf | 6 ++++-- .../commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf | 6 ++++-- 14 files changed, 55 insertions(+), 27 deletions(-) diff --git a/src/dotnet/commands/dotnet-test/LocalizableStrings.resx b/src/dotnet/commands/dotnet-test/LocalizableStrings.resx index 1ff6b6d07..f5e00664f 100644 --- a/src/dotnet/commands/dotnet-test/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-test/LocalizableStrings.resx @@ -162,7 +162,9 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf index f5d414b52..1e5531d60 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Zadejte protokolovací nástroj pro výsledky testů. + Zadejte protokolovací nástroj pro výsledky testů. Příklad: --logger "trx[;LogFileName=<Standardně se nastaví jedinečný název souboru>]" Další informace o podpoře argumentů protokolovacího nástroje: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf index ee42ac82e..d5ebb066b 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Geben Sie eine Protokollierung für Testergebnisse an. + Geben Sie eine Protokollierung für Testergebnisse an. Beispiel: --logger "trx[;LogFileName=<Standardmäßig der eindeutige Dateiname>]" Weitere Informationen zur Unterstützung von Protokollierungsargumenten: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf index d50458ccc..b87f62a55 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Especifica un registrador para los resultados de prueba. + Especifica un registrador para los resultados de prueba. Ejemplo: --logger "trx[;LogFileName=<Adopta como valor predeterminado un nombre de archivo único>]" Más información sobre la compatibilidad con los argumentos de registrador: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf index 488c2a39a..bf51137ed 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Spécifiez un enregistreur d'événements pour les résultats des tests. + Spécifiez un enregistreur d'événements pour les résultats des tests. Exemple : --logger "trx[;LogFileName=<Nom de fichier unique par défaut>]" En savoir plus sur la prise en charge des arguments de l'enregistreur d'événements : https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf index 6baa3d8a9..1a7ccf182 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Consente di specificare un logger per i risultati dei test. + Consente di specificare un logger per i risultati dei test. Esempio: --logger "trx[;LogFileName=<l'impostazione predefinita è un nome file univoco>]" Per altre informazioni sul supporto degli argomenti del logger, vedere: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf index 18139bb2a..1bd631bee 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - テスト結果のロガーを指定します。 + テスト結果のロガーを指定します。 例: --logger "trx[;LogFileName=<Defaults to unique file name>]" ロガー引数サポートの詳細:https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf index 76e80193b..db710c722 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - 테스트 결과에 대해 로거를 지정합니다. + 테스트 결과에 대해 로거를 지정합니다. 예: --logger "trx[;LogFileName=<고유한 파일 이름을 기본값으로 설정>]" 로거 인수 지원에 대한 추가 정보: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf index eb78cae41..bf1601520 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Określ rejestrator wyników testów. + Określ rejestrator wyników testów. Przykład: --logger "trx[;LogFileName=<domyślnie jest to unikatowa nazwa pliku>]" Więcej informacji o obsłudze argumentów rejestratora: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf index 24ab9fbb7..09de3027c 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Especifique um agente para os resultados de teste. + Especifique um agente para os resultados de teste. Exemplo: --logger "trx[;LogFileName=<Defaults to unique file name>]" Mais informações sobre suporte a argumentos de agente: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf index 977af9974..6724d56fe 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Укажите средство ведения журнала для результатов теста. + Укажите средство ведения журнала для результатов теста. Пример: --logger "trx[;LogFileName=<по умолчанию используется уникальное имя файла>]" Дополнительные сведения о поддержке аргументов средства ведения журнала: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf index a6d961ac2..1033c1561 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - Test sonuçları için bir günlükçü belirtin. + Test sonuçları için bir günlükçü belirtin. Örnek: --logger "trx[;LogFileName=<Varsayılan olarak benzersiz dosya adı kullanılır>]" Günlükçü bağımsız değişkenleri desteği hakkında daha fazla bilgi: https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf index 0f365ad49..9c33c6898 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - 指定测试结果的记录器。 + 指定测试结果的记录器。 示例: --logger "trx[;LogFileName=<Defaults to unique file name>]" 有关记录器参数的详细信息,请访问 support:https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf index e3af79f81..a88c67078 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf @@ -73,9 +73,11 @@ Specify a logger for test results. - Example: --logger "trx[;LogFileName=<Defaults to unique file name>]" + Examples: + Log in trx format using a unqiue file name: --logger trx + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" More info on logger arguments support:https://aka.ms/vstest-report - 指定測試結果的記錄器。 + 指定測試結果的記錄器。 範例: --logger "trx[;LogFileName=<預設為唯一的檔案名稱>]" 記錄器引數支援的詳細資訊: https://aka.ms/vstest-report From ed2a8f4432ad3c626864f06950457dff3da334a1 Mon Sep 17 00:00:00 2001 From: Mikkel Nylander Bundgaard Date: Sun, 20 Aug 2017 00:57:32 +0200 Subject: [PATCH 06/29] Add store and help to SDK commands I've added the store command as a localizable string (the help command was already one), but I've not supplied any translations. Fixes #7432 --- src/dotnet/commands/dotnet-help/HelpUsageText.cs | 2 ++ src/dotnet/commands/dotnet-help/LocalizableStrings.resx | 3 +++ .../commands/dotnet-help/xlf/LocalizableStrings.cs.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.de.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.es.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.fr.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.it.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.ja.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.ko.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.pl.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.ru.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.tr.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf | 5 +++++ .../commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf | 5 +++++ .../GivenThatIWantToShowHelpForDotnetCommand.cs | 2 ++ 16 files changed, 72 insertions(+) diff --git a/src/dotnet/commands/dotnet-help/HelpUsageText.cs b/src/dotnet/commands/dotnet-help/HelpUsageText.cs index 68c637f06..cdf7f4ec1 100644 --- a/src/dotnet/commands/dotnet-help/HelpUsageText.cs +++ b/src/dotnet/commands/dotnet-help/HelpUsageText.cs @@ -27,6 +27,8 @@ path-to-application: nuget {LocalizableStrings.NugetDefinition} msbuild {LocalizableStrings.MsBuildDefinition} vstest {LocalizableStrings.VsTestDefinition} + store {LocalizableStrings.StoreDefinition} + help {LocalizableStrings.HelpDefinition} {LocalizableStrings.CommonOptions}: -v|--verbosity {CommonLocalizableStrings.VerbosityOptionDescription} diff --git a/src/dotnet/commands/dotnet-help/LocalizableStrings.resx b/src/dotnet/commands/dotnet-help/LocalizableStrings.resx index fc45551f1..d7832e53c 100644 --- a/src/dotnet/commands/dotnet-help/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-help/LocalizableStrings.resx @@ -180,6 +180,9 @@ Migrates a project.json based project to a msbuild based project. + + Stores the specified assemblies in the runtime package store. + Project modification commands diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf index 6f393b696..c128d9189 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf @@ -237,6 +237,11 @@ Cesta k dodatečnému souboru deps.json. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf index c4fc45cd9..cb27b9bcf 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf @@ -237,6 +237,11 @@ Pfad zur zusätzlichen "deps.json"-Datei. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf index 9a444fd47..d22aceac4 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf @@ -237,6 +237,11 @@ Ruta de acceso al archivo deps.json adicional. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf index 1e4cc5721..fb4c4902a 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf @@ -237,6 +237,11 @@ Chemin du fichier deps.json supplémentaire. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf index f5f514d04..7164b7e48 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf @@ -237,6 +237,11 @@ Percorso del file deps.json aggiuntivo. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf index fb9cf184d..aac772677 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf @@ -237,6 +237,11 @@ 追加 deps.json ファイルへのパス。 + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf index 52b75e87d..e6abdbd6c 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf @@ -237,6 +237,11 @@ 추가 deps.json 파일의 경로입니다. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf index 8c1f51326..b5c8bb72c 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf @@ -237,6 +237,11 @@ Ścieżka do dodatkowego pliku deps.json. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf index 7c293dcb9..07ceb1c39 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf @@ -237,6 +237,11 @@ Caminho para o arquivo deps.json adicional. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf index 1d6ed69d4..6008c1b9c 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf @@ -237,6 +237,11 @@ Путь к дополнительному файлу deps.json. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf index a5c9fccfc..b7ae8f19d 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf @@ -237,6 +237,11 @@ Ek deps.json dosyasının yolu. + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf index 995d7b607..93a335919 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf @@ -237,6 +237,11 @@ 其他 deps.json 文件的路径。 + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf index 31a8025f8..bf96995c0 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf @@ -237,6 +237,11 @@ 其他 deps.json 檔案的路徑。 + + Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime package store. + + \ No newline at end of file diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index b4aacb067..e91993695 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -38,6 +38,8 @@ SDK commands: nuget Provides additional NuGet commands. msbuild Runs Microsoft Build Engine (MSBuild). vstest Runs Microsoft Test Execution Command Line Tool. + store Stores the specified assemblies in the runtime package store. + help Show help. Common options: -v|--verbosity Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. From 7586ad844d6f35a103cbfdf644e5d29acca0e5fc Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 24 Aug 2017 14:06:38 -0700 Subject: [PATCH 07/29] Add -SkipNonVersionedFiles to dotnet-install.{sh,ps1} --- scripts/obtain/dotnet-install.ps1 | 8 ++++++-- scripts/obtain/dotnet-install.sh | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 427995b86..dc6a30609 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -58,6 +58,9 @@ .PARAMETER ProxyUseDefaultCredentials Default: false Use default credentials, when using proxy address. +.PARAMETER SkipNonVersionedFiles + Default: false + Skips installing non-versioned files if they already exist, such as dotnet.exe. #> [cmdletbinding()] param( @@ -71,7 +74,8 @@ param( [string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet", [string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet", [string]$ProxyAddress, - [switch]$ProxyUseDefaultCredentials + [switch]$ProxyUseDefaultCredentials, + [switch]$SkipNonVersionedFiles ) Set-StrictMode -Version Latest @@ -82,7 +86,7 @@ $BinFolderRelativePath="" # example path with regex: shared/1.0.0-beta-12345/somepath $VersionRegEx="/\d+\.\d+[^/]+/" -$OverrideNonVersionedFiles=$true +$OverrideNonVersionedFiles = !$SkipNonVersionedFiles function Say($str) { Write-Output "dotnet-install: $str" diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 451525269..5f3e1af40 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -541,7 +541,7 @@ extract_dotnet_package() { local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' find $temp_out_path -type f | grep -Eo $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false - find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path true + find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path $override_non_versioned_files rm -rf $temp_out_path @@ -687,6 +687,7 @@ uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" verbose=false shared_runtime=false runtime_id="" +override_non_versioned_files=true while [ $# -ne 0 ] do @@ -732,6 +733,10 @@ do shift runtime_id="$1" ;; + --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles) + shift + override_non_versioned_files=false + ;; -?|--?|-h|--help|-[Hh]elp) script_name="$(basename $0)" echo ".NET Tools Installer" @@ -764,6 +769,8 @@ do echo " --arch,-Architecture,-Arch" echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK." echo " -SharedRuntime" + echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." + echo " -SkipNonVersionedFiles" echo " --dry-run,-DryRun Do not perform installation. Display download link." echo " --no-path, -NoPath Do not set PATH for the current process." echo " --verbose,-Verbose Display diagnostics information." From 1156e52eb84a956f9b3ae22fbb6e5f6215258b44 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 28 Aug 2017 13:14:23 -0700 Subject: [PATCH 08/29] Update dependency version --- build/Branding.props | 4 ++-- build/DependencyVersions.props | 2 +- .../GivenAProjectToolsCommandResolver.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/Branding.props b/build/Branding.props index 6608a3ea5..c4be46ed9 100644 --- a/build/Branding.props +++ b/build/Branding.props @@ -2,8 +2,8 @@ Microsoft .NET Core SDK - 2.0.1 .NET Standard Support for Visual Studio 2015 - Microsoft .NET Core Runtime - 2.0.0 - Microsoft .NET Core Host - 2.0.0 + Microsoft .NET Core Runtime - 2.0.1 + Microsoft .NET Core Host - 2.0.1 Microsoft .NET Core Host FX Resolver - 2.0.0 Microsoft.NETCore.App diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 3eb93c2ac..9424c7232 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0 + 2.0.1-servicing-25623-05 15.3.409 2.3.2-beta1-61921-05 2.3.0-pre-20170727-1 diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs index 83a877151..7fe281b5d 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs @@ -309,7 +309,7 @@ namespace Microsoft.DotNet.Tests result.Should().NotBeNull(); - result.Args.Should().Contain("--fx-version 2.0.0"); + result.Args.Should().Contain("--fx-version 2.0.1"); } [Fact] From 8f6fd2a549196786558e9d7aaccae35681309af1 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 28 Aug 2017 15:40:35 -0700 Subject: [PATCH 09/29] Add support for CoreSetupBlobAccessToken as used in 1.X builds --- build/BundledRuntimes.props | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props index 396c9f2df..a3c20a3e9 100644 --- a/build/BundledRuntimes.props +++ b/build/BundledRuntimes.props @@ -25,6 +25,7 @@ https://dotnetcli.azureedge.net/dotnet/ + ?$(CoreSetupBlobAccessToken) $(CoreSetupBlobRootUrl)Runtime/ $(IntermediateDirectory)/coreSetupDownload/$(SharedFrameworkVersion) $(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension) @@ -52,49 +53,49 @@ <_DownloadAndExtractItem Include="CombinedSharedHostAndFrameworkArchive" Condition="!Exists('$(CombinedSharedHostAndFrameworkArchive)')"> - $(CoreSetupRootUrl)$(SharedFrameworkVersion)/$(CombinedFrameworkHostCompressedFileName) + $(CoreSetupRootUrl)$(SharedFrameworkVersion)/$(CombinedFrameworkHostCompressedFileName)$(CoreSetupBlobAccessTokenParam) $(CombinedSharedHostAndFrameworkArchive) $(SharedFrameworkPublishDirectory) <_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile" Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''"> - $(CoreSetupRootUrl)$(SharedFrameworkVersion)/$(DownloadedSharedFrameworkInstallerFileName) + $(CoreSetupRootUrl)$(SharedFrameworkVersion)/$(DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam) $(DownloadedSharedFrameworkInstallerFile) <_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile" Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''"> - $(CoreSetupRootUrl)$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName) + $(CoreSetupRootUrl)$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam) $(DownloadedSharedHostInstallerFile) <_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile" Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''"> - $(CoreSetupRootUrl)$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName) + $(CoreSetupRootUrl)$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam) $(DownloadedHostFxrInstallerFile) <_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerWixLibFile" Condition=" '$(AspNetCoreRuntimeInstallerWixLibFile)' != '' And !Exists('$(AspNetCoreRuntimeInstallerWixLibFile)')"> - $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerWixLibFileName) + $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerWixLibFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreRuntimeInstallerWixLibFile) <_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerArchiveFile" Condition="!Exists('$(AspNetCoreRuntimeInstallerArchiveFile)')"> - $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerArchiveFileName) + $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerArchiveFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreRuntimeInstallerArchiveFile) $(AspNetRuntimePackageStorePublishDirectory) <_DownloadAndExtractItem Include="AspNetCoreSharedRuntimeVersionFile" Condition="!Exists('$(AspNetCoreSharedRuntimeVersionFile)')"> - $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreSharedRuntimeVersionFileName) + $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreSharedRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreSharedRuntimeVersionFile) From 03dcd98c51f6e50b3a1b6ec04a7d8e22533971a9 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 28 Aug 2017 17:50:58 -0700 Subject: [PATCH 10/29] More CoreSetupBlobAccessToken stuff --- build/BackwardsCompatibilityRuntimes.props | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/BackwardsCompatibilityRuntimes.props b/build/BackwardsCompatibilityRuntimes.props index e63013084..9664fdadf 100644 --- a/build/BackwardsCompatibilityRuntimes.props +++ b/build/BackwardsCompatibilityRuntimes.props @@ -21,12 +21,13 @@ $(BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel)/Installers $(IntermediateDirectory)/coreSetupDownload/$(BackwardsCompatibility110SharedFrameworkVersion) $(BackwardsCompatibility110CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension) + ?$(CoreSetupBlobAccessToken) <_DownloadAndExtractItem Include="BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive" Condition="!Exists('$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)')"> - $(BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl)/$(BackwardsCompatibility110CombinedFrameworkHostCompressedFileName) + $(BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl)/$(BackwardsCompatibility110CombinedFrameworkHostCompressedFileName)$(CoreSetupBlobAccessTokenParam) $(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive) $(BackwardsCompatibleSharedFrameworksPublishDirectory) @@ -35,21 +36,21 @@ <_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile" Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile)') And '$(OSName)' != 'linux'"> - $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedFrameworkVersion)/$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName) + $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedFrameworkVersion)/$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam) $(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile) <_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedHostInstallerFile" Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedHostInstallerFile)') And '$(OSName)' != 'linux'"> - $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedHostVersion)/$(BackwardsCompatibility110DownloadedSharedHostInstallerFileName) + $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedHostVersion)/$(BackwardsCompatibility110DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam) $(BackwardsCompatibility110DownloadedSharedHostInstallerFile) <_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedHostFxrInstallerFile" Condition="!Exists('$(BackwardsCompatibility110DownloadedHostFxrInstallerFile)') And '$(OSName)' != 'linux'"> - $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110HostFxrVersion)/$(BackwardsCompatibility110DownloadedHostFxrInstallerFileName) + $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110HostFxrVersion)/$(BackwardsCompatibility110DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam) $(BackwardsCompatibility110DownloadedHostFxrInstallerFile) From bf06c22257ec244227bd01217ca5b9e8c4cce6f1 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Mon, 28 Aug 2017 21:18:43 -0700 Subject: [PATCH 11/29] Update readme to note 2.0 is released --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 75c244e01..bfd605cc9 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ This repo contains the source code for cross-platform [.NET Core](http://github. Looking for V1 of the .NET Core tooling? ---------------------------------------- -If you are looking for the v1.0.1 release of the .NET Core tools (CLI, MSBuild and the new csproj), head over to https://dot.net/core and download! +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 master branch of the CLI repo is based on the upcoming v2 of .NET Core and is considered pre-release. For production-level usage, use the -> v1 of the tools. +> **Note:** the master branch of the CLI repo is based on post-v2.0 of .NET Core and is considered pre-release. For production-level usage, use the +> v2.0 of the tools. Found an issue? --------------- From db5bbe9c7514d19dbd82dc7b946f361979afc7d3 Mon Sep 17 00:00:00 2001 From: Mikkel Nylander Bundgaard Date: Tue, 29 Aug 2017 09:49:37 +0200 Subject: [PATCH 12/29] Rename "runtime package store" to "runtime store" --- src/dotnet/commands/dotnet-help/LocalizableStrings.resx | 2 +- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf | 4 ++-- .../commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf | 4 ++-- src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf | 4 ++-- .../commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf | 4 ++-- .../commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf | 4 ++-- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/dotnet/commands/dotnet-help/LocalizableStrings.resx b/src/dotnet/commands/dotnet-help/LocalizableStrings.resx index d7832e53c..28e17697b 100644 --- a/src/dotnet/commands/dotnet-help/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-help/LocalizableStrings.resx @@ -181,7 +181,7 @@ Migrates a project.json based project to a msbuild based project. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. Project modification commands diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf index c128d9189..fe84fd587 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf index cb27b9bcf..e58a2e1d2 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf index d22aceac4..0f2649fe4 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf index fb4c4902a..015575287 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf index 7164b7e48..36d5647bf 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf index aac772677..cc2f6b0cb 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf index e6abdbd6c..9da185477 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf index b5c8bb72c..e2e6d82f6 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf index 07ceb1c39..4d431f8b5 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf index 6008c1b9c..1334e8319 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf index b7ae8f19d..a49aef24c 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf index 93a335919..bfe670ba9 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf index bf96995c0..231232fbe 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf @@ -238,8 +238,8 @@ - Stores the specified assemblies in the runtime package store. - Stores the specified assemblies in the runtime package store. + Stores the specified assemblies in the runtime store. + Stores the specified assemblies in the runtime store. From 607f72983c8c8fd6f33a7580c255c3b486c2d565 Mon Sep 17 00:00:00 2001 From: Mikkel Nylander Bundgaard Date: Tue, 29 Aug 2017 11:48:53 +0200 Subject: [PATCH 13/29] Correct unit test --- .../GivenThatIWantToShowHelpForDotnetCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index e91993695..a04148507 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -38,7 +38,7 @@ SDK commands: nuget Provides additional NuGet commands. msbuild Runs Microsoft Build Engine (MSBuild). vstest Runs Microsoft Test Execution Command Line Tool. - store Stores the specified assemblies in the runtime package store. + store Stores the specified assemblies in the runtime store. help Show help. Common options: From 79e94eb9089428d69ae57e86148509916c63a399 Mon Sep 17 00:00:00 2001 From: seancpeters Date: Tue, 29 Aug 2017 15:21:13 -0700 Subject: [PATCH 14/29] Updating new templates to 2.1.0 versions --- build/BundledTemplates.props | 6 +++--- build/DependencyVersions.props | 6 +++--- test/dotnet-new.Tests/GivenThatIWantANewApp.cs | 15 +++++++++------ .../GivenThatIWantANewAppWithSpecifiedType.cs | 9 ++++----- .../dotnet-new.Tests/NuGet.tempaspnetpatch.config | 1 + 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/build/BundledTemplates.props b/build/BundledTemplates.props index 549508206..1f1920d3f 100644 --- a/build/BundledTemplates.props +++ b/build/BundledTemplates.props @@ -2,9 +2,9 @@ - - - + + + diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 6b8943796..c3f18d0b0 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -22,9 +22,9 @@ $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) - 1.0.0-beta2-20170810-304 - 1.0.0-beta2-20170810-304 - 1.0.0-beta2-20170810-304 + 1.0.0-beta2-20170828-305 + 1.0.0-beta2-20170828-305 + 1.0.0-beta2-20170828-305 2.1.0-preview2-25616-02 2.1.0-preview2-25616-02 0.1.1-alpha-167 diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs index 7a7b37792..f8cf5c3f8 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs @@ -44,11 +44,16 @@ namespace Microsoft.DotNet.New.Tests var rootPath = TestAssets.CreateTestDirectory().FullName; var packagesDirectory = Path.Combine(rootPath, "packages"); + // For testing the 2.1 templates - some of their packages are currently only in private feeds. + var configFile = Path.Combine(rootPath, "..", "..", "..", "..", "..", "NuGet.tempaspnetpatch.config"); + // For "normal" builds, once the packages needed for 2.1 templates are in the public feeds + //var configFile = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config"); + foreach (string cSharpTemplate in cSharpTemplates) { var projectFolder = Path.Combine(rootPath, cSharpTemplate + "1"); Directory.CreateDirectory(projectFolder); - CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory); + CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory, configFile); } Directory.EnumerateFiles(packagesDirectory, $"*.nupkg", SearchOption.AllDirectories) @@ -58,19 +63,17 @@ namespace Microsoft.DotNet.New.Tests private void CreateAndRestoreNewProject( string projectType, string projectFolder, - string packagesDirectory) + string packagesDirectory, + string configFile) { - var repoRootNuGetConfig = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config"); - new NewCommand() .WithWorkingDirectory(projectFolder) .Execute($"{projectType} --debug:ephemeral-hive --no-restore") .Should().Pass(); - // https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed. new RestoreCommand() .WithWorkingDirectory(projectFolder) - .Execute($"--configfile {repoRootNuGetConfig} --packages {packagesDirectory} /p:DisableImplicitAssetTargetFallback=true") + .Execute($"--configfile {configFile} --packages {packagesDirectory}") .Should().Pass(); } diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index fc412edef..1a51710ef 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -20,9 +20,9 @@ namespace Microsoft.DotNet.New.Tests [InlineData("C#", "classlib", false, false)] [InlineData("C#", "mstest", false, false)] [InlineData("C#", "xunit", false, false)] - [InlineData("C#", "web", false, false)] - [InlineData("C#", "mvc", false, false)] - [InlineData("C#", "webapi", false, false)] + [InlineData("C#", "web", true, false)] + [InlineData("C#", "mvc", true, false)] + [InlineData("C#", "webapi", true, false)] [InlineData("C#", "angular", false, true)] [InlineData("C#", "react", false, true)] [InlineData("C#", "reactredux", false, true)] @@ -62,10 +62,9 @@ namespace Microsoft.DotNet.New.Tests Directory.CreateDirectory(Path.Combine(rootPath, "wwwroot", "dist")); } - // https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed. new TestCommand("dotnet") .WithWorkingDirectory(rootPath) - .Execute($"restore /p:DisableImplicitAssetTargetFallback=true") + .Execute($"restore") .Should().Pass(); var buildResult = new TestCommand("dotnet") diff --git a/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config b/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config index 33b9693d5..d39d7149c 100644 --- a/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config +++ b/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config @@ -5,6 +5,7 @@ + From 777631a7aac2ac8fa2c8fefc8fc358e428e4f568 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Wed, 30 Aug 2017 20:58:55 +1000 Subject: [PATCH 15/29] Fixed name of the LogFileName --- src/dotnet/commands/dotnet-test/LocalizableStrings.resx | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf | 2 +- .../commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf | 2 +- src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf | 2 +- .../commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf | 2 +- .../commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/dotnet/commands/dotnet-test/LocalizableStrings.resx b/src/dotnet/commands/dotnet-test/LocalizableStrings.resx index f5e00664f..833535b1c 100644 --- a/src/dotnet/commands/dotnet-test/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-test/LocalizableStrings.resx @@ -164,7 +164,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf index 1e5531d60..2801dcca1 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Zadejte protokolovací nástroj pro výsledky testů. Příklad: --logger "trx[;LogFileName=<Standardně se nastaví jedinečný název souboru>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf index d5ebb066b..96740ccd9 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Geben Sie eine Protokollierung für Testergebnisse an. Beispiel: --logger "trx[;LogFileName=<Standardmäßig der eindeutige Dateiname>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf index b87f62a55..0c830a72d 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Especifica un registrador para los resultados de prueba. Ejemplo: --logger "trx[;LogFileName=<Adopta como valor predeterminado un nombre de archivo único>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf index bf51137ed..82fcdbda5 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Spécifiez un enregistreur d'événements pour les résultats des tests. Exemple : --logger "trx[;LogFileName=<Nom de fichier unique par défaut>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf index 1a7ccf182..2d92c1044 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Consente di specificare un logger per i risultati dei test. Esempio: --logger "trx[;LogFileName=<l'impostazione predefinita è un nome file univoco>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf index 1bd631bee..e9b0ea2ea 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report テスト結果のロガーを指定します。 例: --logger "trx[;LogFileName=<Defaults to unique file name>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf index db710c722..9aab393fe 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report 테스트 결과에 대해 로거를 지정합니다. 예: --logger "trx[;LogFileName=<고유한 파일 이름을 기본값으로 설정>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf index bf1601520..d19fd1419 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Określ rejestrator wyników testów. Przykład: --logger "trx[;LogFileName=<domyślnie jest to unikatowa nazwa pliku>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf index 09de3027c..89a095355 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Especifique um agente para os resultados de teste. Exemplo: --logger "trx[;LogFileName=<Defaults to unique file name>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf index 6724d56fe..bdad88eb3 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Укажите средство ведения журнала для результатов теста. Пример: --logger "trx[;LogFileName=<по умолчанию используется уникальное имя файла>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf index 1033c1561..1ec8d7f93 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report Test sonuçları için bir günlükçü belirtin. Örnek: --logger "trx[;LogFileName=<Varsayılan olarak benzersiz dosya adı kullanılır>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf index 9c33c6898..7a091b93f 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report 指定测试结果的记录器。 示例: --logger "trx[;LogFileName=<Defaults to unique file name>]" diff --git a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf index a88c67078..a88554d0d 100644 --- a/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf @@ -75,7 +75,7 @@ Specify a logger for test results. Examples: Log in trx format using a unqiue file name: --logger trx - Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.resx>" + Log in trx format using the specified file name: --logger "trx;LogFileName=<TestResults.trx>" More info on logger arguments support:https://aka.ms/vstest-report 指定測試結果的記錄器。 範例: --logger "trx[;LogFileName=<預設為唯一的檔案名稱>]" From 7f54ccb903f43cd7c8a8b774a4d3e84cecf1064a Mon Sep 17 00:00:00 2001 From: William Li Date: Wed, 9 Aug 2017 16:57:47 -0700 Subject: [PATCH 16/29] Use Rest Api to upload to the feed Add pulling logic to make sure it is uploaded to the feed. Add retry logic for the whole upload process Remove the old upload script --- Microsoft.DotNet.Cli.sln | 27 +++ build/Microsoft.DotNet.Cli.tasks | 1 + build/Test.targets | 2 + build/publish/PublishDebian.targets | 35 ++-- .../GivenActionAndRetryTimes.cs | 92 +++++++++ .../dotnet-cli-build.Tests.csproj | 22 ++ .../AddPackageStrategy.cs | 62 ++++++ .../ExponentialRetry.cs | 53 +++++ ...oAddPackageToPackageRepositoryException.cs | 24 +++ .../FileUploadStrategy.cs | 49 +++++ ...AzurelinuxRepositoryServiceHttpStrategy.cs | 15 ++ .../IdInRepositoryService.cs | 18 ++ .../LinuxPackageRepositoryDestiny.cs | 38 ++++ .../LinuxPackageRepositoryHttpPrepare.cs | 46 +++++ .../PullQueuedPackageStatus.cs | 34 +++ .../QueueResourceLocation.cs | 18 ++ .../RetryFailedException.cs | 23 +++ .../UploadToLinuxPackageRepository.cs | 108 ++++++++++ scripts/publish/repoapi_client.sh | 194 ------------------ 19 files changed, 647 insertions(+), 214 deletions(-) create mode 100644 build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs create mode 100644 build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs delete mode 100755 scripts/publish/repoapi_client.sh diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 5929564f2..2b397c406 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -227,6 +227,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_fsc", "src\tool_fsharp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.MSBuildSdkResolver", "src\Microsoft.DotNet.MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.csproj", "{FCDFAF40-CC16-4D49-96C0-E49F195E7142}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-cli-build.Tests", "build_projects\dotnet-cli-build.Tests\dotnet-cli-build.Tests.csproj", "{84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1563,6 +1565,30 @@ Global {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x64.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x64.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x86.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x86.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x86.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|Any CPU.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x64.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x64.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x86.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x86.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1633,6 +1659,7 @@ Global {08A40B6A-F695-4EA9-AC8D-CF88FADEA796} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {602976C5-2477-4B4C-AD9A-1EAFB250529A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {FCDFAF40-CC16-4D49-96C0-E49F195E7142} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5} diff --git a/build/Microsoft.DotNet.Cli.tasks b/build/Microsoft.DotNet.Cli.tasks index 901a48f84..6ada95a1c 100644 --- a/build/Microsoft.DotNet.Cli.tasks +++ b/build/Microsoft.DotNet.Cli.tasks @@ -32,6 +32,7 @@ + diff --git a/build/Test.targets b/build/Test.targets index 86cd8ea7e..9b86bcca4 100644 --- a/build/Test.targets +++ b/build/Test.targets @@ -88,6 +88,8 @@ + diff --git a/build/publish/PublishDebian.targets b/build/publish/PublishDebian.targets index 41ea7f4bd..6dd777180 100644 --- a/build/publish/PublishDebian.targets +++ b/build/publish/PublishDebian.targets @@ -6,28 +6,23 @@ $(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-$(Architecture)$(InstallerExtension) - $(SdkDebianIntermediateDirectory)/package_upload.json - 1 - - - { - "name":"$(SdkDebianPackageName)", - "version":"$(NugetVersion)-$(DebianRevisionNumber)", - "repositoryId":"$(REPO_ID)", - "sourceUrl": "$(SdkDebianUploadUrl)" - } - - - - - - + + + + + - - - - + diff --git a/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs b/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs new file mode 100644 index 000000000..47c83e0a7 --- /dev/null +++ b/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using FluentAssertions; +using Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository; +using Xunit; + +namespace dotnet_cli_build.Tests +{ + public class GivenActionAndRetryTimes + { + public static IEnumerable NoWaitTimer() + { + while (true) + { + yield return Task.CompletedTask; + } + } + + [Fact] + public void ExponentialRetryShouldProvideIntervalSequence() + { + ExponentialRetry.Intervals.First().Should().Be(TimeSpan.FromSeconds(5)); + ExponentialRetry.Intervals.Skip(1).First().Should().Be(TimeSpan.FromSeconds(10)); + ExponentialRetry.Intervals.Skip(2).First().Should().Be(TimeSpan.FromSeconds(20)); + ExponentialRetry.Intervals.Skip(3).First().Should().Be(TimeSpan.FromSeconds(40)); + ExponentialRetry.Intervals.Skip(4).First().Should().Be(TimeSpan.FromSeconds(80)); + } + + [Fact] + public void ExponentialShouldNotRetryAfterFirstSucceess() + { + var fakeAction = new FakeAction(0); + ExponentialRetry.ExecuteWithRetry( + fakeAction.Run, + s => s == "success", + 10, + NoWaitTimer).Wait(); + fakeAction.Count.Should().Be(0); + } + + [Fact] + public void ExponentialShouldRetryUntilSuccess() + { + var fakeAction = new FakeAction(5); + ExponentialRetry.ExecuteWithRetry( + fakeAction.Run, + s => s == "success", + 10, + NoWaitTimer).Wait(); + fakeAction.Count.Should().Be(5); + } + + [Fact] + public void ExponentialShouldThrowAfterMaximumAmountReached() + { + var fakeAction = new FakeAction(10); + Action a = () => ExponentialRetry.ExecuteWithRetry( + fakeAction.Run, + s => s == "success", + 5, + NoWaitTimer, + "testing retry").Wait(); + a.ShouldThrow() + .WithMessage("Retry failed for testing retry after 5 times with result: fail"); + } + } + + public class FakeAction + { + private readonly int _successAfter; + + public FakeAction(int successAfter) + { + _successAfter = successAfter; + } + + public int Count { get; private set; } + + public Task Run() + { + if (_successAfter == Count) + { + return Task.FromResult("success"); + } + + Count++; + return Task.FromResult("fail"); + } + } +} \ No newline at end of file diff --git a/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj b/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj new file mode 100644 index 000000000..e28340dda --- /dev/null +++ b/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj @@ -0,0 +1,22 @@ + + + + + $(CliTargetFramework) + 1.0.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 + false + + + + + + + + + + + + + + diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs new file mode 100644 index 000000000..cb2ec8101 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs @@ -0,0 +1,62 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using NuGet.Protocol; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class AddPackageStrategy : IAzurelinuxRepositoryServiceHttpStrategy + { + private readonly IdInRepositoryService _idInRepositoryService; + private readonly string _packageName; + private readonly string _packageVersion; + private readonly string _repositoryId; + + public AddPackageStrategy( + IdInRepositoryService idInRepositoryService, + string packageName, + string packageVersion, + string repositoryId) + { + _idInRepositoryService = idInRepositoryService + ?? throw new ArgumentNullException(nameof(idInRepositoryService)); + _packageName = packageName; + _packageVersion = packageVersion; + _repositoryId = repositoryId; + } + + public async Task Execute(HttpClient client, Uri baseAddress) + { + var debianUploadJsonContent = new Dictionary + { + ["name"] = _packageName, + ["version"] = AppendDebianRevisionNumber(_packageVersion), + ["fileId"] = _idInRepositoryService.Id, + ["repositoryId"] = _repositoryId + }.ToJson(); + var content = new StringContent(debianUploadJsonContent, + Encoding.UTF8, + "application/json"); + + using (var response = await client.PostAsync(new Uri(baseAddress, "/v1/packages"), content)) + { + if (!response.IsSuccessStatusCode) + throw new FailedToAddPackageToPackageRepositoryException( + $"request:{debianUploadJsonContent} response:{response.ToJson()}"); + return response.Headers.GetValues("Location").Single(); + } + } + + private static string AppendDebianRevisionNumber(string packageVersion) + { + return packageVersion + "-1"; + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs new file mode 100644 index 000000000..df3590940 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public static class ExponentialRetry + { + public static IEnumerable Intervals + { + get + { + var seconds = 5; + while (true) + { + yield return TimeSpan.FromSeconds(seconds); + seconds *= 2; + } + } + } + + public static async Task ExecuteWithRetry(Func> action, + Func isSuccess, + int maxRetryCount, + Func> timer, + string taskDescription = "") + { + var count = 0; + foreach (var t in timer()) + { + await t; + var result = await action(); + if (isSuccess(result)) + return; + count++; + if (count == maxRetryCount) + throw new RetryFailedException( + $"Retry failed for {taskDescription} after {count} times with result: {result}"); + } + throw new Exception("Timer should not be exhausted"); + } + + public static IEnumerable Timer(IEnumerable interval) + { + return interval.Select(Task.Delay); + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs new file mode 100644 index 000000000..68c314c08 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public class FailedToAddPackageToPackageRepositoryException : Exception + { + public FailedToAddPackageToPackageRepositoryException(string message) : base(message) + { + } + + public FailedToAddPackageToPackageRepositoryException() + { + } + + public FailedToAddPackageToPackageRepositoryException(string message, Exception innerException) : base(message, + innerException) + { + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs new file mode 100644 index 000000000..59be2c16c --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs @@ -0,0 +1,49 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Net.Http; +using System.Threading.Tasks; +using NuGet.Protocol; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class FileUploadStrategy : IAzurelinuxRepositoryServiceHttpStrategy + { + private readonly string _pathToPackageToUpload; + + public FileUploadStrategy(string pathToPackageToUpload) + { + _pathToPackageToUpload = pathToPackageToUpload + ?? throw new ArgumentNullException(nameof(pathToPackageToUpload)); + } + + public async Task Execute(HttpClient client, Uri baseAddress) + { + var fileName = Path.GetFileName(_pathToPackageToUpload); + + using (var content = + new MultipartFormDataContent()) + { + var url = new Uri(baseAddress, "/v1/files"); + content.Add( + new StreamContent( + new MemoryStream( + File.ReadAllBytes(_pathToPackageToUpload))), + "file", + fileName); + using (var message = await client.PostAsync(url, content)) + { + if (!message.IsSuccessStatusCode) + { + throw new FailedToAddPackageToPackageRepositoryException( + $"{message.ToJson()} failed to post file to {url} file name:{fileName} pathToPackageToUpload:{_pathToPackageToUpload}"); + } + return await message.Content.ReadAsStringAsync(); + } + } + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs new file mode 100644 index 000000000..a829f398a --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal interface IAzurelinuxRepositoryServiceHttpStrategy + { + Task Execute(HttpClient client, Uri baseAddress); + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs new file mode 100644 index 000000000..b51ebb3be --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class IdInRepositoryService + { + public IdInRepositoryService(string id) + { + Id = id ?? throw new ArgumentNullException(nameof(id)); + } + + public string Id { get; } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs new file mode 100644 index 000000000..aa2e6d9bc --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs @@ -0,0 +1,38 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class LinuxPackageRepositoryDestiny + { + private readonly string _password; + private readonly string _server; + private readonly string _username; + + public LinuxPackageRepositoryDestiny(string username, + string password, + string server, + string repositoryId) + { + _username = username ?? throw new ArgumentNullException(nameof(username)); + _password = password ?? throw new ArgumentNullException(nameof(password)); + _server = server ?? throw new ArgumentNullException(nameof(server)); + RepositoryId = repositoryId ?? throw new ArgumentNullException(nameof(repositoryId)); + } + + public string RepositoryId { get; } + + public Uri GetBaseAddress() + { + return new Uri($"https://{_server}"); + } + + public string GetSimpleAuth() + { + return $"{_username}:{_password}"; + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs new file mode 100644 index 000000000..7e1f9ade7 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class LinuxPackageRepositoryHttpPrepare + { + private readonly IAzurelinuxRepositoryServiceHttpStrategy _httpStrategy; + private readonly LinuxPackageRepositoryDestiny _linuxPackageRepositoryDestiny; + + public LinuxPackageRepositoryHttpPrepare( + LinuxPackageRepositoryDestiny linuxPackageRepositoryDestiny, + IAzurelinuxRepositoryServiceHttpStrategy httpStrategy + ) + { + _linuxPackageRepositoryDestiny = linuxPackageRepositoryDestiny + ?? throw new ArgumentNullException(nameof(linuxPackageRepositoryDestiny)); + _httpStrategy = httpStrategy ?? throw new ArgumentNullException(nameof(httpStrategy)); + } + + public async Task RemoteCall() + { + using (var handler = new HttpClientHandler()) + { + using (var client = new HttpClient(handler)) + { + var authHeader = + Convert.ToBase64String(Encoding.UTF8.GetBytes((string) _linuxPackageRepositoryDestiny.GetSimpleAuth())); + client.DefaultRequestHeaders.Authorization = + new AuthenticationHeaderValue("Basic", authHeader); + client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + client.Timeout = TimeSpan.FromMinutes(10); + + return await _httpStrategy.Execute(client, _linuxPackageRepositoryDestiny.GetBaseAddress()); + } + } + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs new file mode 100644 index 000000000..393a160ae --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Threading.Tasks; +using Newtonsoft.Json.Linq; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class PullQueuedPackageStatus : IAzurelinuxRepositoryServiceHttpStrategy + { + private readonly QueueResourceLocation _queueResourceLocation; + + public PullQueuedPackageStatus(QueueResourceLocation queueResourceLocation) + { + _queueResourceLocation = queueResourceLocation + ?? throw new ArgumentNullException(nameof(queueResourceLocation)); + } + + public async Task Execute(HttpClient client, Uri baseAddress) + { + using (var response = await client.GetAsync(new Uri(baseAddress, _queueResourceLocation.Location))) + { + if (!response.IsSuccessStatusCode) + throw new FailedToAddPackageToPackageRepositoryException( + "Failed to make request to " + _queueResourceLocation.Location); + var body = await response.Content.ReadAsStringAsync(); + return !body.Contains("status") ? "" : JObject.Parse(body)["status"].ToString(); + } + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs new file mode 100644 index 000000000..cbf11e48d --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class QueueResourceLocation + { + public QueueResourceLocation(string location) + { + Location = location ?? throw new ArgumentNullException(nameof(location)); + } + + public string Location { get; } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs new file mode 100644 index 000000000..b251ec4b8 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public class RetryFailedException : Exception + { + public RetryFailedException(string message) : base(message) + { + } + + public RetryFailedException() + { + } + + public RetryFailedException(string message, Exception innerException) : base(message, innerException) + { + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs new file mode 100644 index 000000000..3e14557d6 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs @@ -0,0 +1,108 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Build.Framework; +using Newtonsoft.Json.Linq; +using Task = Microsoft.Build.Utilities.Task; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public class UploadToLinuxPackageRepository : Task + { + /// + /// The Azure repository service user name. + /// + [Required] + public string Username { get; set; } + + /// + /// The Azure repository service Password. + /// + [Required] + public string Password { get; set; } + + /// + /// The Azure repository service URL ex: "tux-devrepo.corp.microsoft.com". + /// + [Required] + public string Server { get; set; } + + [Required] + public string RepositoryId { get; set; } + + [Required] + public string PathOfPackageToUpload { get; set; } + + [Required] + public string PackageNameInLinuxPackageRepository { get; set; } + + + [Required] + public string PackageVersionInLinuxPackageRepository { get; set; } + + + public override bool Execute() + { + ExecuteAsyncWithRetry().GetAwaiter().GetResult(); + return true; + } + + private async System.Threading.Tasks.Task ExecuteAsyncWithRetry() + { + await ExponentialRetry.ExecuteWithRetry( + UploadAndAddpackageAndEnsureItIsReady, + s => s == "", + maxRetryCount: 3, + timer: () => ExponentialRetry.Timer(ExponentialRetry.Intervals), + taskDescription: $"running {nameof(UploadAndAddpackageAndEnsureItIsReady)}"); + } + + private async Task UploadAndAddpackageAndEnsureItIsReady() + { + try + { + var linuxPackageRepositoryDestiny = + new LinuxPackageRepositoryDestiny(Username, Password, Server, RepositoryId); + var uploadResponse = await new LinuxPackageRepositoryHttpPrepare( + linuxPackageRepositoryDestiny, + new FileUploadStrategy(PathOfPackageToUpload)).RemoteCall(); + + var idInRepositoryService = new IdInRepositoryService(JObject.Parse(uploadResponse)["id"].ToString()); + + var addPackageResponse = await new LinuxPackageRepositoryHttpPrepare( + linuxPackageRepositoryDestiny, + new AddPackageStrategy( + idInRepositoryService, + PackageNameInLinuxPackageRepository, + PackageVersionInLinuxPackageRepository, + linuxPackageRepositoryDestiny.RepositoryId)).RemoteCall(); + + var queueResourceLocation = new QueueResourceLocation(addPackageResponse); + + Func> pullQueuedPackageStatus = new LinuxPackageRepositoryHttpPrepare( + linuxPackageRepositoryDestiny, + new PullQueuedPackageStatus(queueResourceLocation)).RemoteCall; + + await ExponentialRetry.ExecuteWithRetry( + pullQueuedPackageStatus, + s => s == "fileReady", + 5, + () => ExponentialRetry.Timer(ExponentialRetry.Intervals), + $"PullQueuedPackageStatus location: {queueResourceLocation.Location}"); + return ""; + } + catch (FailedToAddPackageToPackageRepositoryException e) + { + return e.ToString(); + } + catch (HttpRequestException e) + { + return e.ToString(); + } + } + } +} diff --git a/scripts/publish/repoapi_client.sh b/scripts/publish/repoapi_client.sh deleted file mode 100755 index 875210bff..000000000 --- a/scripts/publish/repoapi_client.sh +++ /dev/null @@ -1,194 +0,0 @@ -#!/bin/bash -# -# 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. -# - -# This is a VERY basic script for Create/Delete operations on repos and packages -# -# Environment Dependencies: -# $REPO_SERVER -# $REPO_USER -# $REPO_PASS - -cmd=$1 -urls=urls.txt -defaultPackageFile=new_package.json -defaultRepoFile=new_repo.json -repositoryId=$REPO_ID -server=$REPO_SERVER -user=$REPO_USER -pass=$REPO_PASS -protocol=https -port=443 -baseurl="$protocol://$user:$pass@$server:$port" - -echo $baseurl - -function BailIf -{ - if [ $1 -ne 0 ]; then - echo "Failure occurred communicating with $server" - exit 1 - fi -} - -# List packages, using $1 as a regex to filter results -function ListPackages -{ - curl -k "$baseurl/v1/packages" | sed 's/{/\n{/g' | egrep "$1" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' - echo "" -} - -# Create a new Repo using the specified JSON file -function AddRepo -{ - repoFile=$1 - if [ -z $repoFile ]; then - echo "Error: Must specify a JSON-formatted file. Reference $defaultRepoFile.template" - exit 1 - fi - if [ ! -f $repoFile ]; then - echo "Error: Cannot create repo - $repoFile does not exist" - exit 1 - fi - packageUrl=$(grep "url" $repoFile | head -n 1 | awk '{print $2}' | tr -d ',') - echo "Creating new repo on $server [$packageUrl]" - curl -i -k "$baseurl/v1/repositories" --data @./$repoFile -H "Content-Type: application/json" - BailIf $? - echo "" -} - -# Upload a single package using the specified JSON file -function AddPackage -{ - packageFile=$1 - if [ -z $packageFile ]; then - echo "Error: Must specify a JSON-formatted file. Reference $defaultPackageFile.template" - exit 1 - fi - if [ ! -f $packageFile ]; then - echo "Error: Cannot add package - $packageFile does not exist" - exit 1 - fi - packageUrl=$(grep "sourceUrl" $packageFile | head -n 1 | awk '{print $2}') - echo "Adding package to $server [$packageUrl]" - curl -i -k "$baseurl/v1/packages" --data @$packageFile -H "Content-Type: application/json" - BailIf $? - echo "" -} - -# Upload a single package by dynamically creating a JSON file using a provided URL -function AddPackageByUrl -{ - # Parse URL - url=$(echo "$1") - if [ -z $url ]; then - return - fi - escapedUrl=$(echo "$url" | sed 's/\//\\\//g') - set -- "$1" - oldIFS=$IFS - IFS="/"; declare -a splitUrl=($*) - index=${#splitUrl[@]} - let "index -= 1" - filename=${splitUrl[$index]} - set -- "$filename" - IFS="_"; declare -a splitFile=($*) - IFS=$oldIFS - pkgName=${splitFile[0]} - pkgVer=${splitFile[1]} - if [ -z $pkgName ] || [ -z $pkgVer ]; then - echo "ERROR parsing $url" - return - fi - # Create Package .json file - cp $defaultPackageFile.template $defaultPackageFile - sed -i "s/PACKAGENAME/$pkgName/g" $defaultPackageFile - sed -i "s/PACKAGEVERSION/$pkgVer/g" $defaultPackageFile - sed -i "s/PACKAGEURL/$escapedUrl/g" $defaultPackageFile - sed -i "s/REPOSITORYID/$repositoryId/g" $defaultPackageFile - # Test that URL is ok - wget -q --spider "$url" - if [[ $? -eq 0 ]]; then - echo "Ready to upload $pkgName [$pkgVer]" - else - echo "ERROR testing URL $url" - return - fi - # Perform Upload - AddPackage $defaultPackageFile - # Cleanup - # rm $defaultPackageFile -} - -# Upload multiple packages by reading urls line-by-line from the specified file -function AddPackages -{ - urlFile=$1 - if [ -z $urlFile ]; then - echo "Error: Must specify a flat text file containing one or more URLs" - exit 1 - fi - if [ ! -f $urlFile ]; then - echo "Error: Cannot add packages. File $urlFile does not exist" - exit 1 - fi - for url in $(cat $urlFile); do - AddPackageByUrl "$url" - sleep 5 - done -} - -# Delete the specified repo -function DeleteRepo -{ - repoId=$1 - if [ -z $repoId ]; then - echo "Error: Please specify repository ID. Run -listrepos for a list of IDs" - exit 1 - fi - curl -I -k -X DELETE "$baseurl/v1/repositories/$repoId" - BailIf $? -} - -# Delete the specified package -function DeletePackage -{ - packageId=$1 - if [ -z $packageId ]; then - echo "Error: Please specify package ID. Run -listpkgs for a list of IDs" - exit 1 - fi - echo Removing pkgId $packageId from repo $repositoryId - curl -I -k -X DELETE "$baseurl/v1/packages/$packageId" - BailIf $? -} - -if [[ "$1" == "-listrepos" ]]; then - echo "Fetching repo list from $server..." - curl -k "$baseurl/v1/repositories" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' - echo "" -elif [[ "$1" == "-listpkgs" ]]; then - echo "Fetching package list from $server" - ListPackages $2 -elif [[ "$1" == "-addrepo" ]]; then - AddRepo $2 -elif [[ "$1" == "-addpkg" ]]; then - AddPackage $2 -elif [[ "$1" == "-addpkgs" ]]; then - AddPackages $2 -elif [[ "$1" == "-delrepo" ]]; then - DeleteRepo $2 -elif [[ "$1" == "-delpkg" ]]; then - DeletePackage $2 -else - echo "USAGE: ./repotool.sh -OPTION" - echo "-listrepos: Gather a list of repos" - echo "-listpkgs: Gather a list of packages" - echo "-addrepo [FILENAME] : Create a new repo using the specified JSON file" - echo "-addpkg [FILENAME] : Add package to repo using the specified JSON file" - echo "-addpkgs [FILENAME] : Add packages to repo using urls contained in FILENAME" - echo "-delrepo REPOID : Delete the specified repo by ID" - echo "-delpkg PKGID : Delete the specified package by ID" -fi From 22e75d0eedcff516deda802335d38cb82dd69fb9 Mon Sep 17 00:00:00 2001 From: William Li Date: Tue, 29 Aug 2017 21:11:23 -0700 Subject: [PATCH 17/29] do not run dotnet-cli-build.csproj Test in build, no netcore1.3 runtime --- build/Test.targets | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/Test.targets b/build/Test.targets index 9b86bcca4..86cd8ea7e 100644 --- a/build/Test.targets +++ b/build/Test.targets @@ -88,8 +88,6 @@ - From 4771e30eff867ed2dd016ec59090b25189fc5028 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 30 Aug 2017 10:06:19 -0700 Subject: [PATCH 18/29] Remove EOL openSuSE 42.1 --- netci.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netci.groovy b/netci.groovy index f41a78758..51fe2f60e 100644 --- a/netci.groovy +++ b/netci.groovy @@ -9,7 +9,7 @@ def project = GithubProject def branch = GithubBranchName def isPR = true -def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'Ubuntu16.10:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'OpenSUSE42.1:x64:Debug'] +def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'Ubuntu16.10:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug'] def static getBuildJobName(def configuration, def os, def architecture) { return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase() From 25d5006276befaef96137e3a138bf8dc2f43a9b2 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 30 Aug 2017 10:14:54 -0700 Subject: [PATCH 19/29] Remove EOL openSuSE 42.1 --- netci.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netci.groovy b/netci.groovy index f41a78758..51fe2f60e 100644 --- a/netci.groovy +++ b/netci.groovy @@ -9,7 +9,7 @@ def project = GithubProject def branch = GithubBranchName def isPR = true -def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'Ubuntu16.10:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'OpenSUSE42.1:x64:Debug'] +def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'Ubuntu16.10:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug'] def static getBuildJobName(def configuration, def os, def architecture) { return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase() From 99489cf40265576f90b1af7650ace77a2f3ee7df Mon Sep 17 00:00:00 2001 From: seancpeters Date: Thu, 31 Aug 2017 10:49:37 -0700 Subject: [PATCH 20/29] fixed indentation on Nuget.tempaspnetpatch.config --- test/dotnet-new.Tests/NuGet.tempaspnetpatch.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config b/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config index d39d7149c..87150a28d 100644 --- a/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config +++ b/test/dotnet-new.Tests/NuGet.tempaspnetpatch.config @@ -5,7 +5,7 @@ - + From 8a150f89a372eccf65e2391d0d076a0339f03d90 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Thu, 31 Aug 2017 13:18:42 -0700 Subject: [PATCH 21/29] Miscellaneous script fixes... --- scripts/obtain/dotnet-install.ps1 | 14 +++++++------- scripts/obtain/dotnet-install.sh | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 34e7fa53a..1b8e575e0 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -264,7 +264,7 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, } } -function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) { +function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation if ($SharedRuntime) { @@ -279,7 +279,7 @@ function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$Specif return $PayloadURL } -function Get-LegacyDownload-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) { +function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation if ($SharedRuntime) { @@ -449,14 +449,14 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde $CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture $SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture -$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture if ($DryRun) { Say "Payload URLs:" Say "Primary - $DownloadLink" Say "Legacy - $LegacyDownloadLink" - Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir" + Say "Repeatable invocation: .\$($MyInvocation.Line)" exit 0 } @@ -480,7 +480,7 @@ if ($free.Freespace / 1MB -le 100 ) { exit 0 } -$ZipPath = [System.IO.Path]::GetTempFileName() +$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) Say-Verbose "Zip path: $ZipPath" Say "Downloading link: $DownloadLink" try { @@ -489,7 +489,7 @@ try { catch { Say "Cannot download: $DownloadLink" $DownloadLink = $LegacyDownloadLink - $ZipPath = [System.IO.Path]::GetTempFileName() + $ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) Say-Verbose "Legacy zip path: $ZipPath" Say "Downloading legacy link: $DownloadLink" DownloadFile -Uri $DownloadLink -OutPath $ZipPath diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index c27dd0f7d..87c34925c 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -334,6 +334,7 @@ is_dotnet_package_installed() { # azure_feed - $1 # channel - $2 # normalized_architecture - $3 +# coherent - $4 get_latest_version_info() { eval $invocation @@ -583,7 +584,7 @@ downloadcurl() { local failed=false if [ -z "$out_path" ]; then - curl --retry 10 -sSL -f --create-dirs $remote_path || failed=true + curl --retry 10 -sSL -f --create-dirs -o $remote_path || failed=true else curl --retry 10 -sSL -f --create-dirs -o $out_path $remote_path || failed=true fi @@ -601,7 +602,7 @@ downloadwget() { local failed=false if [ -z "$out_path" ]; then - wget -q --tries 10 $remote_path || failed=true + wget -q --tries 10 -O $remote_path || failed=true else wget -v --tries 10 -O $out_path $remote_path || failed=true fi From e0172b5689c98311d5b4dd8ceaf69a4904b749f1 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Thu, 31 Aug 2017 13:40:32 -0700 Subject: [PATCH 22/29] Changes per code review... --- scripts/obtain/dotnet-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 87c34925c..77b7781c2 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -584,7 +584,7 @@ downloadcurl() { local failed=false if [ -z "$out_path" ]; then - curl --retry 10 -sSL -f --create-dirs -o $remote_path || failed=true + curl --retry 10 -sSL -f --create-dirs $remote_path || failed=true else curl --retry 10 -sSL -f --create-dirs -o $out_path $remote_path || failed=true fi @@ -602,7 +602,7 @@ downloadwget() { local failed=false if [ -z "$out_path" ]; then - wget -q --tries 10 -O $remote_path || failed=true + wget -q --tries 10 -O - $remote_path || failed=true else wget -v --tries 10 -O $out_path $remote_path || failed=true fi From ffdccdfc2132ed37cc2f72c014cfb2f70ed14965 Mon Sep 17 00:00:00 2001 From: seancpeters Date: Thu, 31 Aug 2017 15:31:44 -0700 Subject: [PATCH 23/29] Re-enabling some unit tests that were skipped, but are again valid with net core 2.1 --- test/EndToEnd/GivenDotNetUsesMSBuild.cs | 2 +- test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs | 2 +- test/dotnet-new.Tests/GivenThatIWantANewApp.cs | 5 +++-- .../GivenThatIWantANewAppWithSpecifiedType.cs | 2 +- .../GivenDotnetPublishPublishesProjects.cs | 2 +- test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/EndToEnd/GivenDotNetUsesMSBuild.cs b/test/EndToEnd/GivenDotNetUsesMSBuild.cs index b0d3f1900..9c79fb94e 100644 --- a/test/EndToEnd/GivenDotNetUsesMSBuild.cs +++ b/test/EndToEnd/GivenDotNetUsesMSBuild.cs @@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd { public class GivenDotNetUsesMSBuild : TestBase { - [Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] + [Fact] public void ItCanNewRestoreBuildRunCleanMSBuildProject() { using (DisposableDirectory directory = Temp.CreateDirectory()) diff --git a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index 351e73539..fd2209bb9 100644 --- a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -85,7 +85,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests .And.HaveStdOutContaining("project.assets.json"); } - [Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] + [Fact] public void ItRunsWhenRestoringToSpecificPackageDir() { var rootPath = TestAssets.CreateTestDirectory().FullName; diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs index f8cf5c3f8..1c1988502 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs @@ -77,9 +77,10 @@ namespace Microsoft.DotNet.New.Tests .Should().Pass(); } - [Theory(Skip = "https://github.com/dotnet/cli/issues/7476")] + [Theory] [InlineData("console", "RuntimeFrameworkVersion", "microsoft.netcore.app")] - [InlineData("classlib", "NetStandardImplicitPackageVersion", "netstandard.library")] + // issue with netstandard2.0 - formerly both test cases were skipped because of: https://github.com/dotnet/cli/issues/7476 + //[InlineData("classlib", "NetStandardImplicitPackageVersion", "netstandard.library")] public void NewProjectRestoresCorrectPackageVersion(string type, string propertyName, string packageName) { var rootPath = TestAssets.CreateTestDirectory(identifier: $"_{type}").FullName; diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index 1a51710ef..b44f44555 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -27,7 +27,7 @@ namespace Microsoft.DotNet.New.Tests [InlineData("C#", "react", false, true)] [InlineData("C#", "reactredux", false, true)] [InlineData("F#", "console", false, false)] - // https://github.com/dotnet/cli/issues/7476 + // issue with netstandard2.0 --- formerly was issue with: https://github.com/dotnet/cli/issues/7476 //[InlineData("F#", "classlib", false, false)] [InlineData("F#", "mstest", false, false)] [InlineData("F#", "xunit", false, false)] diff --git a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index e13769d0e..aa705a0c2 100644 --- a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -197,7 +197,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests } } - [Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] + [Fact] public void ItPublishesAppWhenRestoringToSpecificPackageDirectory() { var rootPath = TestAssets.CreateTestDirectory().FullName; diff --git a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs index 3d58f41e5..c55c70800 100644 --- a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs +++ b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs @@ -192,7 +192,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests .And.HaveStdOutContaining("Hello World!"); } - [Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] + [Fact] public void ItRunsAppWhenRestoringToSpecificPackageDirectory() { var rootPath = TestAssets.CreateTestDirectory().FullName; From bb90633cadb24ce68c279b56ba98920618f20ae0 Mon Sep 17 00:00:00 2001 From: seancpeters Date: Thu, 31 Aug 2017 16:38:33 -0700 Subject: [PATCH 24/29] annotated the commented out test cases related to netstandard2.0 --- test/dotnet-new.Tests/GivenThatIWantANewApp.cs | 2 +- test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs index 1c1988502..a356f1eac 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs @@ -79,7 +79,7 @@ namespace Microsoft.DotNet.New.Tests [Theory] [InlineData("console", "RuntimeFrameworkVersion", "microsoft.netcore.app")] - // issue with netstandard2.0 - formerly both test cases were skipped because of: https://github.com/dotnet/cli/issues/7476 + // re-enable when this bug is resolved: https://github.com/dotnet/cli/pull/7554 //[InlineData("classlib", "NetStandardImplicitPackageVersion", "netstandard.library")] public void NewProjectRestoresCorrectPackageVersion(string type, string propertyName, string packageName) { diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index b44f44555..a8f2b9366 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -27,7 +27,7 @@ namespace Microsoft.DotNet.New.Tests [InlineData("C#", "react", false, true)] [InlineData("C#", "reactredux", false, true)] [InlineData("F#", "console", false, false)] - // issue with netstandard2.0 --- formerly was issue with: https://github.com/dotnet/cli/issues/7476 + // re-enable when this bug is resolved: https://github.com/dotnet/cli/pull/7554 //[InlineData("F#", "classlib", false, false)] [InlineData("F#", "mstest", false, false)] [InlineData("F#", "xunit", false, false)] From 7f3c93cd0ca53a9c7fe518d389d6a9672cfd10bd Mon Sep 17 00:00:00 2001 From: seancpeters Date: Thu, 31 Aug 2017 16:40:28 -0700 Subject: [PATCH 25/29] fixed the bug annotation --- test/dotnet-new.Tests/GivenThatIWantANewApp.cs | 2 +- test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs index a356f1eac..d5f80ede3 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs @@ -79,7 +79,7 @@ namespace Microsoft.DotNet.New.Tests [Theory] [InlineData("console", "RuntimeFrameworkVersion", "microsoft.netcore.app")] - // re-enable when this bug is resolved: https://github.com/dotnet/cli/pull/7554 + // re-enable when this bug is resolved: https://github.com/dotnet/cli/issues/7574 //[InlineData("classlib", "NetStandardImplicitPackageVersion", "netstandard.library")] public void NewProjectRestoresCorrectPackageVersion(string type, string propertyName, string packageName) { diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index a8f2b9366..17bed52c8 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -27,7 +27,7 @@ namespace Microsoft.DotNet.New.Tests [InlineData("C#", "react", false, true)] [InlineData("C#", "reactredux", false, true)] [InlineData("F#", "console", false, false)] - // re-enable when this bug is resolved: https://github.com/dotnet/cli/pull/7554 + // re-enable when this bug is resolved: https://github.com/dotnet/cli/issues/7574 //[InlineData("F#", "classlib", false, false)] [InlineData("F#", "mstest", false, false)] [InlineData("F#", "xunit", false, false)] From cd963e7bdb31fc8f1ca2459bcbca54b80eaace66 Mon Sep 17 00:00:00 2001 From: William Li Date: Thu, 31 Aug 2017 16:59:17 -0700 Subject: [PATCH 26/29] Remove out of support ubuntu1610 --- .../dotnet-cli-build/CheckIfAllBuildsHavePublished.cs | 1 - netci.groovy | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs index 67b3ec6fe..1dfb0b3de 100644 --- a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs +++ b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs @@ -56,7 +56,6 @@ namespace Microsoft.DotNet.Cli.Build { "rhel_7_x64", false }, { "ubuntu_14_04_x64", false }, { "ubuntu_16_04_x64", false }, - { "ubuntu_16_10_x64", false }, { "linux_x64", false } }; diff --git a/netci.groovy b/netci.groovy index 51fe2f60e..ca09235d7 100644 --- a/netci.groovy +++ b/netci.groovy @@ -9,7 +9,7 @@ def project = GithubProject def branch = GithubBranchName def isPR = true -def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'Ubuntu16.10:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug'] +def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug'] def static getBuildJobName(def configuration, def os, def architecture) { return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase() From 3514db05da57d8b6413b3d6fc5bb70e42106edeb Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Thu, 31 Aug 2017 17:09:05 -0700 Subject: [PATCH 27/29] Update shared framework dependency --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 9424c7232..53c08799b 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.1-servicing-25623-05 + 2.0.1-servicing-25630-01 15.3.409 2.3.2-beta1-61921-05 2.3.0-pre-20170727-1 From 03293f5b909d8e740bef17b1ce2a02c02e6895ee Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Thu, 31 Aug 2017 17:56:15 -0700 Subject: [PATCH 28/29] Fix test expectation for package restored n new project --- test/dotnet-new.Tests/GivenThatIWantANewApp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs index a468bd7b8..f35781afa 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs @@ -105,7 +105,7 @@ namespace Microsoft.DotNet.New.Tests var sharedFxDir = dotnetDir .GetDirectory("shared", "Microsoft.NETCore.App") .EnumerateDirectories() - .Single(d => d.Name.StartsWith("2.0.0")); + .Single(d => d.Name.StartsWith("2.0.1")); // NOTE: implicit package version will be 2.0.0 again when https://github.com/dotnet/cli/pull/7489 can be merged. if (packageName == "microsoft.netcore.app") { From 8b8aef7e4496a75a46dcefef8082e3b54b20ccca Mon Sep 17 00:00:00 2001 From: William Li Date: Thu, 31 Aug 2017 12:17:11 -0700 Subject: [PATCH 29/29] Add log to UploadToLinuxPackageRepository --- .../UploadToLinuxPackageRepository.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs index 3e14557d6..00099bd14 100644 --- a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs @@ -65,6 +65,13 @@ namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository { try { + Log.LogMessage( + MessageImportance.High, + "Begin uploading Linux Package to feed service, RepositoryId {0}, Server {1}, Package to upload {2}.", + RepositoryId, + Server, + PathOfPackageToUpload); + var linuxPackageRepositoryDestiny = new LinuxPackageRepositoryDestiny(Username, Password, Server, RepositoryId); var uploadResponse = await new LinuxPackageRepositoryHttpPrepare( @@ -93,6 +100,12 @@ namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository 5, () => ExponentialRetry.Timer(ExponentialRetry.Intervals), $"PullQueuedPackageStatus location: {queueResourceLocation.Location}"); + + Log.LogMessage( + MessageImportance.High, + "Upload to feed service is completed, queue resource location {0}", + queueResourceLocation.Location); + return ""; } catch (FailedToAddPackageToPackageRepositoryException e)