ASP.NET 5.0的核心错误CS0012:类型'对象'在汇编中定义的“mscorlib程序 [英] ASP.NET Core 5.0 error CS0012: The type 'Object' is defined in assembly 'mscorlib

查看:739
本文介绍了ASP.NET 5.0的核心错误CS0012:类型'对象'在汇编中定义的“mscorlib程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2015年我有一个kproj,在这个项目中我想添加到装配,是不是在任何公开的NuGet包源提供一个参考,所以我创建了自己的NuGet包,并通过这种方式能引用到这个组件。

In Visual Studio 2015 I have a kproj, in this project I wanted to add a reference to an assembly that is not available in any public nuget package source, so I've created my own nuget package and this way was able to add the reference to this assembly.

问题是,现在我得到了以下异常:

The problem is that now I'm getting the following exception:

ASP.NET 5.0的核心错误CS0012:类型'对象'在未引用的程序集定义。您必须添加到程序集的引用'mscorlib程序,版本= 4.0.0.0,文化=中性公钥= b77a5c561934e089'。

ASP.NET Core 5.0 error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

这是如何克服这个任何想法?

Any ideas on how to overcome this?

推荐答案

解决它。
从project.json删除了框架aspnetcore50

Solved it. Removed the framework "aspnetcore50" from the project.json

这篇关于ASP.NET 5.0的核心错误CS0012:类型'对象'在汇编中定义的“mscorlib程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆