-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
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
vswhere could not detect VS2022 #301
Comments
Do you have a preview installed? You need to pass |
I don't have preview installed. I checked the state, it is not in bad state. |
Please paste the output of Also, you're missing a $vswhere = "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" Note also that it doesn't exist if VS isn't installed, so you may want to pull it down via nuget e.g., |
Did you fix the line that should be: $vswhere = "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
write-host "$vswhere" And check that |
You also need to specify you want only the
You're passing a bunch of output to the installer so it's erring. You should be checking for errors as well in your script. vswhere appears to be working fine given your previous screenshot. |
When I am running the below script in the PowerShell, vswhere is not able to detect Visual Studio 2022, Visual Studio is not updating.
$vswhereResult = & $vswhere -latest -product *
if ($vswhereResult){
$vsLayoutPath = "\server\share\VSlayoutdirectory"
& "$vsLayoutPath\vs_professional.exe" --quiet --update --wait --offline
& "$vsLayoutPath\vs_professional.exe" update --installPath "vswhereResult" --noWeb --wait --quiet --norestart
} else {
Write-Host "Visual Studio not found"
}
The text was updated successfully, but these errors were encountered: