.NET Core 3.1,并且无法加载文件或程序集System.Data.Entity,版本= 4.0.0.0 [英] .NET Core 3.1 and Could not load file or assembly System.Data.Entity, Version=4.0.0.0

查看:83
本文介绍了.NET Core 3.1,并且无法加载文件或程序集System.Data.Entity,版本= 4.0.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.Data.Entity 中包含什么Nuget程序包?

What Nuget package is System.Data.Entity in?

我正在将.NET Framework 4.5应用程序转换为.NET Core 3.1.在.NET Framework中,它使用 System.Linq.Dynamic ,并且在运行以下代码时应用程序崩溃:

I am converting a .NET Framework 4.5 app to .NET Core 3.1. In .NET Framework, it is using System.Linq.Dynamic, and the app is crashing when running this code:

var results = report.GroupBy(filter.ID, "it")
                    .Select($"new (it.Key as MainID, it as MyModel)");

出现此错误消息:

System.IO.FileNotFoundException:无法加载文件或程序集'System.Data.Entity,版本= 4.0.0.0,区域性=中性,PublicKeyToken = b77a5c561934e089'.该系统找不到指定的文件.文件名:'System.Data.Entity,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'在System.Linq.Dynamic.ExpressionParser..cctor()

System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. File name: 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' at System.Linq.Dynamic.ExpressionParser..cctor()

注意:它确实可以正确编译

Note: it does compile correctly

谢谢

System.Linq.Dynamic Nuget软件包已安装.

edit: The System.Linq.Dynamic Nuget package is installed.

推荐答案

似乎 System.Data.Entity System.Linq.Dynamic 程序集属于.NET框架.对于.NET Core,您可以尝试使用 System.Linq.Dynamic.Core 软件包,它与.NET Standard兼容.它的GitHub repo 说,它是程序集的.NET核心端口..NET 4.0动态语言功能.

It seems that System.Data.Entity and System.Linq.Dynamic assemblies belongs to .NET Framework. For .NET Core you can try to use System.Linq.Dynamic.Core package, it's compatible with .NET Standard. Its GitHub repo says, that it's .NET core port of the assembly for the .NET 4.0 Dynamic language functionality.

这篇关于.NET Core 3.1,并且无法加载文件或程序集System.Data.Entity,版本= 4.0.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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