#事故现场:

  在一个.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. 属性文件——Java&Spring

    属性文件 什么是属性文件 ? 定义:一个扩展名为properties文件,属性文件都是以key-value(键值对)来保存文件的内容,如:log4j.properties,db.properties等 ...

  2. diango使用顺序

    使用顺序 settings 静态文件配置 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) #文件夹根目录 ...

  3. python 导入同级目录文件时报错

    当你import的时候,python解释器只会在sys.path这个变量(一个list,你可以print出来看)里面的路径中找可能匹配的package或module. 而一个package跟一个普通文 ...

  4. Python 变量与运算符

    变量 基本概念: 1. 变量,名字,数据的唯一标识2.变量命名: 字母.数字.下划线: 不能以数字开头: 区分大小写: 不能使用保留字和关键字: 命名要有意义:(多个单词时,推荐使用下划线连接) 3. ...

  5. win7安装centos7虚拟机

    1. 场景描述 因测试中需要linux集群,目前的服务器不太方便部署,需要本机(windows7)启动多个linux虚拟机,记录下,希望能帮到需要的朋友. 2. 解决方案 2.1 软件准备 (1)使用 ...

  6. Jmeter文件目录介绍

    当我们解压安装包后,在主目录下有以下文件目录,在这里就不一一介绍,主要介绍一些会经常使用到的文件或目录 1.bin目录——存放启动脚本.配置文件.模板等文件 examples:该目录下存放Jmeter ...

  7. C++ 课程设计——电梯调度系统

    这是我在本学期C++课程最后的课程设计报告,源代码将会上传到GitHub上. 一.背景 随着经济的不断发展,越来越多的摩天大楼拔地而起,而电梯作为高层建筑物种的运送人员货物的设备也越来越被广泛使用.电 ...

  8. C# 从图片中截取一部分图片,并返回所截取的图片

    /// <summary> /// 从图片中截取一部分图片 /// </summary> /// <param name="fromImagePath" ...

  9. go-爬段子

    爬取搞笑的段子,横向爬取+纵向爬取 横向爬取爬页数,纵向爬取,爬每页的内容 package main import ( "fmt" "io" "net ...

  10. WGS84、WebMercator、GCJ02和BD09坐标系简介与转换

    WGS84(GPS): 地心坐标系,空间直角坐标系,原点与地球质心重合,为GPS采用的坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系. 通过GPS可以直接获取WGS84下的坐标(B,L, ...