【发布时间】:2019-11-26 01:20:30
【问题描述】:
我正在使用visual studio 2015 用 c# 编写代码。
我有一个逻辑项目,它是一个类库(包),还有一个 UI 项目,它是控制台应用程序(包),我将这两者与参考联系起来。
我有错误:CS0012 The type object is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
我在网上搜索过,我找到的解决方案是更改web.config 文件,但我没有。另一种解决方案是添加对 System.Runtime.dll 的引用,但是当我这样做时它会出现 1135 错误,例如“未定义或导入预定义类型 System.Object”。那么还有哪些解决方案呢?
【问题讨论】:
标签: c# .net visual-studio-2015 compiler-errors