我尝试创建自动注册Catel框架,
[ServiceLocatorRegistration(typeof(ISalesOrderListViewModel))]
public class SalesOrderListViewModel : ISalesOrderListViewModel
{
}
但编译此代码时出现此错误。 属性参数必须是属性参数类型
的常量表达式,typeof表达式或数组创建表达式Catel ServiceLocatorRegistration属性是否需要我不知道的内容?
帮助!
答案 0 :(得分:0)
最后我发现在net framework 4.5下,这个属性运行正常,但是当我尝试在net framework 4.0下运行时,这个属性不起作用,这意味着我得到了编译错误。 Geert先生,我不知道我应该提交这个问题,或者你可能不会在net framework 4.0下支持这个。