I am really curious if this is happening to anyone else and it's some bug that I have to report or if it's my configuration.
Basically I have fresh new Blank App (Universal Windows - C++/CXX) project which I am trying to build and run with C++ /std:c++20
standard. When I select this version, the building fails with
command line error D8016: '/ZW' and '/std:c++20' command-line options are incompatible
in which case I switch off /ZQ
(Consume Windows Runtime Extension). But now, when I build, I get this other error
error WMC1007: Cannot resolve 'Windows.metadata'. Please install the Windows Software Development Kit.
The Windows SDK is installed with Visual Studio.
I am using Visual Studio 2019 CE, I have updated everything from the installer, I have also checked and fixed, just in case. But I am not sure if there's any issue with the IDE because when I use /std:c++17
or lower version and /ZQ
(which is what causes the Windows.metadata error) it works.
So, this is my dilemma. Do you think I have a problem with my configuration or the c++20 standard is just bugged in VS?
My full command-line is this:
/JMC /Yu"pch.h" /MP /ifcOutput "x64\Debug\" /GS /analyze- /W3 /wd"4453" /wd"28204" /Zc:wchar_t
/I"C:\Demo\source\" /I"Generated Files\" /I"x64\Debug\" /ZW:nostdlib /ZI /Gm- /Od /sdl
/Fd"x64\Debug\vc142.pdb" /Zc:inline /fp:precise /D "_UNICODE" /D "UNICODE" /D "_DEBUG"
/D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /D "__WRL_NO_DEFAULT_LIB__" /errorReport:prompt /WX- /Zc:forScope
/RTC1 /std:c17 /Gd /Oy-
/FU"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x86\store\references\platform.winmd"
/MDd /std:c++20 /FC /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\Demo.pch" /diagnostics:column