码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-08-20 01:18:10      阅读:481      评论:0      收藏:0      [点我收藏+]

标签:

namespace System.Runtime.CompilerServices  
{  
    public class ExtensionAttribute : Attribute { }  
}   

网上找的其他方法
错误产生环境及非完美解决办法
错误提示:缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttribute..ctor”
这个错误真的非常诡异,因为双击这个错误的时候无法定位到出错的地方。
而且这个错误实在是非常不明确。
其实,产生这个错误的人大部分是因为引用了 Newtonsoft.Json.Net20.dll 这个类库。

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

参考链接:http://stackoverflow.com/questions/205644/error-when-using-extension-methods-in-c-sharp

 

可能是扩展方法引起的问题,具体啥问题俺也不明白,希望有知道的大神留言

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

标签:

原文地址:http://www.cnblogs.com/wangchuang/p/4743876.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!