简体   繁体   English

linqpad无法加载文件或程序集'System.Runtime,版本= 4.1.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a'

[英]linqpad Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I am new to LinqPad. 我是LinqPad的新手。 I started using LinqPad5 and adding connection using 'use a typed data context from your own assembly' option. 我开始使用LinqPad5,并使用“使用您自己的程序集中的键入数据上下文”选项添加连接。 My entities are part of ASP.Net Core 1.0 website project. 我的实体是ASP.Net Core 1.0网站项目的一部分。 After download, I selected 'Entity Framework Core 1.1' driver, and then in 'Path to Custom Assembly' I selected the generated assembly for my web site. 下载后,我选择了“ Entity Framework Core 1.1”驱动程序,然后在“自定义程序集的路径”中为我的网站选择了生成的程序集。 After selection it gives me following error: 选择后,它给我以下错误:

Error loading custom assembly: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 加载自定义程序集时出错:无法加载文件或程序集'System.Runtime,版本= 4.1.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a'或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

I have tried selecting assembly from both bin\\release\\netcoreapp1.0 and bin\\release\\publishoutput folder but it gives the same error. 我尝试从bin \\ release \\ netcoreapp1.0和bin \\ release \\ publishoutput文件夹中选择程序集,但是它给出了相同的错误。

As stated in the driver download page, "Your project must target .NET Framework - not .NET Core." 如驱动程序下载页面所述,“您的项目必须以.NET Framework为目标-而不是.NET Core。”

In other words, the driver supports ASP.NET Core for .NET Framework , not ASP.NET Core for .NET Core . 换句话说,驱动程序支持ASP.NET Core for .NET Framework ,而不支持ASP.NET Core for .NET Core

The reason for this is that LINQPad is a .NET Framework application, and right now you cannot reference a .NET Core assembly from a .NET Framework application. 这样做的原因是LINQPad是.NET Framework应用程序,现在您不能从.NET Framework应用程序引用.NET Core程序集。 The frameworks are incompatible. 框架不兼容。

The situation should improve later this year, with the release of .NET Core 2.0. 随着.NET Core 2.0的发布,情况将在今年晚些时候得到改善。 You should then be able to put your data context into a projects that targets .NET Standard 2.0 , which will be compatible with LINQPad. 然后,您应该能够将数据上下文放入针对.NET Standard 2.0的项目中,该项目将与LINQPad兼容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 '无法加载文件或程序集'System.Runtime,版本= 4.1.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a' - 'Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 无法加载文件或程序集“System.Runtime,版本=4.2.1.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a” - Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' NET 核心 - 无法加载文件或程序集'System.Runtime,版本 = 6.0.0.0,文化 = 中性,PublicKeyToken = b03f5f7f11d50a3a',.NET 6 - NET core - Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ', .NET 6 无法加载文件或程序集“System.Runtime,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一 - Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies 无法加载'System.Runtime,版本= 4.2.1.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a' - 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded Azure应用服务 - 无法加载文件或程序集'System.Net.Http,Version = 4.2.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a' - Azure app service - Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 无法加载文件或程序集“ System.Configuration,版本= 4.0.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a”或其依赖项之一 - Could not load file or assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies 无法加载文件或程序集“System.IO,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一 - Could not load file or assembly 'System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies 无法加载文件或程序集“System.Net.Http,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a” - Could not load file or assembly "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 无法加载文件或程序集“Microsoft.Build.Utilities.Core,Version=14.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a” - Could not load file or assembly 'Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM