Skip to content

VS 2017/2019 Add a reference causes error – Learn new things

Posted in Education, and WhoCodeFirst

When select add reference on any project new or old I get the following error in the visual studio 2017/2019

VS 2017/2019 Add a reference causes error: Error HRESULT E_FAIL has been returned from a call to a COM component

Solution:

#1 Open “Developer Command Prompt for VS 2017/2019” as Admin

#2 CD into “C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PublicAssemblies” or CD into “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PublicAssemblies”

#3 Run “gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll

#4 restart visual studio as administrator mode, VS 2017/2019 works for this flow.

Can you please let us know any other way to resolve this kind of issue and why this kind of issue happens suddenly?

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version