Visual Studio error: Package did not load correctly

dnlnlndnlnln Posts: 234 Gold 2
edited October 13, 2016 11:07PM in ReadyRoll
The following error occurs when loading Visual Studio after installing ReadyRoll:
The 'ReadyRoll.VsPackage.ReadyRollVsPackage, ReadyRollSQLServer, Version=1.13.11.1482' package did not load correctly.
ReadyRoll_-_Package_did_not_load_correctly_in_Visual_Studio_apjdtb.png
Referring to the ActivityLog.xml reveals the following details about the error:
CreateInstance failed for package [ReadyRoll.VsPackage.ReadyRollVsPackage, ReadyRollSQLServer, Version=1.13.11.1482, Culture=neutral, PublicKeyToken=null]Source: 'mscorlib' Description: Exception has been thrown by the target of an invocation. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "ReadyRollNuGet.VisualStudio.ISolutionManager" but found 0 after applying applicable constraints.
Re-installing/reparing/restarting did not help. Any ideas how to resolve this?
Daniel Nolan
Product Manager
Redgate Software
Tagged:

Comments

  • dnlnlndnlnln Posts: 234 Gold 2
    edited May 5, 2017 3:11AM
    The error occurs as a result of corruption of the extension cache in Visual Studio.

    To resolve this, you'll need to delete or rename the ComponentModelCache folder on your machine (per this StackOverflow answer: http://stackoverflow.com/a/17604007/266882)

    For Visual Studio 2015, this folder is:
    %AppData%\..\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
    
    For example:
    C:\Users\johnsmith\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
    
    (for Visual Studio 2017, replace "14.0" with "15.0")

    After removing the folder, restart Visual Studio. It should take a minute or so to rebuild the cache.

    If you still get the error, try running the following command:
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /setup
    
    Or for Visual Studio 2017:
    C:\Program Files (x86)\Microsoft Visual Studio 15.0\Common7\IDE\devenv.exe /setup
    
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.