关于异常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 ...
随机推荐
- YouTube视频插入Markdown
举个例之: 正常YouTube会生成一个<iframe>直接在HTML里面引用即可: <iframe width="420" height="315&q ...
- SQL Server 造成cpu 使用率高的 6 原因
第一种: 编译和重编译执行计划. 第二种: 排序与聚合. 第三种: 表格连接操作. 第四种: max degree of parallelism. 第五种: max worker threads. 第 ...
- MFC连接ftp服务器
CInternetSession* m_pInetSession; CFtpConnection* m_pFtpConnection; //连接服务器的函数 BOOL CftpClientDlg: ...
- HTML5 页面制作工具
https://www.zhihu.com/question/30087283 HTML5 页面制作工具 免费的基于 HTML 5 的 Web Apps 生成器工具网站 81 235 初页 制 ...
- poj 2704 Pascal's Travels_记忆化搜索
一道简单但是题意蛋疼的题目 题意:给你个n*n的图,开始在左上角,要求走到右下角有多种走法,图上的数表示走几步,只能向右或向下走. #include<iostream> #include& ...
- Oracle password expire notices
/usr/local/webserver/tomcat6/logs/logbak/zsxxw.log.2015-03-21.txt:2015-03-22 00:47:26,366 ORA-28002: ...
- 移动前端之viewport
在移动设备上进行网页的重构或开发,首先得搞明白的就是移动设备上的viewport了,只有明白了viewport的概念以及弄清楚了跟viewport有关的meta标签的使用,才能更好地让我们的网页适配或 ...
- Swift中的集合类型
一.引子: 在2014年10月TIOBE编程语言排行榜中,Swift位居第18位,从2014WWDC发布会首次公布至今不到半年时间,swift一直受到编程人 员的追捧,其热衷程度并不亚于当红巨星Tay ...
- Windows 2012 AD配置
//本文选在快帮网,非原创. Active Directory概述: 使用 Active Directory(R) 域服务 (AD DS) 服务器角色,可以创建用于用户和资源管理的可伸缩.安全及可管理 ...
- Hexo 官方主题 landscape-plus 优化
博主喜欢简洁大方的Hexo主题,看了不下100个主题之后,最终选择了 landscape-plus 主题(针对中国大陆地区,对Hexo官方主题landscape进行优化后的版本).更多Hexo主题资源 ...