我在Windows 10Home Version 10.0.16299 32位,Windows SDK版本10.0.17134.12和C++/WinRT版本1.0.180505.2上使用Visual Studio Community 2017 Version 15.7.1。当我尝试使用任何 C++/WinRT 模板创建新项目时,我收到以下错误消息:
Error: this template attempted to load component assembly
'Microsoft.VisualStudio.Universal.TemplateWizards, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. For more
information on this problem and how to enable this template,
please see documentation on Customizing Project Templates.
有没有一个简单的解决这个问题的方法?
此错误是由缺少 UWP SDK 引起的。我第一次安装Visual Studio时仅针对Desktop development with C++
工作负载进行了配置,因此缺少UWP development
工作负载组件。我使用 Visual Studio Installer 添加了UWP development
工作负载。
此错误是由于缺少 UWP 工具而出现的。对于Visual Studio 2019,您只需转到Extensions>Manage Extensions>Online并搜索" UWP Essentials">,然后免费下载。关闭所有Visual Studio窗口,然后再次打开它时,问题应该得到解决。
解决此问题的最简单方法是安装整个 UWP 软件包。 它包含很多内容,但它为您提供了解决问题的一切。 转到联机>>扩展和更新的工具",搜索"UWP Essentials",然后使用 Visual Studio 安装程序获取它。