2013-02-12 41 views
2

得到這個錯誤,當我嘗試從http://caliburnmicro.codeplex.comCaliburn.Micro HelloScreens樣本生成錯誤

錯誤打造Caliburn.Micro樣本項目「Caliburn.Micro.HelloScreens」:類型「TDocument」必須是引用類型爲了在通用類型或方法「Caliburn.Micro.Conductor」

TDocument在類DocumentWorkspace定義爲

public abstract class DocumentWorkspace<TDocument> : Conductor<TDocument>.Collection.OneActive, IDocumentWorkspace where TDocument : INotifyPropertyChanged, IDeactivate, IHaveDisplayName 
{ 
+0

這現在已經固定在最新的codeplex樣本更新。 – captonssj 2013-02-18 16:39:44

回答

0

類使用它作爲參數「T」關鍵字從抽象中丟失,告訴DocumentWorkspace TDocument是派生的對象類。嘗試

public abstract class DocumentWorkspace<TDocument> : Conductor<TDocument>.Collection.OneActive, IDocumentWorkspace where TDocument : class, INotifyPropertyChanged, IDeactivate, IHaveDisplayName { }