开发者

Can't find System.ComponentModel.Composition with .NET Framework 4 installed

i think this sounds like a stupid quest开发者_如何学运维ion. 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


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.


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. :)


You should go to References->Add Reference->Framework and select System.ComponentModel.Composition


You can also install the System.ComponentModel Nuget package:

Project > Manage Nuget packages > Browse System.ComponentModel and install.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜