简体   繁体   中英

Could not load file or assembly 'MySql.Data, Version=8.0.29.0.. The located assembly's manifest definition does not match the assembly reference

I can't launch my C# project.

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'MySql.Data, Version=8.0.29.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'. The located assembly's manifest definition does not match the assembly reference. (0x80131040) File name: 'MySql.Data, Version=8.0.29.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' at MySQL_namespace.SQLWork.Initialize(String server_name, String _port, String database_name, String user, String pass) ...

It used to work before long time ago. Now, after I had issues with MySQL connection I have updated MySQL connector nuget. After that I also rebuilt it using .Net 5.0. Can't launch it now as it returns above error.

You can try as follows:

  1. After deleting the original nuget.
  2. Clean the project.
  3. Reinstall the new nuget.
  4. Rebuild the project.

您是否确保将其复制到输出目录?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question Windows Universal App: Could not load file or assembly - The located assembly's manifest definition does not match the assembly reference Could not load file or assembly: The located assembly's manifest definition does not match the assembly reference Could not load file or assembly. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly XXX or one of its dependencies. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly 'WebGrease' one of its dependencies. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly or one of its dependencies. The located assembly's manifest definition does not match the assembly reference “The located assembly's manifest definition does not match the assembly reference” The located assembly's manifest definition does not match the assembly reference Could not load file or assembly 'System.Web.Mvc' or one of its dependencies. The located assembly's manifest definition does not match the assembly “The located assembly's manifest definition does not match the assembly reference” after installing new version
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM