Reference a .Net 4.6.2 project in a .NetCore project (VS2017 15.4.4)(在 .NetCore 项目中引用 .Net 4.6.2 项目(VS2017 15.4.4))
问题描述
我有一个 .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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 .NetCore 项目中引用 .Net 4.6.2 项目(VS2017 15.4.4)
基础教程推荐
- C# 9 新特性——record的相关总结 2023-04-03
- 将数据集转换为列表 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 如果条件可以为空 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
