Closed gorlak closed 2 years ago
Can you output all the text for VS2022 and paste it here?
Here you go vswhere.txt
🤔 : isPrerelease: 0
Actually, the bigger problem here seems to be why VS2019 was chosen for -latest
over VS2022. In your first example, you added -latest
and only one instance will show up. If you exclude that, I imagine VS2022 shows up. Correct?
Can you download and try the latest release to see if that still happens there?
Ah, actually yes:
>"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
C:\Program Files\Microsoft Visual Studio\2022\Professional
Actually, I think I wasn't clear on how -latest
was intended to work. This wasn't working, and I added latest thinking perhaps vswhere was filtering out 2022 since it was just released. Perhaps it wasn't listed because the installer was install 7.0.2, and it was in pending reboot state or something.
So it seems to be a "latest version sorting" issue of some sort, then?
Wait, what the hell, it works now:
>"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
C:\Program Files\Microsoft Visual Studio\2022\Professional
That's... strange. 🤔
I'm going to assume this was a 17.0.1 and lower defect that was fixed w/ reboot after installing 17.0.2
If a reboot was pending for VS2022, it would not be included by default because the product is not in a supported state. Your text output didn't indicate that (there is a state vswhere checks), but if you took that after a reboot, that would be why.
For more information about -latest
and other switches, run vswhere with -help
.
Similar to #249, but now vs2022 is released, and the release version is installed (17.0.2 at the time of this writing), the -prerelease flag is still required: