The type 'System.Object' is defined in an assembly that is not referenced

记录一个错误,报 The type ‘System.Object‘ is defined in an assembly that is not referenced,[System.Runtime]

配置文件加上后仍报错!

<system.web>

<compilation debug="true" targetFramework="4.5">

<assemblies>

<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

</assemblies>

</compilation>

</system.web>

解决方法:移除Bin System.ValueTyple.dll rebuild成功。

The type 'System.Object' is defined in an assembly that is not referenced

原文地址:https://www.cnblogs.com/dmyao/p/9869920.html

时间: 2024-08-29 20:05:09

The type 'System.Object' is defined in an assembly that is not referenced的相关文章

JsonException: Max allowed object depth reached while trying to export from type System.Single

在进行类转json字符串时,报错JsonException: Max allowed object depth reached while trying to export from type System.Single. ok,实际上是类的属性中有json不能识别的数据类型,我这里就脑残的float.去除掉之后就ok了. (备注:用的是LitJson) 那一般什么类型是允许的呢? 我在JsonData类中找到了答案. public JsonData(bool boolean); public

Unable to cast object of type &#39;System.Int32&#39; to type &#39;System.String&#39;.

最近在研究.netcore,尝试把前后端完全分离.但是在写接口的时候,Post参数是FromBody的时候报错了 Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request. System.InvalidCastException: Unable to cast object of type

Beginning Scala study note(8) Scala Type System

1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the hierarchy and the type Nothing at the bottom of the hierarchy. All Scala types inherit from Any. # Using Any, Book extends AnyRef, and x is an Int that

4.1 所有类型都从 System.Object 派生

"运行时"要求各个类型最终都从 System.Object 派生.(显示继承/隐式继承) 提供公共方法(public): Equals 判断两个对象相等,true 表示相等. GetHashCode 返回对象的哈希值. ToString 默认返回类型的完整名称(this.GetType().FullName) GetType 返回 Type 派生的一个类型实例,指出对象的类型,返回的 Type 对象可以与反射类配合,获取与对象类型相关的元数据信息.GetType 为非虚方法,防止子类重

NotSupportedException-无法将类型“System.DateTime”强制转换为类型“System.Object”

几张图就可以说明一切 2015-03-29 21:54:09,206 [77] ERROR log - System.NotSupportedException: 无法将类型“System.DateTime”强制转换为类型“System.Object”.LINQ to Entities 仅支持强制转换 EDM 基元或枚举类型. 在 System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.ValidateAndAdjustCastType

System.Object 基类

System.Object 基类 System.Object在.Net中是所有类型的基类,任何类型都直接或间接地继承自System.Object.没有指定基类的类型都默认继承于System.Object. 基类特性 正由于所有的类型都继承于System.Object.因此,所有的类型都具有下面这些特性: GetType()方法,获取对象的类型. Equals.ReferenceEquals和==,判断对象是否相等. ToString()方法,获取对象的字符串信息,默认返回对象带命名空间的全名.

第4章 类型基础 -- 4.1 所有类型都从System.Object派生

4.1 所有类型都从System.Object派生 “运行时”要求每个类型最终都从System.Object类型派生. 由于所有类型最终都从System.Object派生,所以每个类型的每个对象都保证了一组最基本的方法. System.Object类提供了如下表所示的公共实例方法: 表4-1 System.Object的公共方法 Equals 若两个对象具有相同的值,就返回 true .详情请参考"对象相等性和同一性" GetHashCode 返回对象的值的哈希码.如果某个类型的对象要

System.Object

[System.Object] 1.所有类均继承自System.Object,无论自定义类有无显式继承于System.Object. 2.Object的GetType()实例方法用于获取一个类的类型对象System.Type.通过System.Type对象的Name方法,可以获取一个类的类名. GetType()方法用于返回对象真实类型,如果一个Base ref引用了一个Derived对象,则GetType().Name返回Derived. 3.Object的Equals方法有实例和类方法2种.

Python中type与Object的区别

Python中type与Object的区别 在查看了Python的API后,总算明白了.现在总结如下: 先来看object的说明: Python中关于object的说明很少,甚至只有一句话: class object The most base type 从介绍上看这也是Python对类型统一做出的努力.所以这里的object与Java的Object类有着异曲同工之妙,而且可以推测这个object很可能就是一个定义了一个类型的"空类" 再来看type的说明: class type(ob