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.
CodePudding user response:
Did you make sure to copy it to the output directory?
CodePudding user response:
You can try as follows:
- After deleting the original nuget.
- Clean the project.
- Reinstall the new nuget.
- Rebuild the project.