简体   繁体   English

使用与安装的连接器不同的MySql.Data版本

[英]Use a version of MySql.Data different than installed connector

I'm looking for a solution (if possible at all) to use a version of MySql.Data that is more recent than the installed connector on the dev machine. 我正在寻找一种解决方案(如果可能的话),以使用比在开发机上安装的连接器更新的MySql.Data版本。

For example, we had the problem of some Mysql bug showing up in our debug (EF6 was transforming a StartsWith() in an SQL Locate() ) even though it was said to be fixed in the DLL present in the project (6.9.5). 例如,我们有一个问题,就是在调试中会出现一些Mysql错误(EF6在SQL Locate()转换了一个StartsWith() Locate() ),即使据说它已在项目中存在的DLL中修复了(6.9.5)。 )。

When we tested it with a machine that had the 6.9.5 connector installed (in Program Files) it worked. 当我们使用安装了6.9.5连接器的计算机(在Program Files中)对其进行测试时,它可以工作。

Now, I realize we should have the most up-to-date connector installed, but we also sometimes (even if rarely) have to use some older version. 现在,我意识到我们应该安装了最新的连接器,但是有时(即使很少)我们也必须使用一些较旧的版本。 Or we have to fix something without having the time to wait for an admin to grant us the install of a new connector. 否则我们必须修复某些问题而没有时间等待管理员授予我们新连接器的安装权。

So the question is, is there any way to force the use of the DLL that is actually in the project references, no matter which one is installed on the machine ? 因此,问题是, 无论计算机上安装了哪一个DLL,都有什么方法可以强制使用项目引用中实际存在的DLL?

And the bonus question, what happens if we have the most recent connector installed and open a project with an older DLL ? 额外的问题是,如果我们安装了最新的连接器并使用旧的DLL打开项目,会发生什么? will it use the one installed or is it only when the DLL inside the project is more recent ? 它会使用已安​​装的DLL还是仅在项目中的DLL是更新的时使用?

EDIT: 编辑:

As pointed by a now deleted comment, shouldn't the project use the DLL referenced in the properties anyway ? 正如现在已删除的注释所指出的,该项目是否仍应使用属性中引用的DLL? This one was installed through NuGet and pointing to the Packages folder. 这是通过NuGet安装的,并指向Packages文件夹。

I have a project (vs 2013) using v6.5.5.0 (because of the server where it gets deployed) while I update to the newest version on my machine. 我有一个项目(vs 2013)使用v6.5.5.0(因为它部署在服务器上),同时我更新到计算机上的最新版本。 This is what I did: Copied the dll from the server to my machine, added the reference to the project, set in properties "Copy Local = true" and everything works fine. 这就是我所做的:将dll从服务器复制到我的机器,添加对项目的引用,在属性“ Copy Local = true”中设置,一切正常。 Never had a issue. 从来没有问题。

I think the way to force it is to set "Copy Local=true", it should use the referenced dll every time. 我认为强制执行此操作的方法是设置“ Copy Local = true”,它每次都应使用引用的dll。

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

相关问题 如何在dotnet core 2.2版本中使用MySql.Data引用 - How to use MySql.Data refrence in dotnet core 2.2 Version BLToolkit-mysql-connector异常:无法加载文件或程序集MySql.Data,版本= 6.9.7.0 - BLToolkit-mysql-connector exception: Could not load file or assembly MySql.Data, Version=6.9.7.0 ClickOnce应用程序抛出错误“..需要首先在全局程序集缓存(GAC)中安装程序集MySql.Data版本6.5.4.0。” - ClickOnce Application throws error “..requires assembly MySql.Data Version 6.5.4.0 be installed in the Global Assembly Cache (GAC) first.” MySQL:6.6.5.0版本的MySql.Data无法加载 - MySQL : 6.6.5.0 version of MySql.Data couldn't load MySqlBackup.NET与MySql.Data版本有关的问题 - MySqlBackup.NET issue with MySql.Data version 无法加载文件或程序集“ mysql.data”,版本= 6.7.4.0 - Could not load file or assembly 'mysql.data,' version=6.7.4.0 收到错误“文件或程序集名称'MySql.Data,版本= 6.7.4.0…'” - Getting an Error "File or assembly name 'MySql.Data, Version=6.7.4.0 …' MySql.Data,无法解决,因为它是针对另一个版本构建的 - MySql.Data, could not be resolved because it was built against the another version 无法加载文件或程序集'MySql.Data,版本= 6.7.4.0 - Could not load file or assembly 'MySql.Data, Version=6.7.4.0 无法加载文件或程序集 'MySql.Data,版本 = 6.2.2.0 - Could not load file or assembly 'MySql.Data, Version=6.2.2.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM