问题描述
我有一个 .Net core 2.0 项目,它需要在 Visual Studio 2017 (v 15.4.4) 的同一解决方案中引用 .Net 4.6.2 项目(图片上的 BLL 和实体).我看到
当我尝试使用在 .Net 4.6.2 项目中定义的类时,出现以下错误:无法解析符号 'BLL'"(用于 BLL 项目).
您知道如何在 net core 2.0 项目中使用 .Net 4.6.2 项目吗?
我遇到了两个问题:
- 正如@Jamie Taylor 所说,我需要降级到 .NET Framework 4.6.1 才能与 .NET core 2.0 兼容.
- 由于降级,一些 Nuget 包与 .NET Framework 版本 4.6.1 发生冲突.EF 6.2(使用 .NET Framework 4.6.2)就是这种情况.所以我降级了所有需要的包,然后删除了packages"、bin"和obj"文件夹并进行了 Nuget 还原.
I have a .Net core 2.0 project which needs to reference a .Net 4.6.2 projets (BLL and Entities on the picture) in the same solution on Visual Studio 2017 (v 15.4.4). I saw this post, but event with .Net version 4.6.2, I still have the problem.
In my .Net core 2.0 project references, I have:
When I try to use a class defined in .Net 4.6.2 projects, I have following error: "Cannot resolve symbole 'BLL'" (for BLL project).
Do you have any idea what to do to use .Net 4.6.2 project in a net core 2.0 project?
I got two problems:
- As said @Jamie Taylor, I needed to downgrade to .NET Framework 4.6.1 to be compatible with .NET core 2.0.
- Because of downgrading, some Nuget packages where conflicting with the .NET Framework version 4.6.1. It was the case of EF 6.2 (which uses .NET Framework 4.6.2). So I downgraded all needed packages then deleted "packages", "bin" and "obj" folders and did a Nuget Restore.
这篇关于在 .NetCore 项目中引用 .Net 4.6.2 项目(VS2017 15.4.4)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!