Trouble with running nvcc from command line

I know there are already questions related to this problem. Still I have found no solution so far.

I’m learning CUDA and I have Visual Studio 2019 (I can’t uninstall it since I need it for work) with CUDA 10.2 under Windows11 64 bit.

If I open the Visual Studio powershell prompt and run nvcc [], the result is thousands of lines with errors like this

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(399): error: class template “std::_Is_memfunptr” has already been defined

Before asking here I googled for solutions. This is the one that looked the most promising

but to no avail, since running vcvarsall.bat x64 didn’t change the situation.

Does anybody have further ideas?
Thanks in advance