Closed levimatheri closed 1 month ago
You are not sharing any details about your implementation, but could this be a duplicate of https://github.com/dotnet/ef6/issues/2250 ?
Otherwise share a runnable console app that demonstrates the issue, and I will have a closer look.
@levimatheri Did you update you configuration in code as described in the readme (code changes are required)
@ErikEJ what helped was the suggestion you linked to, to remap System.Data.SqlClient to Microsoft.Data.SqlClient using DbConfiguration
@levimatheri Seems like an exact duplicate
@AndriySvyryd Feel free to close this! Wonder if we should add something to the readme regarding this?
@ErikEJ Since we've had 2 people hit this already, I think that adding it to the readme would be helpful. I am also considering duplicating the readme as a separate page in Docs under What's new, as some users look there first.
@AndriySvyryd I will try to think of something to add to the readme.
I installed the preview version of Microsoft.EntityFramework.SqlServer (v6.5.0-preview2-24180-01) and I can't get it to work. I keep getting this error message: _[InvalidCastException: Unable to cast object of type 'Microsoft.Data.SqlClient.SqlConnection' to type 'System.Data.SqlClient.SqlConnection'.].
This fails when I go to access
DbContext
methods.I have configured this in Web.config:
I've looked everywhere and I'm not referencing 'System.Data.SqlClient'. Please assist.
Here's the stack trace:
EF version: 6.5.0-preview2-24180-01 Database provider: SQL Server (Azure) Target framework: .NET Framework 4.7.2 Operating system: Windows 11 IDE: Visual Studio 2022 17.10.0