“CascadePackage”包未正确加载

时间:2021-03-05 13:55:43

标签: visual-studio-2019

我刚刚对 VS2019(16.9.0) 进行了更新,现在我收到了这条消息。 (实际上在两台机器上)。重新启动并不能解决问题。

什么是 CascadePackage? 我可以对对话框说No就OK了吗?

另外...它提到要检查的文件...不再存在,也不存在它所在的目录。 enter image description here

我确实在最新的 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>

3 个答案:

答案 0 :(得分:61)

这似乎是由 LiveShare 引起的。 来自Visual Studio Developer Community

只需搜索

<块引用>

'CascadePackage' 包没有正确加载

至于我的两个问题:

<块引用>

在一台机器上……启动 VisualStudio 后错误消失了。

在另一台机器上,我进入了工具->获取工具和功能...
单击 Individual components 搜索 Live Share。取消选中它。 重新启动 VS。

返回到工具->获取工具和功能...
点击 Individual components 搜索 Live Share。回来看看。

有关 ActivityLog 的更多信息...
Visual Studio 在更新时使用 /log 选项。这将创建 ActivityLog.xml。
详情请点击此处/Log (devenv.exe)您也可以自己做这些事情。

ActivityLog.xml 的描述部分将列出问题所在。这是 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>

答案 1 :(得分:2)

要修复此错误,请更新到 Visual Studio 16.9.2 - 它已在那里修复。 Release Notes 中也提到了这一点:

<块引用>

修复了导致错误消息指示 CascadePackage 未正确加载的问题

答案 2 :(得分:0)

我使用的是 16.9.4 版本,但仍然遇到此问题。但是,我可以通过启用或禁用 LiveShare 扩展(扩展 >> 管理扩展 >> 已安装 >> 实时共享)和最近的 VS 来绕过它。

如果这不起作用,请尝试恢复到以前的版本或更新它。

有时我必须多次尝试上述方法才能使其正常工作。