MySql.Data + Pomelo.EntityFrameworkCore.MySql in the same solution but different projects.
If we have a visual studio solution, where one project uses MySQL.Data nuget package for legacy code that creates MySqlConnection objects, and another project that uses EF Core with Pomelo nuget package, we are getting ambiguous errors in VS when creating these legacy MySqlConnection objects, because both projects use the same namespace (MySql.Data.MySqlClient). Is it possible somehow to fix this?
MySQL version: 5.7.29
Operating system: Windows 10
Pomelo.EntityFrameworkCore.MySql version: 3.1
See Use a different namespace for MySqlConnector.
Especially the last comment from the issue @mguinness referenced looks good:
https://github.com/mysql-net/MySqlConnector/issues/189#issuecomment-543583735
The same principal can also be found on StackOverflow.
Thanks for the help, now i feel super dumb :)
Most helpful comment
See Use a different namespace for MySqlConnector.