From fd38ebc684a955ab477ba991a4de142e84952f93 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2020 12:45:27 +0000 Subject: [PATCH] Update dependencies from https://github.com/dotnet/arcade build 20200530.1 (#7694) Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20278.4 -> To Version 5.0.0-beta.20280.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/common/sdk-task.ps1 | 7 ++++++- eng/common/tools.ps1 | 19 ++++++++++++++++--- global.json | 2 +- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dcf52b756..2eccd67da 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -104,9 +104,9 @@ - + https://github.com/dotnet/arcade - 96c65ad967d2abbbd8e770ba752a6b64255ec669 + fef373440d604c428950236fbc2b99ce0df368a9 diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index f997be433..32ad5c7e9 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -65,8 +65,13 @@ try { if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "16.5.0-alpha" -MemberType NoteProperty } + if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { + $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true + } + if ($xcopyMSBuildToolsFolder -eq $null) { + throw 'Unable to get xcopy downloadable version of msbuild' + } - $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true $global:_MSBuildExe = "$($xcopyMSBuildToolsFolder)\MSBuild\Current\Bin\MSBuild.exe" } diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9f6e75f7e..d68684e2a 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -293,8 +293,11 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = return $global:_MSBuildExe } + $vsMinVersionReqdStr = '16.5' + $vsMinVersionReqd = [Version]::new($vsMinVersionReqdStr) + if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } - $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { '15.9' } + $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { $vsMinVersionReqdStr } $vsMinVersion = [Version]::new($vsMinVersionStr) # Try msbuild command available in the environment. @@ -327,8 +330,18 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = $xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild' $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] } else { - $vsMajorVersion = $vsMinVersion.Major - $xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha" + #if vs version provided in global.json is incompatible then use the default version for xcopy msbuild download + if($vsMinVersion -lt $vsMinVersionReqd){ + Write-Host "Using xcopy-msbuild version of $vsMinVersionReqdStr.0-alpha since VS version $vsMinVersionStr provided in global.json is not compatible" + $vsMajorVersion = $vsMinVersionReqd.Major + $vsMinorVersion = $vsMinVersionReqd.Minor + } + else{ + $vsMajorVersion = $vsMinVersion.Major + $vsMinorVersion = $vsMinVersion.Minor + } + + $xcopyMSBuildVersion = "$vsMajorVersion.$vsMinorVersion.0-alpha" } $vsInstallDir = $null diff --git a/global.json b/global.json index 2c01cd2c6..d4e63283c 100644 --- a/global.json +++ b/global.json @@ -8,6 +8,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20278.4" + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20280.1" } }