#事故现场:

  在一个.net 4.0 的项目中使用dynamic,示例代码如下:

 private static void Main(string[] args)
{
dynamic obj;
obj = new { name = "jack" };
Console.WriteLine(obj.name);
}

  在读取obj.name时,报错:

One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?

#解决方法:

  在项目中,添加Microsoft.CSharp.dll的引用;

#参考:

https://stackoverflow.com/questions/11725514/one-or-more-types-required-to-compile-a-dynamic-expression-cannot-be-found-are

——————————————————————————————————————————————————

"One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?"的解决方法的更多相关文章

  1. One or more types required to compile a dynamic expression cannot be found.

    This is because dynamic keyword is a new C# keyword. So we need to import Microsoft.CSharp.dll. Here ...

  2. [SQL ERROR 800]Corresponding types must be compatible in CASE expression.

    SQL应用报错800.Corresponding types must be compatible in CASE expression. 错误描述: 11:00:51  [SELECT - 0 ro ...

  3. Jenkins 配置邮箱 530Authentication required ,535 uthentication failed 的解决方法

      错误 解决方法 530 Authentication required  需要展开SMTP认证,输入SMTP server能识别的用户信息 535 authentication failed  输 ...

  4. 安装Scrapy报错 error: Microsoft Visual C++ 14.0 is required解决方法

    [问题背景]:在Windows 10系统,pip install Scrapy,报错error: Microsoft Visual C++ 14.0 is required,还有提示Twisted需要 ...

  5. JavaFx出现错误Caused by: java.lang.NullPointerException: Location is required的解决方法

    问题截图: "C:\Program Files\Java\jdk1.8.0_131\bin\java.exe" "-javaagent:I:\IntelliJ IDEA ...

  6. (转)新建maven项目时报错Error:Maven Resources Compiler: Maven project configuration required for module 'XX'解决方法

    转载地址:https://blog.csdn.net/qq784515681/article/details/85070195 在新建maven项目时,Problems中报错: Error:Maven ...

  7. pandas-11 TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely错误解决方法

    pandas-11 TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be sa ...

  8. mybatis报错invalid types () or values ()解决方法

      原因: Pojo类User没提供无参数构造方法, 加上该构造方法后,问题解决 ### Cause: org.apache.ibatis.reflection.ReflectionException ...

  9. 'sessionFactory' or 'hibernateTemplate' is required解决方法

    这种情况就是在通过spring配置hibernate4的时候(注意,这里是hibernate4不是hibernate3,hibernate3的),使用的是HibernateDaoSupport的这种方 ...

随机推荐

  1. LeetCode刷题191124

    博主渣渣一枚,刷刷leetcode给自己瞅瞅,大神们由更好方法还望不吝赐教.题目及解法来自于力扣(LeetCode),传送门. 算法: 给出一个无重叠的 ,按照区间起始端点排序的区间列表. 在列表中插 ...

  2. 简单搭建docker registry

    已知信息: 服务端IP:192.168.7.2xx 客户端IP:192.168.7.1xx 服务端: docker registry中镜像本地映射地址:/Users/dockergit/private ...

  3. Python 周刊第 418 期

    新闻 PyCon US 2020 开始接受财务赞助! https://pycon.blogspot.com/2019/10/financial-aid-launches-for-pycon-us-20 ...

  4. Ubuntu下预览raw格式图片

    默认Ubuntu下资源管理器是不可以直接预览raw格式图片的,这就给查看图片带来很大的不便,下面我们就选择安装UFRaw来预览Raw格式图片 1. 首先在terminal安装UFRaw sudo ap ...

  5. react使用moment进行日期格式化

    导入moment import moment from 'moment'; 使用方式 年月日,时分秒 moment().format('YYYY-MM-DD HH:mm:ss'); // 2019-0 ...

  6. 前端之JavaScript基础及使用方法

    JavaScript概述 ECMAScript和JavaScript的关系 1996年11月,JavaScript的创造者--Netscape公司,决定将JavaScript提交给国际标准化组织ECM ...

  7. 创建多进程之multiprocess包中的process模块

    创建多进程之multiprocess包中的process模块 1.process模块是一个创建进程的模块 Process([group [, target [, name [, args [, kwa ...

  8. C#-Excel导入工资条群发邮箱

    第一次写随笔,一名在实习的程序猿,做的一个小应用,需要的朋友可以参考参考, 使用WinForm实现了一个导入Excel,群发工资条的功能.功能已经实现,还不够完善,. 大致运用了OleDbConnec ...

  9. django简单密码加密和效验

    通过django自带的类库,来加密解密很方便,下面来简单介绍下: 导入包: from django.contrib.auth.hashers import make_password, check_p ...

  10. 应届生offer指南

    通用技术 1.一般公司对应届生都要考察编程能力,所以应聘之前先刷刷题.我做面试官出的编程题两年没有变过.就是这道