visual-studio-2019 - “CascadePackage”包未正确加载
问题描述
我刚刚对 VS2019(16.9.0) 进行了更新,现在我收到了这条消息。(实际上在两台机器上)。重新启动并不能解决问题。
什么是 CascadePackage?我可以只No对对话框说就可以了吗?
另外......它提到要检查的文件......不再存在,它所在的目录也不再存在。
我确实在最新的 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: 'System.ComponentModel.Composition' 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.

1) No exports were found that match the constraint: 
	ContractName	Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler
	RequiredTypeIdentity	Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler

Resulting in: Cannot set import 'Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler")' on part 'Microsoft.VisualStudio.Cascade.CascadePackage'.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler") --> Microsoft.VisualStudio.Cascade.CascadePackage

2) No exports were found that match the constraint: 
	ContractName	Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler
	RequiredTypeIdentity	Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler

Resulting in: Cannot set import 'Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler")' on part 'Microsoft.VisualStudio.Cascade.CascadePackage'.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler") --> Microsoft.VisualStudio.Cascade.CascadePackage

3) No exports were found that match the constraint: 
	ContractName	Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService
	RequiredTypeIdentity	Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService

Resulting in: Cannot set import 'Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService")' on part 'Microsoft.VisualStudio.Cascade.CascadePackage'.
Element: Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService") --> Microsoft.VisualStudio.Cascade.CascadePackage

</description>
<guid>{D86E17D6-7FC7-47F4-9259-21748EDFF93B}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
解决方案
似乎这是由 LiveShare 引起的。来自Visual Studio 开发者社区
只需搜索
“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: 'System.ComponentModel.Composition'
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.


1) No exports were found that match the constraint: 
	
ContractName	Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler
	
RequiredTypeIdentity	Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler


Resulting in: Cannot set import '
Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler")' on part '
Microsoft.VisualStudio.Cascade.CascadePackage'.

Element: Microsoft.VisualStudio.Cascade.CascadePackage.JoinWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IJoinCommandLineHandler") -->
Microsoft.VisualStudio.Cascade.CascadePackage


2) No exports were found that match the constraint: 
	
ContractName	Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler
	
RequiredTypeIdentity	
Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler


Resulting in: Cannot set import '
Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler")' on part '
Microsoft.VisualStudio.Cascade.CascadePackage'.

Element: Microsoft.VisualStudio.Cascade.CascadePackage.ShareWorkspaceCommandHandler (ContractName="
Microsoft.VisualStudio.Cascade.Commands.IShareCommandLineHandler") -->
Microsoft.VisualStudio.Cascade.CascadePackage


3) No exports were found that match the constraint: 
	ContractName	
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService
	RequiredTypeIdentity	
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService


Resulting in: Cannot set import '
Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService")' on part '
Microsoft.VisualStudio.Cascade.CascadePackage'.

Element: Microsoft.VisualStudio.Cascade.CascadePackage.ClientService (ContractName="
Microsoft.VisualStudio.Cascade.Contracts.IVsCascadeClientService") -->
Microsoft.VisualStudio.Cascade.CascadePackage


</description>
<guid>{D86E17D6-7FC7-47F4-9259-21748EDFF93B}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
推荐阅读
- ntp - 在 petalinux 上添加 NTP 守护进程
- docker - Docker 构建缓存不断增长
- office365 - 是否可以实施自定义传输代理来更新 Office365 中的电子邮件?
- c# - 如何处理asp.net MVC c#中的发送参数按钮?
- couchdb - 我们如何创建对数据库具有有限权限的非管理员用户?
- javascript - 如何使这个句子拆分器 regex safari 兼容?
- javascript - InvalidStateError:无法在“范围”上执行“surroundContents”:范围已部分选择非文本节点
- ruby-on-rails - 如何为 Rails 中的嵌套资源编写此条件语句?
- angular - 在使用 Karma/Jasmine 的 Angular 测试中解决“在 afterAll 中抛出一个错误,不可迭代”
- php - 如何使 Html 下拉列表选择的值打印为 CSV?