65

I just did an update to VS2019(16.9.0) and now I get this message. (actually on two machines). A restart does not resolve the problem.

What is the CascadePackage? Can I just say No to dialogue box and be OK?

Also...the file it mentions to examine...does not exist anymore, nore the directory it was in. enter image description here

I did find this line in the latest ActivityLog.xml

  <entry>
    <record>894</record>
    <time>2021/03/05 13:52:21.259</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [CascadePackage]Source: &apos;System.ComponentModel.Composition&apos; Description: The composition produced multiple composition errors, with 3 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.&#x000D;&#x000A;&#x000D;&#x000A;1) No exports were found that match the constraint: &#x000A;&#x0009;ContractName&#x0009;Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&#x000A;&#x0009;RequiredTypeIdentity&#x0009;Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName=&quot;Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&quot;)&apos; on part &apos;Microsoft.VisualStudio.Cascade.CascadePackage&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName=&quot;Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&quot;) --&gt;  Microsoft.VisualStudio.Cascade.CascadePackage&#x000D;&#x000A;&#x000D;&#x000A;2) No exports were found that match the constraint: &#x000A;&#x0009;ContractName&#x0009;Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&#x000A;&#x0009;RequiredTypeIdentity&#x0009;Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName=&quot;Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&quot;)&apos; on part &apos;Microsoft.VisualStudio.Cascade.CascadePackage&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName=&quot;Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&quot;) --&gt;  Microsoft.VisualStudio.Cascade.CascadePackage&#x000D;&#x000A;&#x000D;&#x000A;3) No exports were found that match the constraint: &#x000A;&#x0009;ContractName&#x0009;Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&#x000A;&#x0009;RequiredTypeIdentity&#x0009;Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName=&quot;Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&quot;)&apos; on part &apos;Microsoft.VisualStudio.Cascade.CascadePackage&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName=&quot;Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&quot;) --&gt;  Microsoft.VisualStudio.Cascade.CascadePackage&#x000D;&#x000A;&#x000D;&#x000A;</description>
    <guid>{D86E17D6-7FC7-47F4-9259-21748EDFF93B}</guid>
    <hr>80131500</hr>
    <errorinfo></errorinfo>
  </entry>
Chris Catignani
  • 5,040
  • 16
  • 42
  • 49

5 Answers5

80

Seem like this was caused by LiveShare. From Visual Studio Developer Community

Just search for

The 'CascadePackage' package did not load correctly

As for my two issues:

On one machine...the error went away by starting VisualStudio.

On another machine I went into Tools->Get Tools and Features...
Click on Individual components search for Live Share. Uncheck it. Restart VS.

Go back into Tools->Get Tools and Features...
Click on Individual components search for Live Share. Check it back.

More about the ActivityLog...
Visual Studio uses a /log option on update. This creates the ActivityLog.xml.
More here /Log (devenv.exe) This is something you can also do yourself.

The description part of the ActivityLog.xml will list where the problems are. Here is an edited breakdown of the original message in the OP.

<entry>
    <record>894</record>
    <time>2021/03/05 13:52:21.259</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [CascadePackage]Source: &apos;System.ComponentModel.Composition&apos; 
    Description: The composition produced multiple composition errors, with 3 root causes. 
    The root causes are provided below. 
    Review the CompositionException.Errors property for more detailed information.&#x000D;&#x000A;&#x000D;&#x000A;
    1) No exports were found that match the constraint: &#x000A;&#x0009;
    ContractName&#x0009;Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&#x000A;&#x0009;
    RequiredTypeIdentity&#x0009;Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&#x000D;&#x000A;&#x000D;&#x000A;
    Resulting in: Cannot set import &apos;
    Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName=&quot;
    Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&quot;)&apos; on part &apos;
    Microsoft.VisualStudio.Cascade.CascadePackage&apos;.&#x000D;&#x000A;
    Element: Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName=&quot;
    Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler&quot;) --&gt;  
    Microsoft.VisualStudio.Cascade.CascadePackage&#x000D;&#x000A;&#x000D;&#x000A;
    2) No exports were found that match the constraint: &#x000A;&#x0009;
    ContractName&#x0009;Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&#x000A;&#x0009;
    RequiredTypeIdentity&#x0009;
    Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&#x000D;&#x000A;&#x000D;&#x000A;
    Resulting in: Cannot set import &apos;
    Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName=&quot;
    Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&quot;)&apos; on part &apos;
    Microsoft.VisualStudio.Cascade.CascadePackage&apos;.&#x000D;&#x000A;
    Element: Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName=&quot;
    Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler&quot;) --&gt;  
    Microsoft.VisualStudio.Cascade.CascadePackage&#x000D;&#x000A;&#x000D;&#x000A;
    3) No exports were found that match the constraint: &#x000A;&#x0009;ContractName&#x0009;
    Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&#x000A;&#x0009;RequiredTypeIdentity&#x0009;
    Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&#x000D;&#x000A;&#x000D;&#x000A;
    Resulting in: Cannot set import &apos;
    Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName=&quot;
    Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&quot;)&apos; on part &apos;
    Microsoft.VisualStudio.Cascade.CascadePackage&apos;.&#x000D;&#x000A;
    Element: Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName=&quot;
    Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService&quot;) --&gt;  
    Microsoft.VisualStudio.Cascade.CascadePackage&#x000D;&#x000A;&#x000D;&#x000A;
    </description>
    <guid>{D86E17D6-7FC7-47F4-9259-21748EDFF93B}</guid>
    <hr>80131500</hr>
    <errorinfo></errorinfo>
  </entry>
Chris Catignani
  • 5,040
  • 16
  • 42
  • 49
  • 1
    I used this clue and simply updated Live Share. After a restart of VS, the error went away. – Rob Johnston Mar 06 '21 at 12:42
  • 6
    I just left it unchecked... my code is not worth sharing! – Tim Harker Mar 07 '21 at 20:49
  • 3
    @TimHarker Sometimes I need to share so someone else can help fix it! – Chris Catignani Mar 09 '21 at 14:38
  • 5
    Started getting this error after the 16.9.1 update followed your steps and worked perfectly. – Baxter Mar 09 '21 at 23:26
  • Apparently dogfooding didn't pick this up... Or all the analyzer/CodeLens crashes and general Intellisense constantly failing to load issues. Sigh – benmccallum Mar 12 '21 at 14:06
  • upgraded to 16.9.1 and got the same error message -- this perfectly fixed the issue. Thanks! – StevieP Mar 16 '21 at 06:13
  • `UPDATE: Bug fixed in VS release 16.9.2` - NO it wasnt. 6.10.0 and still seeing this. – AgentFire Jun 03 '21 at 07:45
  • @AgentFire Thanks for pointing that out...I updated the answer...and was only going on the release notes from 16.9.2 https://learn.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.9#--visual-studio-2019-version-1692 Fixed an issue causing an error message indicating the CascadePackage did not load correctly – Chris Catignani Jun 03 '21 at 11:55
  • 1
    I already had the Live Share extension disabled. After uninstalled it I no longer received the error message. – CSquared Jul 27 '21 at 19:19
1

To fix this error, please update to Visual Studio 16.9.2 - it has been fixed there. It's also mentioned in the Release Notes:

Fixed an issue causing an error message indicating the CascadePackage did not load correctly

Oliver
  • 9,239
  • 9
  • 69
  • 100
1

Usually this error goes away on its own, after upgrading the Live Share extension and rebooting Visual Studio a couple of times (usually at least three times).

However, sometimes, that does not work. In these cases, cleaning the MEF cache as described manually (by deleting the content of %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache), or automating it via the extension Clear MEF Component Cache have solved the problem.

Clearly, if you do not wish to use Live Share, you could just disable it from the Extensions menu and the package will not even be loaded by Visual Studio.

Update: I noticed that the issue sometimes occurs even with Live Share disabled. In all my (many) attempts, toggling it resolved the startup issue after clearing the MEF cache.

Yennefer
  • 5,704
  • 7
  • 31
  • 44
0

I am on version 16.9.4 and still experiencing this issue. However I was able to get around it by either enabling or disabling the LiveShare extension (Extensions >> Manage Extensions >> Installed >> Live Share), and then recent VS.

If this doesn't work try reverting to the previous version, or updating it.

Sometimes I have to try the above a couple of times to get it working.

deedubellu
  • 53
  • 1
  • 7
0

Because MS is doomed to keep repeating things: had this happen again after Live Share was updated to 1.0.5869.0 I reverted (to 1.0.4441.1) and the error went away.

Andy Needham
  • 121
  • 3