在添加引用时调用 COM 组件返回了错误 HRESULT E_FAIL [英] Error HRESULT E_FAIL has been returned from a call to a COM component on Add Reference

查看:36
本文介绍了在添加引用时调用 COM 组件返回了错误 HRESULT E_FAIL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 VS-2017 中,点击添加引用"我收到一个错误:

In VS-2017, on clicking "Add Reference" I am getting an error:

"Error HRESULT E_FAIL has been returned from a call to a COM component."

因此我无法

  1. 添加任何引用和
  2. 通过 DB_First 方法更新我的数据库

此问题在上次更新 Windows 后开始出现.

This issue started occuring after the last update of Windows.

推荐答案

什么对我有用

  1. 使用管理员权限打开 VS 2019 的开发人员命令提示符
  2. 在开发人员命令提示符中键入

cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PublicAssemblies

cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PublicAssemblies

您的路径可能有所不同,因此请检查

Your path may differ so check

  1. 输入开发人员命令提示符

gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll

gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll

它应该重建,您现在可以添加引用!

It should rebuild and you may now add references!

这篇关于在添加引用时调用 COM 组件返回了错误 HRESULT E_FAIL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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