没有引用任何.net 4.5的东西,也没有引用 Newtonsoft.dll,原因是引用了微软的tlb类型库,引用方法如 https://www.cnblogs.com/nanfei/p/10879800.html 解决办法:删除掉这个引用就好了,如果确实用到了其中的东西,那再找其它方案吧…
1.错误背景 系统安装了.net framework4.0.4.5,项目先使用VS2013(4.5)开发,后来又重新用VS2010开发(4.0),运行时出现这个错误 2.错误原因 In .Net 4.5 the ExtensionAttribute class was moved from System.Core to mscorlib.         ExtensionAttribute 类在4.5中从System.Core迁移到mscorlib中,项目运行时会按4.5的方法寻找导致异常. …
[TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.] System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typ…
我自己使用的解决方法 错误产生环境及非完美解决办法 错误提示:缺少编译器要求的成员"System.Runtime.CompilerServices.ExtensionAttribute..ctor" 这个错误真的非常诡异,因为双击这个错误的时候无法定位到出错的地方. 而且这个错误实在是非常不明确. 其实,产生这个错误的人大部分是因为引用了 Newtonsoft.Json.Net20.dll 这个类库. 网上简单的解决方式是:"删除 Newtonsoft.Json.Net20.…
静态类中添加如下.此方法本人测试有效. //缺少编译器要求的成员“ystem.Runtime.CompilerServices.ExtensionAttribute..ctor” namespace System.Runtime.CompilerServices {     public class ExtensionAttribute : Attribute { } } 网上找的其他方法 错误产生环境及非完美解决办法 错误提示:缺少编译器要求的成员“System.Runtime.Compile…
从VSS上获取以前的老项目,编译时报System.Runtime.CompilerServices.ExtensionAttribute..ctor 网上写的“删除 Newtonsoft.Json.Net20.dll 后重新引用”,并没有解决这个问题. 原文首发在我的主力博客 http://anforen.com/wp/2017/07/system-runtime-compilerservices-extensionattribute-ctor-%E4%B8%8E-extensionattrib…
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 问题描述: 再windows server 2008 r2 环境下搭建.net网站 ,运行是IIS7.0提示以上问题 解决方案: 这里需要注册一下ASP.NET 4.…
1.提示错误信息: zipSystem.TypeLoadException: Could not load type 'System.IO.Compression.CompressionLevel' from assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 2.描述 开发工具 VS2010( framwork4.0),  系统是接收中转系统,接收上级下发文件解析(压缩包)入…
这是因为先安装了 .NET Framework 4,随后启用了 .NET Framework 3.5 WCF HTTP 激活,则会发生此错误. 只需要已管理员用户在cmd中运行aspnet_regiis.exe -i -enable即可. 具体操作如下: 1.找到aspnet_regiis.exe位置如:C:\Windows\Microsoft.NET\Framework64\v4.0.30319并复制下来 2.使用管理员用户打开cmd然后执行cd C:\Windows\Microsoft.NE…
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/Eric_K1m/article/details/13629369今天在IIS上部署了一个WCF服务后,用IE打开这个WCF服务的时候出现了一下错误: 问题产生的原因是在安装了IIS后又装了其他版本的framework, 导致assemble中的版本和程序使用的版本不一致了.解决办法如下: 只要执行下面的操作,重新注册一下 asp.net …