I’m encountering an issue when trying to use a DLL that targets .NET Standard 2.0 and utilizes System.Data.SqlClient 4.8.6 in an application that targets .NET Framework 4.8. The application throws an exception stating that “SqlClient does not support this platform.” Interestingly, when I use the same DLL in an application targeting .NET 8, it works without any issues.
Updated the DLL to use Microsoft.Data.SqlClient instead of System.Data.SqlClient.
Applied assembly binding redirects in the .NET Framework 4.8 application’s configuration file to redirect System.Data.SqlClient calls to Microsoft.Data.SqlClient.
Despite these efforts, the issue persists in the .NET Framework 4.8 environment.
Could anyone provide insights into why this discrepancy exists between .NET Framework 4.8 and .NET 8? Additionally, any suggestions on how to resolve this issue in the .NET Framework 4.8 application would be greatly appreciated.
Details:
DLL targets: .NET Standard 2.0
Application targets: .NET Framework 4.8
System.Data.SqlClient version: 4.8.6
Exception message: “SqlClient does not support this platform.”
Thank you for any assistance!