Regarding vcvars.bat, I'm still a fan of letting the user set that <i>before</i> calling into the build system. I specifically <i>don't</i> want random projects trying to find random toolchains in random ways. The new toolchain file sounds like a great development in that space.<p>Without CMake, from powershell, you can do something like `& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -VsInstallationPath:"C:\Program Files\Microsoft Visual Studio\2022\Community" -Arch:amd64 -HostArch:amd64 -SkipAutomaticLocation` and it works well enough. I usually provide that oneliner as a vs2022ce-x64-x64.ps1 script, and just note in the README that users can adapt it to their system/needs.<p>Also of note is the amazing portable-msvc.py by the one and only Mārtiņš Možeiko : <a href="https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cde9977" rel="nofollow noreferrer">https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cd...</a><p>It downloads the compiler toolchain and nothing more, and writes a setup.bat with no conditional logic. It was trivial for me to adapt to write a setup.ps1 also. Compare the size of the result, vs my attempt to have a minimal toolchain using the Visual Studio Installer.<p><pre><code> 1.3G msvc
4.2G C:/Program Files/Microsoft Visual Studio/2022/Community
</code></pre>
You don't get the debugger, profiler, etc., of course, but I use other tools for that stuff anyway (and they don't require an additional 3G).<p>I don't recommend projects to use it directly, it's just an excellent resource to point people towards.