34

I'm having a problem with VS2015 and cordova projects. Earlier in the day my project was working great. However, I moved a project to a new folder and now VS2015 is not working well. It's running, but somehow webessentials was uninstalled, NPM package in my gulpfile.js corrupt Visual Studio ....

Anyone encounter this problem before?

enter image description here

  <entry>
<record>28</record>
<time>2015/09/22 22:18:17.610</time>
<type>Error</type>
<source>VisualStudio</source>
<description>Loading UI library</description>
<guid>{2EF1EC52-C8BF-4FE0-8ECE-BA9C0D5D1603}</guid>
<hr>800a006f</hr>
<errorinfo>Cannot find the requested resource: 'VSMenus.ctmenu'.</errorinfo>

<entry>
<record>48</record>
<time>2015/09/22 22:18:18.186</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [ResourceManagerPackage]</description>
<guid>{7C6A3AE5-F469-4D51-B52D-50393DEC9432}</guid>
<hr>80070002</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Azure.ResourceManager.Contracts.1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>

DeanB_Develop
  • 2,107
  • 3
  • 23
  • 37
  • Same is here too. Web Essentials 2015 is being disabled after this message. – Alexander Schmidt Sep 26 '15 at 09:33
  • @sprinter252 Here's a way to get `VS2015` working. It will reset VS2015 and you'll need to reinstall extensions, but it works. `Command Prompt > VS2015 Folder`: `devenv.exe /resetuserdata` . Another option that does not work for me `devenv.exe /updateconfiguration` & then `devenv.exe /clearcache` – DeanB_Develop Sep 26 '15 at 12:26
  • Unfortunately, the devenv.exe /resetuserdata will allow VS2015 working, but it doesn't fix the root problem and the problem will happen again. – DeanB_Develop Sep 26 '15 at 12:31
  • @sprinter252 How did your VS2015 crash? It happens to me when I edit my package.json and NPM starts to download packages. [![Screen Shot](https://i.gyazo.com/a989d7474d546b084bd2f3682ce3a606.png)] – DeanB_Develop Sep 26 '15 at 12:38
  • "crash" was too harsh I guess. It simply shows the same dialog as in your case and then Web Essentials is disabled. This is what I meant with "crash". Sorry. – Alexander Schmidt Sep 26 '15 at 14:10
  • 2
    @Till If I remember correctly, I repaired my version of VS2015 using Add or Remove Programs > Microsoft Visual Studio Community 2015. Right Click > change > Repair. – DeanB_Develop Oct 28 '15 at 14:06
  • I just encountered this issue with the latest VS 2015 Update 2 release. The suggestion of deleting the registry keys and values with the offending GUID was the most useful in my circumstance. Repairs, reinstalls, and disabling of all Azure components didn't do anything to fix it for me. – Thomas Erik Olsen Apr 29 '16 at 02:15
  • I have repaired, uninstalled, deleted guids and appdata folders but nothing works. We need a solution from @Microsoft. #pathetic – ChiliYago Aug 02 '16 at 22:37
  • Same problem while trying to add a reference in any C# project. – MuiBienCarlota Feb 22 '17 at 15:21
  • **See Also**: [How can I fix the Microsoft Visual Studio error: "package did not load correctly"?](https://stackoverflow.com/q/17574089/1366033) – KyleMit May 21 '20 at 20:10

11 Answers11

20

Renaming or deleting the VS profile folder in the AppData profile directory fixed the issue for me. You might prefer renaming in case you have a lot of extensions installed if this solution does not resolve the issue and would like to revert by renaming the folder back.

[drive]:\Users\<your user>\AppData\Roaming\Microsoft\VisualStudio\14.0
dynamiclynk
  • 2,275
  • 27
  • 31
  • You really saved my PC to another `formattingThenReinstalling` brutal force step. Thanks – T-moty Jan 20 '16 at 14:47
  • Note that this will uninstall all your extensions and re-enable all the default extensions. In most cases, this error is caused by disabling one of the default VS extensions. – Will Eddins May 24 '17 at 15:25
  • It's likely this most of the time but also I think the uninstall of extensions is not cleaned completely which still cause errors after the uninstall, but this is something to keep in mind nonetheless. – dynamiclynk May 24 '17 at 15:31
19

Open REGEDIT and lookup into the registry to find the key {7C6A3AE5-F469-4D51-B52D-50393DEC9432}, as shown in the log file, the key should be under [User]\Software\Microsoft\VisualStudio\14.0_Config\AutoLoadPackages

You can delete it. Make an export first in case something goes wrong.

spartaco
  • 379
  • 2
  • 10
  • 1
    I deleted all references to that GUID, like you suggested, and the error went away. Thank you! – Thomas Erik Olsen Apr 29 '16 at 02:13
  • 1
    I did not find that in AutoLoadPackages but in Packages @spartaco – Lord of Scripts May 04 '16 at 00:36
  • Not an answer but the LOG file it says it could not load a file named Resource Manager.blah.blah.Contracts found in Extensions\aoxa1hqu.h5n and when you look in that folder you see several DLL files but NOT the .Contracts.dll file that it fails to load because it is simply NOT THERE. – Lord of Scripts May 04 '16 at 00:39
  • Ahhh! Finally! Using the log file referenced, I was able to find all of the registry keys that were erroring and delete them, which fixed it! Thanks Spartaco! – Formic Jul 14 '16 at 03:08
  • Yes, I've found it in registry (3 occurrences), removed it, and now the error doesn't appear on Visual Studio startup, but when creating a new project. – Harry Jul 29 '16 at 17:05
  • I didn't want to deal with removing the key from the Registry, so I just renamed the problematic key to BROKEN_{GUID}, and Visual Studio didn't seem to mind – Coruscate5 May 05 '17 at 16:04
5

It happened to me after installing new version of VS 2015 Azure Pack.

Uninstalling all Azure components from 'Programs and Features' with today's install date and running the setup again helped.

Tereza Tomcova
  • 4,928
  • 4
  • 30
  • 29
5

I had a similar issue using Visual Studio 2017:

enter image description here

when trying to "add a reference" to a project.

The issue was resolved by uninstalling a previous version of Visual Studio (2012) installed on my computer.

m.nachury
  • 972
  • 8
  • 23
Jose
  • 51
  • 1
  • 1
3

I had a similar problem with Azure SDK and the JSON outline view not working. I had created a VS solution using the Azure Resource Group template, but moved the files it creates to a new folder. This caused the error message "The ResourceManagerPackage package did not load correctly." Simply putting back the file

Deploy-AzureResourceGroup.ps1

into the root of the solution fixed my issue.

Further details: http://blog.thingsgeeky.co.uk/?p=9751

HTH.

UPDATE

Regarding the JSON Outline not working, using Visual Studio 2017, make sure the .json file is in a solution / project that is loaded / open and when creating the file. Use the following to "make" an empty .json template:

  1. In Solution Explorer, right-click Solution / project / folder > Add > New Item... > Azure Resource Manager deployment Template.

  2. If you have an existing template, copy the contents in.

The JSON outline should work.

You need to have various Azure-releated Visual Studio extensions install. I'm sorry, but I don't know which gives the JSON Outline feature or the DeploymentProject feature.

woter324
  • 2,608
  • 5
  • 27
  • 47
  • Exactly this. It seems if you don't mess with the defaults that VS expects in an ARM project it won't complain. – bytejunkie Jan 04 '17 at 10:47
3

This worked for me:

  1. Close Visual Studio instances
  2. Rename C:\Users\leibbr\AppData\Roaming\Microsoft\VisualStudio\14.0
  3. Open Visual Studio (problem is gone, but so is TFS setup etc)
  4. Close Visual Studio
  5. Delete newly created 14.0 folder and rename old folder back to 14.0
  6. Open Visual Studio
  7. Magic!
1
  1. Open the Visual Studio's ActivityLog.xml from C:\Users{{USER_NAME}}\AppData\Roaming\Microsoft\VisualStudio\14.0.
  2. Find the GUIDs of the packages causing the problem from the activitylog.
  3. Open REGEDIT
  4. Navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\Packages{{GUID_OF_THE_PACKAGE_CAUSING_THE_ISSUE}}
  5. Right click and delete the entire entry
  6. To be on the safer side, export the entry before deleting
Gokulnath
  • 1,166
  • 15
  • 29
1

Follow these instruction according to your version of Visual studio and OS.

This worked for me. Follow this

  • Whilst this may theoretically answer the question, [it would be preferable](//meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Anton Menshov Apr 19 '20 at 03:50
0

When I had the same issue, I searched the registry for the offending package's GUID. Results showed me which extension was the culprit (it was Productivity Power Tools 2015).

I uninstalled and then reinstalled it and this solved the issue.

Moss
  • 855
  • 1
  • 9
  • 23
0
  1. Open Developer PowerShell for your Visual studio Version as Administrator.
  2. Go to Public Assembly folder in your visual studio version. ex: VS 2017 Professional, run below command :

    cd 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PublicAssemblies'

  3. Run the following command:

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

  4. Restart Visual Studio

  5. If not working, restart your PC
Samidjo
  • 2,315
  • 30
  • 37
-1

try this:-

Start Developer Command Prompt go to this path:-

cd C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies

this path might be different depending upon your VS and environment. Once navigated to this path run this command: gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll

Fakhar Ahmad Rasul
  • 1,595
  • 1
  • 19
  • 37