我不能在Portable Class Library中使用dynamic?

时间:2013-10-01 18:35:22

标签: c# portable-class-library

我的PCL项目中的一个班级已定义

受保护的动态模型;

认为这是聪明的b'cuz模型然后可以是继承这个类的孩子们的任何东西。但它不会建立,说明:

Cannot define a class or member that utilizes 'dynamic' because the compiler required type 'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you missing a reference?

我错过了什么,或者它无法完成?

1 个答案:

答案 0 :(得分:4)

您缺少Microsoft.CSharp程序集提供的 dynamic 的运行时支持。当您的库定位于“旧”框架之一时,它不可用:XBox或Windows Phone 7.x。

相关问题