在.NET 4.6项目中引用.NET Core库 [英] Reference a .NET Core Library in a .NET 4.6 project

查看:303
本文介绍了在.NET 4.6项目中引用.NET Core库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许我对 .NET Core库的含义有一些了解,但是当我尝试使用Visual Studio 2015在.NET 4.6程序集中添加.NET Core库时,出现错误:

Maybe I have a miss understanding of what ".NET Core Library" means, but when I try to add a .NET Core Library in a .NET 4.6 Assembly using Visual Studio 2015, I get the error:


无法添加对 ...的引用。

A reference to '...' could not be added.

我知道有什么问题吗?

这是我在其中配置的.NET Core程序集的project.json

This is what I configured in project.json of the .NET Core assembly

"frameworks": {
   "net451": { },
   "dotnet5.4": {
     "dependencies": {
     "Microsoft.CSharp": "4.0.1-beta-23516",
     "System.Collections": "4.0.11-beta-23516",
     "System.Linq": "4.0.1-beta-23516",
     "System.Runtime": "4.0.21-beta-23516",
     "System.Threading": "4.0.11-beta-23516"
  }
}


推荐答案

答案将在演示文稿中显示

The answer is shown in a presentation

仅适用于尚未发布的ASP.NET Core RC 2,它支持在其中引用xproj csproj将被添加。

Only with ASP.NET Core RC 2 which is not released yet, a support for referencing xproj in csproj will be added.

这篇关于在.NET 4.6项目中引用.NET Core库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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