Tuesday, March 14, 2017

Buggish: MySql.Data, unable to compile

Error    1    Could not load file or assembly 'MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
My Solution: Use the stable version in Visual Studio 2013 NuGet Package.

My steps I think I've taken:
1. Used NuGet Package to install latest version (7.0.6)
2. Attempted to compile, completed compile then realized that dll was not in the bin folder
3. I didn't realize that NuGet Package is saved in the packages folder, so I downloaded the source mysql-connector-net-6.9.9-src
4. Compiled
5. While trying to find my project folder, I stumbled onto the package folder so I used Add Reference to add the dll for 7.0.6.
6. Compiled, and I got a similar as the one above. (Unsure if the version is the same)
7. I removed the reference and tried to reinstall via NuGet (received similar error)
8. Repeated several times with the compiled code, modifying web.config, restart, reboot
9. Finally, I tried to download the latest stable version.

I am not familiar with NuGet, assemblies, and GAC. I am familiar with the terms but usually have worked by following directions so have not delved into them much before. I do not think my understanding has increased any bit after this either, but hopefully this help someone as I haven't seen this solution.

No comments:

Post a Comment