无法将类型为"System .__ ComObject"的COM对象转换为接口类型为"EnvDTE.Project"

无法将类型为

问题描述:

我正在使用Visual Studio 2015项目模板中的Azure资源组项目为我的项目创建Azure资源管理器部署模板.我以前成功地创建了项目.但是今天,我将Azure SDK更新到v2.9.5,突然项目创建失败.它失败,并显示以下错误消息.

I am in the process of creating Azure Resource Manager deployment templates for my project using the Azure Resource Group Project in Visual Studio 2015 project templates. I successfully managed to create the projects before. But today, I updated the Azure SDK to v2.9.5 and suddenly the project creation failed. It failed with the following error message.

无法将类型为'System .__ ComObject'的COM对象转换为接口键入"EnvDTE.Project".该操作失败,因为IID接口的COM组件上的QueryInterface调用"866311E6-C887-9833-645F5B93F6F1}"由于以下错误而失败:不支持缓存接口(HRESULT的异常:0x80004002(E_NONINTERFACE).

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-9833-645F5B93F6F1}' failed due to the following error: No cush interface supported (Exception from HRESULT: 0x80004002 (E_NONINTERFACE)).

当我从模板选择对话框中选择启动模板时发生此异常(我选择了WebApp + SQL模板.其他模板也失败).因此,在此之后,该项目是不完整的创建.

This exception happens when i select starting template from the template selection dialog box (I selected WebApp+SQL template. This fails for other templates as well). So after this the project is incomplete created.

我在安装了Azure SDK v2.9.5的3台不同的PC中都遇到了同样的问题.这个问题与SDK本身有关吗?或者我应该如何解决这个问题.

I faced this same issue in 3 different PCs with Azure SDK v2.9.5 installed. Is this issue related to the SDK itself? Or how should i fix this.

我们有错误,正在努力解决.在此期间,您可以:

We have bug and are working on a fix. In the meantime you can:

  • 从解决方案中删除解决方案项
  • 添加新项目
  • 添加解决方案项

LMK不能解决您的问题...

LMK if that doesn't fix it for you...