2010-08-31 171 views
4

我認爲這聽起來像一個愚蠢的問題。我從caliburn micro開始:customizing the bootstraper。我安裝了.NET Framework 4,VS2010。但是當我嘗試添加using,有智能感知,告訴我,我有System.ComponentModel.Design但沒有成分或任何的安裝.NET Framework 4時找不到System.ComponentModel.Composition

using System.ComponentModel.Composition; 
using System.ComponentModel.Composition.Hosting; 
using System.ComponentModel.Composition.Primitives; 

可用。我試圖添加一個引用,但在列表中找不到System.ComponentModel,即使

回答

5

您是否安裝了託管擴展框架? MSDN says thatSystem.ComponentModel.Composition是MEF的一部分。

假設MEF已經包含在.NET 4中,您還需要添加對項目的引用System.ComponentModel.Composition.dll

2

這是因爲你的目標是3.5框架。這就是爲什麼你無法找到system.componentmodel.composition。如果您已將目標更改爲4.0,但仍看不到構圖。所有你需要做的就是去項目然後添加引用,然後找到system.componentmmodel.composition。一旦你已經添加它。您已經可以看到作品了。希望能幫助到你。 :)

0

您應該到References-> Add Reference-> Framework並選擇System.ComponentModel.Composition

相關問題