WPF中作用MEF报错The export Xyz is not assignable to type IXyz是设计器问题
来源:互联网 发布:网络布线机柜组装图解 编辑:程序博客网 时间:2024/06/05 06:37
如题。
具体情况是:我创建一个WPF项目,添加ModleView,实例化ModleView赋值给Window的DataContext。xmal中添加控件并binding ModelView的属性。而banding的这个属性是[InportMany(typeof(IXyz))]IEnumerable<IXyz>{ get; set; }。IXyz定义在另一个dll项目中,提供值的是另外两个dll项目中的类,实现IXyz,[Export(typeof(IXyz))],在ModleView的构造方法中创建DirectoryCatalog,CompositionContainer ComposeParts(this)。运行项目,一切正常。
当以上逻辑移到一个UserControl项目中,再输出dll给WPF项目作用时,运行仍然正常,但设计器提示无法显示UserControl,Error List的报错The export Xyz is not assignable to type IXyz。
查了好多资料,反复折腾了半天。最后断定是设计器的问题。仿佛设计器是会有很多问题需要注意的Troubleshooting WPF and Silverlight Designer Load Failures
折腾了半天,也扩展了一些知识。感觉关于WPF,MEF的资料好少。以前学习,都是伸手档,看别人博客。以后在开发过程中如果有遇到什么问题,也分享出来,希望能让相关资料丰富起来。
我现在的需求其实是做VS扩展,VSIX资料也好少,如果有相关资源,希望能分享给我。
0 0
- WPF中作用MEF报错The export Xyz is not assignable to type IXyz是设计器问题
- is not assignable to
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type * is not accessible due to restrict,报错问题.
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第一种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Variable is not assignable (missing__block type specifier)
- Variable is not assignable (missing__block type specifier)
- Variable is not assignable (missing__block type specifier)
- Variable is not assignable (missing__block type specifier)
- window 应用程序的组成及编程步骤
- linux 修改密码 (三)救援模式
- FragmentActivity + ViewPager + Fragment + FragmentPagerAdapter 数据及时更新
- 138. Copy List with Random Pointer
- 铁饭碗的由来
- WPF中作用MEF报错The export Xyz is not assignable to type IXyz是设计器问题
- Ubuntu14.04建立WiFi热点
- Google Protocol Buffer 的使用和原理
- SpringMVC处理请求的流程
- Android 竖虚线(match_parent)
- mongo 的安装和卸载
- GLUT教程--基本的启动建立窗口的简单渲染图形例子
- mysql最新通用二进制分发版本5.7.16自动安装shell脚本
- Android错误日志