2013-02-12 40 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 { }