Error HRESULT E_FAIL has been returned from a call

2019-08-16 00:24发布

In VS-2017, onclick add Reference I am facing an error:

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

due to which I am unable to

1-add any reference and 
2-update my database through DB_First Approach

This issue is occuring from the last update of windows in my PC

1条回答
We Are One
2楼-- · 2019-08-16 01:19

I had done many solutions given on Internet

This link helped me a lot: https://developercommunity.visualstudio.com/content/problem/260196/add-a-reference-raise-error-error-hresult-e-fail-h.html

Steps:
1-Open "Developer Command Prompt for VS 2017" as Admin
2-CD into "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PublicAssemblies"
3-Run "gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll"
 After that close and reopen "Developer Command Prompt for VS 2017" as Admin
4-cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64"
5-Run -> gacutil.exe /i "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.11.0.dll"
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 Copyright (c) Microsoft Corporation. All rights reserved.

Assembly successfully added to the cache

Restarting your PC will solve the problem
查看更多
登录 后发表回答