2013-03-28 31 views
4

我已在ComponentModel.Composition中添加;但显示此错误为MEF CS0234:名称空间“System.ComponentModel”中不存在类型或名称空间名称“组合”(您是否缺少程序集引用?)

using System.ComponentModel.Composition;

的assembely

和参考仍然得到错误

CS0234:类型或命名空间名称“组成”并不在命名空间存在“System.ComponentModel”(是否缺少程序集引用?)

+0

寻找答案在http://stackoverflow.com/questions/450999/are-you-missing-an-assembly-reference-compile-error-visual-studio –

+0

没有工作。我在汇编中添加了,但没有运气,但同样的错误 –

回答

0
  1. 首先,(如果它需要)中的Visual Studio 2012中打开项目或更高版本,请从项目菜单管理的NuGet软件包,并为Microsof网上搜索t.Composition包。

  2. 用鼠标右键单击您的项目,然后选择“添加引用”。在框架列表中找到System.ComponentModel并添加它或适用的子程序集。

这就是我遇到这个问题时所做的一切。

相关问题