码迷,mamicode.com
首页 > Web开发 > 详细

ASP.NET Core: You must add a reference to assembly mscorlib, version=4.0.0.0

时间:2017-06-27 16:22:39      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:issues   library   standard   技术   flow   add   ports   rar   mic   

ASP.NET Core 引用外部程序包的时候,有时会出现下面的错误:

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‘. Sample.Infrastructure..NETStandard,Version=v1.6

技术分享

解决方式:添加"Microsoft.NETCore.Portable.Compatibility": "1.0.0"引用。

{  "version": "1.0.0-*",  "dependencies": {    "NETStandard.Library": "1.6.0",    "Microsoft.NETCore.Portable.Compatibility": "1.0.0"  },  "frameworks": {    "netstandard1.6": {      "imports": [ "dnxcore50", "net451", "portable-net45+win81" ]    }  }}

参考资料:

ASP.NET Core: You must add a reference to assembly mscorlib, version=4.0.0.0

标签:issues   library   standard   技术   flow   add   ports   rar   mic   

原文地址:http://www.cnblogs.com/tangjiansheng/p/7085533.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!