0

I have a solution with a lot of projects targeting .net framework but not any with .core NuGet. The case is that, quite occasionally I started getting the following error while trying to set up any package from manage NuGet packages

HRESULT E_FAIL has been returned from a call to a COM component

Did someone run into the same issue and how you managed to resolve it

Arif Eqbal
  • 3,068
  • 1
  • 18
  • 10
usrere
  • 93
  • 8
  • Did you try solutions mentioned here: https://stackoverflow.com/questions/13361199/error-hresult-e-fail-has-been-returned-from-a-call-to-a-com-component-vs2012-whe – aman Nov 16 '18 at 15:18

1 Answers1

0

Go to your C:\Users\{USER}\AppData\Roaming\Microsoft\VisualStudio folder, and you should find a folder in there called 15_{id}. Open it, and have a look at the ActivityLog.xml. If you have a look in it you should find the error in there and the library that's causing it. In my case it was caused by Microsoft.visualstudio.shell.interop.IVsReferenceManager2 within the Microsoft.VisualStudio.Shell.Interop.11.0.dll library.

This post helped me solve the issue then: Msdn forum

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 a restart, it all worked well.

Please Follow the Source referencemanagerpackage-fails-to-install-vs-2017-community-edition

Llazar
  • 3,167
  • 3
  • 17
  • 24
H-a-Neo
  • 152
  • 7