Return "empty string" if property doesnt exist on a release
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 991
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
I have a number of cmake based projects, that setup differently based on the version of VS in use.
However, in VS 2026, the property featureReleaseYear was introduced and does not exist on 2022.
In 2022, you could get the "year" via the catalog_productLineVersion, unfortunately in 2026 it now returns 18 (rather than 2026)
I also use the first section from the installationVersion property, which would return 17 or 18 (for 2022 or 2026)
One of the things I check, is to make sure that the CL and Link executables in use match the generator selected. When they dont, it typically means I launched the wrong development shell.
I also check that the CMake generator is correct "Visual Studio ${installVersion} ${catalog_productLineVersion}"
Unfortunately, since productLineVersion return 18 and not 2026, and featureReleaseYear doesnt return anything for 2022, it will now take custom logic to validate the cmake generator.
One of two things would be great.
Simplest, if the property doesnt exist on a release, just print an empty string
in my case
vswhere -property catalog_featureReleaseYear -format text catalog_featureReleaseYear: catalog_featureReleaseYear: 2026
The same for the other formats.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how vswhere handles the catalog_featureReleaseYear property and how property output is rendered for text and the other requested formats. Reproduce the missing-property case on a Visual Studio 2022 installation and verify that each format emits an empty value while retaining the existing value for Visual Studio 2026.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100