关于异常Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
原文:关于异常Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
关于Microsoft.CSharp.RuntimeBinder.RuntimeBinderException的异常一般来自于两种,
第一种:
Predefined type 'Microsoft.CSharp.RuntimeBinder.Binder' is not defined or imported
解决它的办法是,直接在项目引用中添加 Micorsoft.Csharp 就可以了。
第二种:
an exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException'
引起这种异常的错误是因为匿名类型是不能跨程序集(assembly)的,第一种解决办法是使用 Expando ,第二个办法是在源程序集的AssemblyInfo.cs中加入:
[assembly: InternalsVisibleTo("NameSpace1.SubNameSpace1")]
使用第二种方法后,匿名类型可以传递到目标程序集。
----------------------问题2-----------------------------------------------
Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert'
解决方法:添加引用Microsoft.CSharp.dll. This provides the required types for using dynamic in C#.
关于异常Microsoft.CSharp.RuntimeBinder.RuntimeBinderException的更多相关文章
- Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: “object”未包括“get_Range”的定义
asp.net操作Excel合并单元格时,抛出了异常: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: "object" ...
- 预定义的类型“Microsoft.CSharp.RuntimeBinder.Binder”未定义或未导入
http://www.mzwu.com/article.asp?id=3611 因为新加了Microsoft.CSharp的引用, 只需要重新生成一下项目,就可以消除这个错误提示
- CS0656 缺少编译器要求的成员“Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create”
问题出现原因:在net core使用动态类型dynamic,在编译的时候提示错误信息如上. 解决方案: 1.不用dynamic类型 2.在使用的地方添加一个dll,Microsoft.CSharp,或 ...
- .net 4.0 : Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.****'
解决办法,添加 MicroSoft.CSharp 的引用.
- 是否缺少对 Microsoft.CSharp.dll 和 System.Core.dll 的引用?
错误提示 : 预定义的类型“Microsoft.CSharp.RuntimeBinder.Binder”未定义或未导入 是否缺少对 Microsoft.CSharp.dll 和 System.Core ...
- [C#] 生成 (web): 未能加载文件或程序集“Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7
有时候编译asp.net会遇到奇怪的错误: 生成 (web): 未能加载文件或程序集"Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, ...
- Microsoft.CSharp.CSharpCodeProvider
Microsoft.CSharp.CSharpCodeProvider MSDN 提供对 C# 代码生成器和代码编译器的实例的访问.类提供可用来检索 C# ICodeGenerator 和 ICode ...
- 【.net】“Newtonsoft.Json”已拥有为“Microsoft.CSharp”定义的依赖项。
#事故现场: “Newtonsoft.Json”已拥有为“Microsoft.CSharp”定义的依赖项. #事故原因: 安装的Newtonsoft.Json版本为11.0.2,版本过高,与Micro ...
- 找不到编译动态表达式所需的一种或多种类型。是否缺少对 Microsoft.CSharp.dll 和 System.Core.dll 的引用?
提示“找不到编译动态表达式所需的一种或多种类型.是否缺少对 Microsoft.CSharp.dll 和 System.Core.dll 的引用? ”错误 解决方法: 将引入的COM对象(misc ...
随机推荐
- [汇编语言]-debug跟踪执行
ffff:0-ffff:d内存中数值求和放入dx寄存器中 代码: add.asm assume cs:code code segment mov ax,0ffffH mov ds,ax mov dx, ...
- win32 清空ListBox所有内容
Q:clear listbox hi i am working in VC++ 6 using Win32 App. .............tell me how to clear the lis ...
- Mongodb 安装和启动
一.首先去官网下载对应的的mongodb ,本人的操作系统是win7 64位 mongodb-win32-x86_64-2.0.6.rar 解压安装:进入到bin目录下,会看到N多的.exe文件 二. ...
- ZJUTACM(hd1259)
ZJUTACM 点我 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
- 用JavaScript将数字转换为大写金额
var digitUppercase = function(n) { var fraction = ['角', '分']; var digit = [ '零', '壹', '贰', '叁', '肆', ...
- Oracle EBS-SQL (PO-18):检查工作台下达的PR在系统找不到.sql
select * From apps.po_requisitions_interface_all---------------------------------------------------- ...
- 工作无聊,闲来无事,自己学习 android入门
工作无聊,闲来无事,自己学习. 最近几天看了看有关android的UI设计,布局以及android有关控件的知识,算是进一步了解了 android的相关内容. 明天就是周末了,明天及后天,我打算开始学 ...
- SDK Manager 报错:Connection timed out: connect
安装Eclipse的安卓开发环境的时候,安装sdk时报错,出现: 解决办法: 1.选择左上角的Tools 2.选择Options,勾选下面红色框的东西 3. 4.重新重启一下sdk manager即可
- 站在巨人的肩膀上,C++开源库大全
程序员要站在巨人的肩膀上,C++拥有丰富的开源库,这里包括:标准库.Web应用框架.人工智能.数据库.图片处理.机器学习.日志.代码分析等. 标准库 C++ Standard Library:是一系列 ...
- HDOJ-1041 Computer Transformation(找规律+大数运算)
http://acm.hdu.edu.cn/showproblem.php?pid=1041 有一个初始只有一个1的串 每次都按①0 -> 10;②1 -> 01;这两条规则进行替换 形如 ...