Closed RussKie closed 3 years ago
Did you try passing -all
? The product state may not be complete e.g. a reboot is required, which means the product is in an unsupported state (and why vswhere doesn't find it by default) until the machine is rebooted.
Also try without the component passed to -requires
. It's possible the component name changed, though it shouldn't have.
Did you try passing
-all
?
C:\Development\winforms>C:\Users\igveliko\.nuget\packages\vswhere\2.8.4\tools\vswhere.exe -latest -prerelease -products * -version [,17.0) -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationVersion -all
17.0.31418.319
Also try without the component passed to
-requires
.
C:\Development\winforms>C:\Users\igveliko\.nuget\packages\vswhere\2.8.4\tools\vswhere.exe -latest -prerelease -products * -version [,17.0) -property installationVersion
17.0.31418.319
. . .
The bug is in the resolution of the lower boundary, because once the lower boundary is specified this yields the expected result:
C:\Development\winforms>C:\Users\igveliko\.nuget\packages\vswhere\2.8.4\tools\vswhere.exe -latest -prerelease -products * -version [,17.0) -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationVersion
17.0.31418.319
C:\Development\winforms>C:\Users\igveliko\.nuget\packages\vswhere\2.8.4\tools\vswhere.exe -latest -prerelease -products * -version [15,17.0) -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationVersion
16.11.31418.215
Good find! That was supposed to be a supported case and I thought I had unit tests for that and similar cases. I'm hesitant to fix it, though. I worry that, despite being a bug, changing this behavior could introduce unexpected build breaks in pipelines which use vswhere, which are numerous.
We'll discuss internally. Thanks for finding this, and I'm glad you found a workaround. We will at least document that a lower bound is recommended.
Thank you for the report. After discussing internally, we decided the risk of regressions to build systems that use vswhere is too great.
As reported in https://github.com/dotnet/arcade/issues/7324.
Since I've installed Dev17 I am having troubles building C++ projects, that depend on VSWhere for location of VC 16.* toolsets.
dotnet/arcade Microsoft.DotNet.CMake.Sdk is looking for the latest installed Dev16, however the filter doesn't appear to be applied correctly:
I also tried other variants, but none yields the expected retult: