我正在尝试编译一段包含 dynamic
关键字的 C# 代码。
(我需要这个关键字来使用 ironpython。)
但是,它没有编译,提示
error CS1980: Dynamic keyword requires
`System.Runtime.CompilerServices.DynamicAttribute' to be defined.
Are you missing System.Core.dll assembly reference?
我使用的编译器是 Mono JIT 编译器版本 2.10.8.1
。
我在可能的引用列表中没有 System.Runtime.CompilerServices.DynamicAttribute
。
如何让单声道接受 dynamic
关键字?
最佳答案
Hans Passant 的这条评论解决了这个问题:
You need to enable the C# 4 profile, sounds like you didn't. Google "__enable_profile4=yes"
关于c# - 在 C# 中使用 `dynamic` 关键字不编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18944208/