Configuring a C++/WinRT project in Visual Studio.
- Select Tools|Nuget Package Manager|Manage Nuget Packages for Solution...
- Select Browse, search for cppwinrt and install for the project.
- Right click the project, and select Properties.
- Select All Configurations and All Platforms.
- Select C/C++, Command Line.
- Add /await /std:c++latest command line switches.
- Select C/C++, All Options.
- Set Consume Windows Runtime Extension to No.
- Select Linker, Windows Metadata.
- Set Generate Windows Metadata to No.