I am using a fresh install of Visual Studio 2019 Community, I have installed MySql server 8.0.19 including MySql for Visual Studio and MySql Connector/Net. I have a project with an EDMX file which fails to open with the following error message:
I searched long and hard on the internet, and I have the required ingredients, I have installed the NuGet packages MySql.Data 8.0.19, MySql.Data.EntityFramework 8.0.19 I have the <DbProviderFactories>
with the proper invariant name attribute invariant="MySql.Data.MySqlClient"
and in fact, the project compiles and runs properly, the problem is the EDMX designer.
Now, I've run the Visual Studio instance through another Visual Studio instance's debugger, and I used the Exception settings to break on a throw of any exception, and indeed when I try to load the EDMX designer a System.IO.FileLoadException is thrown. I've enabled the Fusion assembly binding log in the registry, and this is the log as seen in the $(exception).FusionLog
field:
=== Pre-bind state information ===
LOG: DisplayName = MySql.Data.EntityFramework, Version=8.0.19.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\USER\AppData\Local\Microsoft\VisualStudio\16.0_3f7de7a6\devenv.exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Machine configuration policy file redirect found: 8.0.19.0 redirected to 8.0.19.0.
LOG: Post-policy reference: MySql.Data.EntityFramework, Version=8.0.19.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
LOG: The same bind was seen before, and was failed with hr = 0x80131040.
I looked in my machine.config
and found nothing out of the ordinary:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="6.7.4.0" newVersion="8.0.19.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data.Entity" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="6.7.4.0" newVersion="8.0.19.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Web" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="6.7.4.0" newVersion="8.0.19.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I also tried changing the oldVersion
entries to oldVersion="0.0.0.0-8.0.19.0"
and that didn't do anything (I restarted visual studio after every change).
I am lost! Please help me, thanks.
User contributions licensed under CC BY-SA 3.0