在.NetCore项目(VS2017 15.4.4)中引用.Net 4.6.2项目 [英] Reference a .Net 4.6.2 project in a .NetCore project (VS2017 15.4.4)
问题描述
我有一个.Net core 2.0项目,需要在Visual Studio 2017(v 15.4.4)的同一解决方案中引用.Net 4.6.2项目(图片上的BLL和Entities)。我看到了
当我尝试使用.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 Restore。
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项目(VS2017 15.4.4)中引用.Net 4.6.2项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!