Microsoft.Data.SqlClient is not supported on this platform - .net6.0+ EF 6.0.0
Hi. I'm trying to setup the Entity Framework Core 5.0.0 for the SqlServer in .netCore3.1 class library project. I am facing this problem, which I can't figure out. Does anyone know any possible solution? My OS is Windows 11
17 Replies
An issue with EF maybe? Can't you use EF Core?
I'm using EF Core 😄
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Huh, true, that "platform" might be referring to the framework version
I assumed it means the OS or the CPU architecture
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
It did not work on EF Core 3.1 either
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Fine, so:
- These are the versions of EFCore I use
- This is my Context class:
- This is how I use it:
- The exception is being thrown in this namespace:
Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal
, so I'm assuming it's the EntityFrameworkCore.SqlServer
package. It uses the Microsoft.Data.SqlClient
package.As you can see it uses the 1.0.19269.1 version of this package, which seems to support .netCore 2.1.
I updated the package to 3.1.0 and the exception still remains:
So, I've upgraded the .NET version of my project to 6.0 and the problem still remains on updated packages
I downgraded packages to the 6.0.0 and the problem still remains:
Ok, fuck it, i switched to postgresql and it works