# Can the VS 2019 generator be used if only VS2022 is installed?

**URL:** https://discourse.cmake.org/t/can-the-vs-2019-generator-be-used-if-only-vs2022-is-installed/6972
**Category:** Usage
**Tags:** os:windows, gen:vs
**Created:** [November 28, 2022, 4:10pm UTC](https://discourse.cmake.org/t/can-the-vs-2019-generator-be-used-if-only-vs2022-is-installed/6972 "2022-11-28T16:10:58Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![blackbirdsr72](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@blackbirdsr72](https://discourse.cmake.org/u/blackbirdsr72)
#### Post date: [July 28, 2025, 6:22pm UTC](https://discourse.cmake.org/t/can-the-vs-2019-generator-be-used-if-only-vs2022-is-installed/6972/4 "2025-07-28T18:22:37Z")

</div>

For anyone else who finds themselves here, baffled, replace the "-G “Visual Studio 15 2017” or -G “Visual Studio 16 2019” option with -T v142. It will say “Building for: Visual Studio 17 2022” BUT when you open the .sln file it will say “Visual Studio 2019” and the toolset will be set to 2019.

---

_[View the full topic](https://discourse.cmake.org/t/can-the-vs-2019-generator-be-used-if-only-vs2022-is-installed/6972)._
