创建 UWP 应用程序时出错 [英] UWP App Error on creating

查看:33
本文介绍了创建 UWP 应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Visual Studio 创建 UWP 应用程序.我不断收到此错误消息.我能做些什么来解决这个问题吗?

I am trying to create a UWP App with visual Studio. I keep getting this error message. Is there something i can do to fix this?

推荐答案

这很可能是损坏的 Visual Studio 安装.让我们进行 Visual Studio 修复,或运行安装程序并确保更新通用 Windows 应用程序开发工具".

This is most probably a corrupted Visual Studio installation. Let's just do a Visual Studio repair, or run the installer and make sure you update the "Universal Windows App Development Tools".

更新:(如果这没有帮助)

好吧,我对此进行了更详细的研究:所以​​根本原因很可能是 Microsoft 删除了 Application Insights,但在更新期间 UWP 应用的模板文件没有更新,Application Insights 参考仍然存在.

Well, I looked into this in more detail: so the root cause is most probably that Microsoft removed Application Insights, but during an update the template file for UWP apps was not updated and the Application Insights reference is still there.

要修复它,您必须将其从 vstemplate 文件中删除.在我的机器上,文件的位置是这样的(在你的机器上应该是类似的……):

To fix it you have to remove it from the vstemplate file. On my machine the location of the file is this (should be similar on your machine…):

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\CSharp\Windows Root\Windows UAP\1033\BlankApplication\BlankApplication.vstemplate 

(现在你看到这个 vstemplate 文件是针对空白应用程序"模板的.如果你有另一个项目模板的问题,那么编辑相应的 vstemplate 文件)

(Now as you see this vstemplate file is for the "Blank Application" template. If you have this problem with another project template then edit the corresponding vstemplate file)

然后首先,制作文件的备份副本!然后打开它并查找类似的内容(对于具有 Application Insights 的内容):

Then first of all, make a backup copy of the file! Then open it and look for something like this (for the one with Application Insights):

<WizardExtension>
    <Assembly>Microsoft.VisualStudio.WinRT.TemplateWizards, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
    <FullClassName>Microsoft.VisualStudio.WinRT.TemplateWizards.ApplicationInsigths..Wizard</FullClassName>
  </WizardExtension>

然后删除它.

这篇关于创建 UWP 应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆