安装了 .NET Framework 4 后找不到 System.ComponentModel.Composition
我认为这听起来是一个愚蠢的问题。我从 caliburn micro 开始:自定义引导程序。我安装了.NET Framework 4,VS2010。但是当我尝试添加 using
时,智能感知告诉我我有 System.ComponentModel.Design,但没有 Composition 或任何
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
可用的。我尝试添加引用,但在列表中甚至找不到 System.ComponentModel
i think this sounds like a stupid question. i am starting with caliburn micro: customizing the bootstraper. i have .NET Framework 4 installed, VS2010. but when i try to add a using
, there is intellisense that tells me i have System.ComponentModel.Design but no Composition or any of
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
available. i tried to add a reference but cannot find System.ComponentModel in the list even
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您是否安装了托管扩展性框架? MSDN 说
System.ComponentModel.Composition
是 MEF 的一部分。假设 MEF 已包含在 .NET 4 中,您还需要将对 System.ComponentModel.Composition.dll 的引用添加到您的项目中。
Do you have the Managed Extensibility Framework installed? MSDN says that
System.ComponentModel.Composition
is part of MEF.Assuming that MEF is already included in .NET 4, you will also need to add a reference to System.ComponentModel.Composition.dll to your project.
这是因为您的目标是 3.5 框架。这就是为什么你找不到system.componentmodel.composition。如果您已经将目标更改为 4.0,但仍然看不到构图。您所要做的就是转到项目,然后添加引用,然后找到 system.componentmmodel.composition。一旦你已经添加了它。你已经可以看到构图了。希望有帮助。 :)
It is because you are targeting a 3.5 framework. That's why you can't find the system.componentmodel.composition. And if you already change your target to 4.0 and still you can't see the composition. all you have to do is go to project then add reference then find the system.componentmmodel.composition. Once you already added it. You can already see the composition. Hope it helps. :)
您应该转到 References->Add Reference->Framework 并选择 System.ComponentModel.Composition
You should go to References->Add Reference->Framework and select System.ComponentModel.Composition
您还可以安装 System.ComponentModel Nuget 包:
项目 >管理Nuget包>
浏览 System.ComponentModel 并安装。
You can also install the System.ComponentModel Nuget package:
Project > Manage Nuget packages >
Browse System.ComponentModel and install.