When I try to install the MySQL provider on a copy of Umbraco 7.4.2 I get an error telling me the package contains incompatible dlls.
The error I get is;
An error occurred while loading a referenced assembly 'MySql.Data' see
error log for full details.
I installed it anyway and when I try to connect to the database I get;
Error validating the Data source: Could not load file or assembly
'MySql.Data, Version=6.5.4.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I have a copy of MySql.Data.dll in the solution but obviously its the wrong one, what do I need to do to resolve this issue?
Many thanks for the fast reply, I was pulled away with another project yesterday so I haven't had time to look into this one yet.
The Solution is a large project we had written under Umbraco 4 which we are now re-writing to use the features in version 7. It is all compiled under .net 4.6.1 and when I change the target framework I get a lot of warnings about nuget packages and inconsistent versioning. We have installed MySQL for other parts of the project via the nuget package which uses the 6.9.8 version and we have code relying on that reference.
I'm not sure where that leaves me, or if it's possible to run the site on .net 4.5 even though I'm compiling against a higher framework (sounds like a bad idea to me). And even if I do won't the reference I have to the newer version still be an issue.
I realise this has veered away from being a CMS Import issue and more into my config but any help you can offer would be appreciated as I would really like to use your tool for migrating content across our installs.
Simon, in your web.config find the DbProviderFactories and make sure the MySql one looks like this, with no version number:
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
And it might be necessary (but I don't think so) to add an assembly redict in the runtime section, something like:
MySQL Data Provider version issue
When I try to install the MySQL provider on a copy of Umbraco 7.4.2 I get an error telling me the package contains incompatible dlls.
The error I get is;
I installed it anyway and when I try to connect to the database I get;
I have a copy of MySql.Data.dll in the solution but obviously its the wrong one, what do I need to do to resolve this issue?
Hi Simon,
This dll comes from .net 4.5. Maybe you can use that .net version for the site?
Hope this helps,
Richard
Hi Richard,
Many thanks for the fast reply, I was pulled away with another project yesterday so I haven't had time to look into this one yet.
The Solution is a large project we had written under Umbraco 4 which we are now re-writing to use the features in version 7. It is all compiled under .net 4.6.1 and when I change the target framework I get a lot of warnings about nuget packages and inconsistent versioning. We have installed MySQL for other parts of the project via the nuget package which uses the 6.9.8 version and we have code relying on that reference.
I'm not sure where that leaves me, or if it's possible to run the site on .net 4.5 even though I'm compiling against a higher framework (sounds like a bad idea to me). And even if I do won't the reference I have to the newer version still be an issue.
I realise this has veered away from being a CMS Import issue and more into my config but any help you can offer would be appreciated as I would really like to use your tool for migrating content across our installs.
Many thanks Simon
Simon, in your web.config find the
DbProviderFactories
and make sure the MySql one looks like this, with no version number:And it might be necessary (but I don't think so) to add an assembly redict in the
runtime
section, something like:Great suggestion Sebas, does that work for you Simon?
Yes this has worked a treat, I did need the assembly redirect as well but thank you both for your time!
is working on a reply...