I am trying to install Node JS and as of writing this, chocolatey still defaults to Visual Studio 2019 build tools.
I want to ask if it is possible via any simple method to use the VS 2022 build tools instead of the 2019 ones, since they are quite old now.
I tried to install Node JS latest and wanted an option to use the VS 2022 build tools instead of 2019.
It looks like Node.js is opting to install the visualstudio2019-workload-vctools package. Given you've now got Chocolatey CLI installed, you can use it to also install the visualstudio2022-workload-vctools package like this from an elevate command prompt:
If you want to get rid of the 2019 tools, you can do that via Chocolatey as well:
Note, there may be a reason Node.js is still installing the older tools. If needed you can always uninstall the 2022 version and re-install 2019 (just swap around the commands above as required.)