There is an error when adding a reference in Visual Studio 2017. The referencemanagerpackage package cannot be loaded correctly

Time:2021-10-23

Recently, 2017 was newly installed. It was OK a few days ago, but recently when adding references,report errors

—————————
Microsoft Visual Studio
—————————

The ‘referencemanagerpackage’ package failed to load correctly.

This problem may be caused by a configuration change or the installation of another extension. Details can be obtained by viewing the file “C: \ users \ administrator \ appdata \ roaming \ Microsoft \ VisualStudio \ 15.0_3dfc125b \ activitylog. XML”.

Restarting visual studio can help resolve this issue.

Continue displaying this error message?
—————————
Yes (y) no (n)
—————————

After looking for Baidu and Google, I finally found itSolutionOriginal text:

Adding references after installing visual studio 2017 always prompted that the package referencemanagerpackage could not be loaded. This problem bothered me for two days until I saw the following paragraph on the Internet

I just got this error after installation of Visual Studio 2017.

The solution was as follows.

  • Launch Developer Command Prompt for VS 2017
  • CD C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies
  • Run gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll

You should now see

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
Restart Visual Studio and hopefully all will be well and you can add references.

The file C:\Users\USER\AppData\Roaming\Microsoft\VisualStudio\15.0_cc9cc69a\ActivityLog.xml is useful for debugging any other assemblies that may be causing the issue. Annoyingly it’s very tempting to click No when asked never to see the error message again, which will suppress the error and this path so I thought I’d post it here for reference.

Without much nonsense, let’s take a look at the specific solutions:

1. Open developer command prompt for vs 2017 under vs2017

2. Then enter in the CMD window

CD C: \ program files \ Microsoft Visual Studio \ 2017 \ community \ common7 \ ide \ publicassemblies and press enter (Note: the CD C: \ program files \ Microsoft Visual Studio \ 2017 \ community \ common7 \ ide \ publicassemblies here is the path under your installation directory. For example, if I am vs017 installed on disk D, my path is D: \ working software \ vs2017 \ common7 \ ide \ publicassemblies)

Then enter

3. Then, in the CMD window, enter gacutil – I microsoft.visualstudio.shell.interop.11.0.dll and press enter to get the following results

4. The last step is to restart vs2017!

Hope to help you!

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support developpaer.