diff --git a/Tasks/VSBuildV1/Get-VSPath.ps1 b/Tasks/VSBuildV1/Get-VSPath.ps1 index 5921d4c2fdf2..3606b6512d55 100644 --- a/Tasks/VSBuildV1/Get-VSPath.ps1 +++ b/Tasks/VSBuildV1/Get-VSPath.ps1 @@ -4,25 +4,26 @@ function Get-VSPath { [Parameter(Mandatory = $true)] [string]$Version) - $Versions = @('15.0', '16.0', '17.0') + $Versions = @('10.0', '11.0', '12.0','14.0','15.0', '16.0', '17.0') Trace-VstsEnteringInvocation $MyInvocation try { if ( !($Version -in $Versions )) { - Write-Warning "Please enter one of the versions 15.0, 16.0, 17.0" - } else { + Write-Warning "Please enter one of the versions 10.0, 11.0, 12.0, 14.0, 15.0, 16.0, 17.0" + } else { $VersionNumber = [int]$Version.Remove(2) # Search for more than 15.0 Willow instance. + if ($VersionNumber -ge 15) { if (($instance = Get-VisualStudio $VersionNumber) -and - $instance.installationPath) { - + $instance.installationPath) { return $instance.installationPath - } - + } + } + # Fallback to searching for an older install. if ($path = (Get-ItemProperty -LiteralPath "HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\$Version" -Name 'ShellFolder' -ErrorAction Ignore).ShellFolder) { - return $path + return $path } - } + } } finally { Trace-VstsLeavingInvocation $MyInvocation } diff --git a/Tasks/VSBuildV1/task.json b/Tasks/VSBuildV1/task.json index 58a12076a3c6..d0e6bd72dc70 100644 --- a/Tasks/VSBuildV1/task.json +++ b/Tasks/VSBuildV1/task.json @@ -13,7 +13,7 @@ "version": { "Major": 1, "Minor": 192, - "Patch": 2 + "Patch": 3 }, "demands": [ "msbuild", diff --git a/Tasks/VSBuildV1/task.loc.json b/Tasks/VSBuildV1/task.loc.json index 40f2afd27772..dce786c90bb8 100644 --- a/Tasks/VSBuildV1/task.loc.json +++ b/Tasks/VSBuildV1/task.loc.json @@ -13,7 +13,7 @@ "version": { "Major": 1, "Minor": 192, - "Patch": 2 + "Patch": 3 }, "demands": [ "msbuild",