Extend the logic from !4197 (merged) to consider VS 2022 paths too.
Fixes: #22847 (closed) Backport: release