创建MVC/Web Azure项目失败 [英] Create MVC/Web Azure Project Fails

查看:67
本文介绍了创建MVC/Web Azure项目失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS 2015项目生成中遇到问题.每当我为Web或MVC应用程序生成新项目时,在生成解决方案的最后阶段都会引发错误:

I am having an issue with my VS 2015 project generation .Whenever I generate a new project for a web or MVC application it throws an error during the final stages of generating the solution :

无法将类型为"System .__ ComObject"的COM对象转换为接口类型为"EnvDTE.Project".由于以下原因,此操作失败是因为对具有IID'{866311E6-C887-4143-9833-645F5B93F6F1}'的接口的COM组件上的QueryInterface调用失败,原因如下: 错误:未注册图书馆. (来自HRESULT的异常:0x8002801D(TYPE_E_LIBNOTapped).)

Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE.Project'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{866311E6-C887-4143-9833-645F5B93F6F1}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).

然后,创建的项目将丢失大部分System.web.helper/MVC/Razor/Webpages/WebPagesdeployment/Webgrease和Antlr3.runtime引用.

The created project is then missing the majority of the System.web.helper /MVC/Razor/Webpages/WebPagesdeployment /Webgrease and Antlr3.runtime references . 

未解决而采取的步骤:

修复的Visual Studio 2015安装

Repaired Visual Studio 2015 installation 

在提示时重新安装所有框架/修复所有框架

Reinstalled all frameworks /repaired all frameworks when prompted

已注册dte80.olb/dte90.olb文件.

Registered dte80.olb /dte90.olb files .

如果有人能指出我的解决方向,最好不涉及整个VS或OS的拆卸和重新安装,我们将不胜感激.

Would appreciate if someone can point me in a direction to resolve preferably not involving the removal and reinstallation of the entire VS or OS.

致谢

罗杰

RogerFraser

RogerFraser

推荐答案

欢迎来到MSDN论坛

您是最近还是在安装VS后遇到此问题的?如果只是最近才发生,您可以看看Windows Update安装任何未决的 修补程序或VS安装更新或扩展,然后尝试将其删除并再次检查此问题.或者尝试 以安全模式运行VS,打开一个管理CMD窗口并导航至C: \ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE,然后运行以下命令:devenv.exe /safemode,它可以帮助我们排除已安装的扩展程序导致此问题的发生.

Did you meet this issue recently or after the VS installation? If it just happens recently, you can have a look at the windows update install any pending patches or VS install updates or extension, then try to remove them and check this issue again. Or try to run the VS with safe mode, open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE and run these commands: devenv.exe /safemode, it can help us to excludes the installed extensions effect this issue.

请参阅错误消息,我发现 类似的错误,请对以下内容进行测试:(在进行任何修改之前,请备份注册表表)

Refer to the error message, I found a similar error and please have a test with the following: (Backup the registry table before you make any modification)

Victor : 要修复它们,请打开 regedit

Victor: To fix them, open the regedit and find for the CLSID from the error.

第二遍,您会发现类似的内容错误:

\ { - - -C000- } (对于您的问题,id 应该是 ‘{866311E6-C887-4143-9833-645F5B93F6F1} ")

HKEY_CLASSES_ROOT\Interface\{00020970-0000-0000-C000-000000000046} (for your issue, the id should be ‘{866311E6-C887-4143-9833-645F5B93F6F1}’)

带有子键:

  • ProxyStubClsid
  • TypeLib

看看 (默认) 版本 strong> 内部的值 TypeLib

Look at the (Default) and Version values inside of TypeLib.

现在,使用 (默认) 值为 < TypeLib ID> .

Now find the node below, using the (Default) value as <TypeLib ID>.

HKEY_CLASSES_ROOT \ TypeLib \ < TypeLib ID> \

HKEY_CLASSES_ROOT\TypeLib\ <TypeLib ID> \

作为此元素的子元素,您会发现不止一个元素,其中之一是 Version .如果您检查其他元素, 您会发现它们没有指向任何对象. 删除其他人!已解决!

As child of this elements you will find more than one element, one of them is the Version of the first registry. If you inspect the other elements, you will find that they point to nothing. Remove the others!!! It's solved!

最好的问候,

Sara


这篇关于创建MVC/Web Azure项目失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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