From 40549c3585c94aa4efee3de9ce257a9768954deb Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 5 Nov 2020 16:34:51 -0800 Subject: [PATCH] Add .NET install workaround for RTM (#13991) --- tools/releaseBuild/azureDevOps/templates/nuget.yml | 10 +++++++++- .../azureDevOps/templates/release-GlobalToolTest.yml | 3 ++- .../azureDevOps/templates/release-SDKTests.yml | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/releaseBuild/azureDevOps/templates/nuget.yml b/tools/releaseBuild/azureDevOps/templates/nuget.yml index f2bcf49864..d18dfb0e97 100644 --- a/tools/releaseBuild/azureDevOps/templates/nuget.yml +++ b/tools/releaseBuild/azureDevOps/templates/nuget.yml @@ -34,6 +34,13 @@ jobs: displayName: 'Use .NET Core SDK from global.json' inputs: version: '$(SDKVersion)' + condition: ne(variables['SDKVersion'], '5.0.100') + + - pwsh: | + Import-Module "$(Build.SourcesDirectory)/build.psm1" -Force + Install-Dotnet -Version '5.0.100-rtm.20526.5' + displayName: Install-DotNet + condition: eq(variables['SDKVersion'], '5.0.100') - task: DownloadBuildArtifacts@0 displayName: 'Download PowerShell build artifacts' @@ -92,6 +99,7 @@ jobs: - powershell: | Import-Module $env:BUILD_SOURCESDIRECTORY\build.psm1 Import-Module $env:BUILD_SOURCESDIRECTORY\tools\packaging + Find-Dotnet New-ILNugetPackage -PackagePath "$(PackagePath)" -PackageVersion "$(Version)" -WinFxdBinPath '$(winFxdPath)' -LinuxFxdBinPath '$(linuxFxdPath)' -GenAPIToolPath "$(GenAPIToolPath)" displayName: 'Create Nuget Package Folders' @@ -104,7 +112,7 @@ jobs: - powershell: | Import-Module $env:BUILD_SOURCESDIRECTORY\build.psm1 Import-Module $env:BUILD_SOURCESDIRECTORY\tools\packaging - + Find-Dotnet # Create unified package first New-GlobalToolNupkg -UnifiedPackage -LinuxBinPath "$(linuxFxdPath)" -WindowsBinPath "$(winFxdPath)" -WindowsDesktopBinPath "$(winFxdWinDesktopPath)" -PackageVersion "$(Version)" -DestinationPath "$(PackagePath)\globaltool" diff --git a/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml b/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml index a1169070a9..2eb4fd9276 100644 --- a/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml +++ b/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml @@ -53,7 +53,8 @@ jobs: ## Install latest version from the channel - Install-Dotnet -Channel "$Channel" -Version $sdkVersion + #Install-Dotnet -Channel "$Channel" -Version $sdkVersion + Start-PSBootstrap Write-Verbose -Message "Installing .NET SDK completed." -Verbose diff --git a/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml b/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml index c1196ee3fa..a25454481d 100644 --- a/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml +++ b/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml @@ -41,7 +41,8 @@ jobs: ## Install latest version from the channel - Install-Dotnet -Channel "$Channel" -Version $sdkVersion + #Install-Dotnet -Channel "$Channel" -Version $sdkVersion + Start-PSBootstrap Write-Verbose -Message "Installing .NET SDK completed." -Verbose