Skip to content

"Could not load file or assembly MySQL.data"

Tomas Westerlund

Tomas Westerlund

Asked Jan 11, 2013, 8:36 AM EST2 answers
Share
LinkedInX
Hi,
I have created an OutlookAddin and it works on my computer however when I publish it and try to install it on another computer it gives me the error message "Could not load file or assembly MySQL.data".

The property "Copy Local" is set to true on both MySQL.Data and MySQL.Data.Entity which are the 2 DLL's that I use.

Can anyone help me with this?

Thanks in advance,
Best regards,
Tomas

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Akkiraju Ivaturi
    0
    Is there a different/incorrect version of MySql.Data.dll installed in the GAC (Global Assembly Cache)? I've seen this give similar error messages before.
    0
  • Tomas Westerlund
    0
    In this case it wasn't however I read about it as well.

    The thing was that on my local computer I had MySQL Connector installed so I had a version of MySQL.Data and MySQL.Data.Entity installed but the user didn't. It was a rookie mistake.

    In this case I just checked "Copy Local" on the two references (MySQL.Data.dll and MySQL.Data.Entity.dll) and it fixed the problem.

    However, as mentioned before, I read a lot of people having problem with this because of having another version installed under GAC. You can find your GAC version here (Win7):
    c:\Windows\assembly

    and that version should be same as the version you are using in your application.

    Best regeards,
    Tomas
    0