Skip to content

Commit

Permalink
Find 15.2 VS (#4525)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsciple authored Jun 13, 2017
1 parent 030c1b9 commit d4d078f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
11 changes: 4 additions & 7 deletions Tasks/Common/MSBuildHelpers/PathFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,13 @@ function Get-VisualStudio_15_0 {
try {
if (!$script:visualStudioCache.ContainsKey('15.0')) {
try {
# Query for the latest 15.0.* version.
# Query for the latest 15.* version.
#
# Note, even though VS 15 Update 1 is sometimes referred to as "15.1", the actual installation
# version number is 15.0.26403.7.
#
# Also note, the capability is registered as VisualStudio_15.0, so the following code should
# query for 15.0.* versions only.
# Note, the capability is registered as VisualStudio_15.0, however the actual version
# may be something like 15.2.
Write-Verbose "Getting latest Visual Studio 15 setup instance."
$output = New-Object System.Text.StringBuilder
Invoke-VstsTool -FileName "$PSScriptRoot\vswhere.exe" -Arguments "-version [15.0,15.1) -latest -format json" -RequireExitCodeZero 2>&1 |
Invoke-VstsTool -FileName "$PSScriptRoot\vswhere.exe" -Arguments "-version [15.0,16.0) -latest -format json" -RequireExitCodeZero 2>&1 |
ForEach-Object {
if ($_ -is [System.Management.Automation.ErrorRecord]) {
Write-Verbose "STDERR: $($_.Exception.Message)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Register-Mock Invoke-VstsTool {
$script:vsCount++
"["
"]"
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,15.1) -latest -format json" -RequireExitCodeZero
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,16.0) -latest -format json" -RequireExitCodeZero
Register-Mock Invoke-VstsTool {
$script:buildToolsCount++
"["
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Register-Mock Invoke-VstsTool {
" `"installationPath`": `"path1`""
" }"
"]"
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,15.1) -latest -format json" -RequireExitCodeZero
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,16.0) -latest -format json" -RequireExitCodeZero

# Act.
$null = Get-VisualStudio_15_0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $script:buildToolsCount = 0
Register-Mock Invoke-VstsTool {
$script:vsCount++
"[]"
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,15.1) -latest -format json" -RequireExitCodeZero
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,16.0) -latest -format json" -RequireExitCodeZero
Register-Mock Invoke-VstsTool {
$script:buildToolsCount++
"["
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Register-Mock Invoke-VstsTool {
" `"installationPath`": `"some path`""
" }"
"]"
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,15.1) -latest -format json" -RequireExitCodeZero
} -- -FileName (Resolve-Path $PSScriptRoot\..\vswhere.exe).Path -Arguments "-version [15.0,16.0) -latest -format json" -RequireExitCodeZero

# Act.
$actual = Get-VisualStudio_15_0
Expand Down
2 changes: 1 addition & 1 deletion Tasks/XamarinAndroid/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 118,
"Minor": 119,
"Patch": 0
},
"demands": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/XamarinAndroid/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 118,
"Minor": 119,
"Patch": 0
},
"demands": [
Expand Down

0 comments on commit d4d078f

Please sign in to comment.