U4-7410 - Version issue with MySql.Data after upgrade to 7.3.1.

Created by Stief Dirckx 16 Nov 2015, 12:13:40 Updated by Sebastiaan Janssen 18 Nov 2015, 18:39:15

I upgraded a site from 6.2.5 to 7.3.1 using NuGet in Visual Studio. But when starting the site I got a YSOD saying the MySql.Data assembly wasn't the correct version.

NuGet installed MySql.Data version 6.9.8 but when starting the site the error says umbraco.DataLayer expects version 6.9.7. Changing the version in packages.config and rebuilding resolved the issue.

4 Attachments

Download NuGet output.txt


Sebastiaan Janssen 16 Nov 2015, 13:17:26

Any chance that you have a reference to 6.9.7 in the web.config either in the mysql provider or in the assembly redirects?

Stief Dirckx 16 Nov 2015, 13:47:38

@sebastiaan Couldn't find any. Before the upgrade MySql.Data was version 6.6.5, it got upgraded to 6.9.8 during the Umbraco upgrade. We don't use MySql for our own coding.

In web.config there's one reference to the dll in the DbProviderFactories section (not version specific) but that's also coming from Umbraco.

Sebastiaan Janssen 16 Nov 2015, 14:16:11

Alright, that's exactly how it should be! I'll check what we build against and why it would be a problem (it should not be).

Sebastiaan Janssen 17 Nov 2015, 12:55:18

@Stief Did you actually upgrade to 6.9.8 yourself? We build against 6.9.7 and the nuget also will install 6.9.7.

Stief Dirckx 17 Nov 2015, 13:15:35

@sebastiaan No, the only thing I did was Install-Package UmbracoCms.

I just tried it again installing Umbraco through NuGet in a new empty .NET 4.5 web application project and again MySql.Data 6.9.8 was automatically added. See attached output file.

Don't know if it makes a difference but I'm using VS 2013.

Tom Van Rompaey 17 Nov 2015, 16:09:17

Same issue here with Umbraco 7.3.1 and VS 2015

Sebastiaan Janssen 17 Nov 2015, 16:21:07

Alright, could you check two more things for me please: In Visual Studio go to: Tools > Extensions and Updates > Installed > Tools

There you will find NuGet, I'm curious about the version you have installed.

The other question: what is the package source you use? nuget.org/api etc or is it api.nuget.org?

Stief Dirckx 18 Nov 2015, 07:24:10

@sebastiaan My NuGet version is 2.8.50926.663 and the package source is https://www.nuget.org/api/v2/

Stief Dirckx 18 Nov 2015, 08:18:06

@sebastiaan I just update VS and now I have NuGet version 2.8.60723.765. The same version of MySql.Data is still installed on a new project. But now it doesn't seem to cause an exception anymore. Installing the site and going to the backoffice all works fine.

Difference with my initial report is that it wasn't an Umbraco package upgrade but a clean install.

Tom Van Rompaey 18 Nov 2015, 08:23:25

My coworker added this in the web.config to use MySql.Data 6.9.8 in our Umbraco project:

Sebastiaan Janssen 18 Nov 2015, 08:27:51

I just don't have a clue where 6.9.8 would come from. We specify 6.9.7 in our nuspec files and build against it. NuGet should NOT install it on it's own. Anyway, we'll just update it to 6.9.8 for 7.3.2 and then it'll be fine for another few months until they release 6.9.9.

Tom Van Rompaey 18 Nov 2015, 08:55:17

Great, happy to hear this will be fixed in the next version! Here's a screenshot of the packages NuGet wants to install while installing the latest version of Umbraco.Core by the way.

Sebastiaan Janssen 18 Nov 2015, 09:00:02

It's not really a "fix", as this means: take 6.9.7 and only if the user upgrades to something lower than 7 on their own, allow it: MySql.Data (≥ 6.9.7 && < 7.0.0) https://www.nuget.org/packages/UmbracoCms.Core/

Sebastiaan Janssen 18 Nov 2015, 18:39:15

Commit made by '''Sebastiaan Janssen''' on ''2015-11-18T19:39:10+01:00'' https://github.com/umbraco/Umbraco-CMS/commit/aca181b32ee3de35dd458ae7d511e0eda4bc3602

U4-7410 Version issue with MySql.Data after upgrade to 7.3.1.

#U4-7410 Fixed

Priority: Normal

Type: Exception

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.3.1

Due in version: 7.3.2


Story Points: