我自己使用的解决方法

  1. 错误产生环境及非完美解决办法
  2.  
  3. 错误提示:缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttribute..ctor
  4.  
  5. 这个错误真的非常诡异,因为双击这个错误的时候无法定位到出错的地方。
  6.  
  7. 而且这个错误实在是非常不明确。
  8.  
  9. 其实,产生这个错误的人大部分是因为引用了 Newtonsoft.Json.Net20.dll 这个类库。
  10.  
  11. 网上简单的解决方式是:“删除 Newtonsoft.Json.Net20.dll 后重新引用”

还有其他朋友说用下面的方法,可惜我还没用上

静态类中添加如下。

 

//缺少编译器要求的成员“ystem.Runtime.CompilerServices.ExtensionAttribute..ctor”

  1. namespace System.Runtime.CompilerServices
  2. {
  3. public class ExtensionAttribute : Attribute { }
  4. }

缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttribute..ctor” 解决方案的更多相关文章

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

    静态类中添加如下.此方法本人测试有效. //缺少编译器要求的成员“ystem.Runtime.CompilerServices.ExtensionAttribute..ctor” namespace  ...

  2. Json序列化提示缺少编译器要求的成员“ystem.Runtime.CompilerServices.ExtensionAttribute..ctor”

    //缺少编译器要求的成员“ystem.Runtime.CompilerServices.ExtensionAttribute..ctor” namespace System.Runtime.Compi ...

  3. 错误 1 缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttrib

    错误 1 缺少编译器要求的成员“System.Runtime.CompilerServices.ExtensionAttrib 删除Newtonsoft.Json.dll 引用 ,再重新引用即可. 原 ...

  4. 解决System.Runtime.CompilerServices.ExtensionAttribute..ctor 与 ‘ExtensionAttribute’ is ambiguous in the namespace ‘System.Runtime.CompilerServices’ 问题

    从VSS上获取以前的老项目,编译时报System.Runtime.CompilerServices.ExtensionAttribute..ctor 网上写的“删除 Newtonsoft.Json.N ...

  5. Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute'

    [TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from as ...

  6. "Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b7

    1.错误背景 系统安装了.net framework4.0.4.5,项目先使用VS2013(4.5)开发,后来又重新用VS2010开发(4.0),运行时出现这个错误 2.错误原因 In .Net 4. ...

  7. Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib 的一种情形

    没有引用任何.net 4.5的东西,也没有引用 Newtonsoft.dll,原因是引用了微软的tlb类型库,引用方法如 https://www.cnblogs.com/nanfei/p/108798 ...

  8. 未能从程序集“mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.Runtime.CompilerServices.TuppressIldasmAttribute”。已解决

    "/"应用程序中的服务器错误. 未能从程序集"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77 ...

  9. System.Runtime.CompilerServices.Unsafe

    System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Un ...

随机推荐

  1. linux使用:vi编辑器

    初学linux,目前是概念多于操作,所以记录下一些操作: 编辑某个文件():vi 文件名 编辑后保存退出::wq 编辑后不保存退出: :q! 参数:-R 只读模式 -x 文件加密(vim命令下使用) ...

  2. UI框架说明

    JQueryEasyUI jQuery EasyUI是一组基于jQuery的UI插件集合,而jQuery EasyUI的目标就是帮助web开发者更轻松的打造出功能丰富并且美观的UI界面.开发者不需要编 ...

  3. [转载]C#如何在webBrowser1控件通过TagName,Name查找元素(没有ID时)遍历窗体元素

    //防止页面多次刷新页面执行 ) { string GetUserName = System.Configuration.ConfigurationSettings.AppSettings[" ...

  4. [nowCoder] 局部最小值位置

    定义局部最小的概念.arr长度为1时,arr[0]是局部最小.arr的长度为N(N>1)时,如果arr[0]<arr[1],那么arr[0]是局部最小:如果arr[N-1]<arr[ ...

  5. Java中super的用法并与this的区别(转载)

    一.子类中如果需要调用父类中的构造函数,则需要使用super(),且必须在构造函数中的第一行 public class Demo1 { public static void main(String[] ...

  6. Lua 简单的IO交互 和迷宫代码

    function room1 () print("in room1") local move = io.read() if move == "south" th ...

  7. cojs QAQ的矩阵 题解报告

    题目描述非常的清晰 首先我们考虑(A*B)^m的求法,这个部分可以参考BZOJ 杰杰的女性朋友 我们不难发现(A*B)^m=A*(B*A)^(m-1)*B A*B是n*n的矩阵,而B*A是k*k的矩阵 ...

  8. cojs 西瓜 解题报告

    首先我们要知道pick公式 设二维平面内任意多边形面积为S 设多边形内部整点数为a 设多边形边界的整点数为b 则满足S=a+b/2-1 变形得a=S-b/2+1 由期望的线性性质我们把问题转化为 1. ...

  9. kmeans理解

    最近看到Andrew Ng的一篇论文,文中用到了Kmeans和DL结合的思想,突然发现自己对ML最基本的聚类算法都不清楚,于是着重的看了下Kmeans,并在网上找了程序跑了下. kmeans是unsu ...

  10. Unix编程之size_t、ssize_t

    http://blog.csdn.net/lalor/article/details/7426184 首先,我非常肯定以 及确定的告诉你ssize_t是有符号整型,在32位机器上等同与int,在64位 ...