Mif's answer was a little incomplete for me. If you still have the issue, you'd might want to check if you set the correct C++
-version.
For me it specifically needed ISO C++17
because the VS default preset ISO C++14
(at least a preset in my version) does not support the required CLI-packages. Thus, still set the Runtime support to Common Language RunTime Support (/clr) and set the correct C++ Language Standard in the Configuration Properties -> General tab.
Note: As of now (October 2021) ISO C++20
is currently not supported in CLI and will also fail to find System
- I only found the 17-version to be compatible.
Since its a little easer the visual way, here the screenshots. And also don't forget Yinon_90's hint to have the version as well as dependencies installed!