67

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>

5 Answers 5

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>
9
  • 1
    I used this clue and simply updated Live Share. After a restart of VS, the error went away. Mar 6, 2021 at 12:42
  • 7
    I just left it unchecked... my code is not worth sharing!
    – Tim Harker
    Mar 7, 2021 at 20:49
  • 3
    @TimHarker Sometimes I need to share so someone else can help fix it! Mar 9, 2021 at 14:38
  • 5
    Started getting this error after the 16.9.1 update followed your steps and worked perfectly.
    – Baxter
    Mar 9, 2021 at 23:26
  • 1
    I already had the Live Share extension disabled. After uninstalled it I no longer received the error message.
    – CSquared
    Jul 27, 2021 at 19:19
2

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.

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

5
  • 2
    I'm on 16.9.6 and am still having this issue, I don't think they fully resolved it
    – Joosh1337
    May 19, 2021 at 12:53
  • 1
    16.11.4 here - I just got this error (re-installing Live Share seems to fix it) Oct 8, 2021 at 7:27
  • updated Visual Studio to 16.11.7 fixed the issue for me as well
    – Marwie
    Nov 18, 2021 at 14:03
  • 1
    I'm on 17.0.6 and started getting it today. No option to update LiveShare at this time.
    – Eric
    Mar 4, 2022 at 16:21
  • It's back! Visual Studio17.3.6. :(
    – jornhd
    Oct 14, 2022 at 11:59
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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.