We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I modified the file 'utils.psm1' in the 'ps_modules' folder to allow for builds on VS2022. See comments in code below:
#Get-VSPath new code function Get-VSPath { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$Version) BEGIN { Import-Module -Name $PSScriptRoot\VSSetup\Microsoft.VisualStudio.Setup.PowerShell.dll } PROCESS { Trace-VstsEnteringInvocation $MyInvocation try { ##Added this section to cover VS2022 if ($Version -eq "17.0" -and ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[17.0,)') -and $instance.installationPath) { Write-Verbose "Using v17.0 path: $instance.installationPath" return $instance.installationPath } ##Added above section to cover VS2022 if ($Version -eq "16.0" -and ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[16.0,)') -and $instance.installationPath) { Write-Verbose "Using v16.0 path: $instance.installationPath" return $instance.installationPath } # Search for a 15.0 Willow instance. #Modified the '-Version' argument from '[15.0,16.0,)' to '[15.0,)' to prevent duplicates. if ($Version -eq "15.0" -and ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[15.0,)') -and $instance.installationPath) { Write-Verbose "Using v15.0 path: $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) { Write-Verbose "Using fallback path: $path" return $path } } finally { Trace-VstsLeavingInvocation $MyInvocation } } END { } }
The text was updated successfully, but these errors were encountered:
Can you make a PR out of it so that I can package it and redeploy?
Sorry, something went wrong.
I've created it here: #33
No branches or pull requests
I modified the file 'utils.psm1' in the 'ps_modules' folder to allow for builds on VS2022. See comments in code below:
The text was updated successfully, but these errors were encountered: