首页 > 其他 > 详细

缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttribute..ctor” 解决方案

时间:2016-01-11 11:53:37      阅读:410      评论:0      收藏:0      [点我收藏+]

静态类中添加如下。此方法本人测试有效。

//缺少编译器要求的成员“ystem.Runtime.CompilerServices.ExtensionAttribute..ctor”
namespace System.Runtime.CompilerServices
{
    public class ExtensionAttribute : Attribute { }
}

网上找的其他方法

技术分享
错误产生环境及非完美解决办法

错误提示:缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttribute..ctor”

这个错误真的非常诡异,因为双击这个错误的时候无法定位到出错的地方。

而且这个错误实在是非常不明确。

其实,产生这个错误的人大部分是因为引用了 Newtonsoft.Json.Net20.dll 这个类库。

网上简单的解决方式是:“删除 Newtonsoft.Json.Net20.dll 后重新引用”
技术分享

缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttribute..ctor” 解决方案

原文:http://www.cnblogs.com/ChineseMoonGod/p/5120475.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!