Simon Mourier's blog (1807 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI3, AOT, P/Invoke, COM, Interop, DirectX, Direct2D, Windows, ...
I had the same question for Visual studio 2019 (and maybe other versions), as I also needed this for talking screenshots with non-compiling code, so here is the settings (took me a while to find!), for what it's worth: