问题
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?
<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>
回答1:
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.
回答2:
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
回答3:
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.
回答4:
I had a similar issue using Visual Studio 2017:
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.
回答5:
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:
In Solution Explorer, right-click Solution / project / folder > Add > New Item... > Azure Resource Manager deployment Template.
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.
回答6:
This worked for me:
- Close Visual Studio instances
- Rename C:\Users\leibbr\AppData\Roaming\Microsoft\VisualStudio\14.0
- Open Visual Studio (problem is gone, but so is TFS setup etc)
- Close Visual Studio
- Delete newly created 14.0 folder and rename old folder back to 14.0
- Open Visual Studio
- Magic!
回答7:
- Open the Visual Studio's ActivityLog.xml from C:\Users{{USER_NAME}}\AppData\Roaming\Microsoft\VisualStudio\14.0.
- Find the GUIDs of the packages causing the problem from the activitylog.
- Open REGEDIT
- Navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\Packages{{GUID_OF_THE_PACKAGE_CAUSING_THE_ISSUE}}
- Right click and delete the entire entry
- To be on the safer side, export the entry before deleting
回答8:
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.
回答9:
- Open Developer PowerShell for your Visual studio Version as Administrator.
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'
Run the following command:
gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll
Restart Visual Studio
- If not working, restart your PC
回答10:
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
来源:https://stackoverflow.com/questions/32728068/resourcemanagerpackage-package-did-not-load-correctly