Dotspatial Learning Journey - 1 Question Collection - MEF

https://docs.microsoft.com/zh-cn/dotnet/framework/mef/index

I have a problem today

System.ComponentModel.Composition Warning: 1 : ComposablePartDefinition“DotSpatial.Controls.DefaultRequiredImports.DockManager”已被拒绝。撰写保持不变。由于以下错误,更改被拒绝: 撰写生成了一个撰写错误,其根本原因有 1 点,如以下所列。 有关详细信息,请查看 CompositionException.Errors 属性。

1) 未找到与约束 
	ContractName	Shell
	RequiredTypeIdentity	System.Windows.Forms.ContainerControl 匹配的导出

结果: 无法对部件“DotSpatial.Controls.DefaultRequiredImports.DockManager”设置导入“DotSpatial.Controls.DefaultRequiredImports.DockManager.Shell (ContractName="Shell")”。
元素: DotSpatial.Controls.DefaultRequiredImports.DockManager.Shell (ContractName="Shell") -->  DotSpatial.Controls.DefaultRequiredImports.DockManager -->  AssemblyCatalog (Assembly="DotSpatial.Controls, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4d9e49339a7d240c")

System.ComponentModel.Composition Warning: 1 : ComposablePartDefinition“DotSpatial.Controls.DefaultRequiredImports.HeaderControl”已被拒绝。撰写保持不变。由于以下错误,更改被拒绝: 撰写生成了一个撰写错误,其根本原因有 1 点,如以下所列。 有关详细信息,请查看 CompositionException.Errors 属性。

According to the adjustment, it was found that MEF (Managed Extensibility Framework) was involved, and then the problem was written down.

The main reason is that my code is wrong. The shell in the figure below is lowercase-sensitive. You must use the shell. Modify it and it will be normal.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325771575&siteId=291194637