【问题标题】:Error while creating an ASP.NET project创建 ASP.NET 项目时出错
【发布时间】:2018-03-15 16:03:19
【问题描述】:

我有一段时间没有使用 Visual Studio ('17),但最近我尝试创建一个 ASP.NET 应用程序并收到以下对话框形式的错误。我还注意到选项:ASP.NET Web Application 已被替换。

错误:此模板试图加载组件程序集 'Microsoft.VisualStudio.Web.Project,版本[equalstosign]2.3.0.0, 文化[等号]中性, PublicKeyToken[equalstosign]b03f5f7f11d50a30a'。有关更多信息 此问题以及如何启用此模板,请参阅文档 关于自定义项目模板。

【问题讨论】:

  • 到目前为止你有什么尝试?它对你所做的任何事情有何反应?像重新开放等...?你重启了吗?您是否卸载了 Visual Studios 可能需要的软件包?您是否尝试过重新安装或修复您的安装?如果您对如何描述问题感到迷茫,请查看how-to-ask
  • @Antry,是的,我尝试过各种 .net 框架版本,即从版本 4.5.2 切换到 4.5.1。
  • @SydneyKhanye 无论如何更改 .net 框架都不会做任何事情,它只是您项目的目标,但据我了解,您甚至无法访问它。我会尝试 JimmyFL 的解决方案以及我提出的所有建议,如果其中一个程序没有解决您的问题,我会感到惊讶。

标签: c# asp.net .net visual-studio


【解决方案1】:

解决方法是编辑 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe.config 并添加到该部分:

<dependentAssembly>
  <assemblyIdentity name="Microsoft.VisualStudio.Universal.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
  <bindingRedirect oldVersion="14.0.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
  <assemblyIdentity name="Microsoft.VisualStudio.WinRT.TemplateWizards" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
  <bindingRedirect oldVersion="14.0.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>

【讨论】:

  • 谢谢伙计,显然这是我之前安装的节点扩展造成的。
  • 感谢您更新我。很高兴您解决了问题 =)
猜你喜欢
  • 2021-11-01
  • 1970-01-01
  • 2016-02-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-06-14
相关资源
最近更新 更多