-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MicroSoft.Data.SqlClient is not supported on this platform SNI issue #2729
Comments
@hietshkumar10, try copying the |
This will use managed SNI, which means you wont need the native SNI dll.
If you are on windows this is not a good solution. You can refer to runtimes\win dlls and see if that solves the issue for you. If you handle DLLs and their dependencies, your application may behave differently if you choose the wrong DLL. It is important to select the correct runtime DLL based on your application's setup. |
https://learn.microsoft.com/en-us/sql/connect/ado-net/appcontext-switches?view=sql-server-ver16
|
@hietshkumar10 there is no issue using ManagedSNI on production, if you are not using MARS (known issue #422 ) everything should work as before. |
To add more, our long term goal is to move away from native libraries and convert everything to managed. A work is in progress to achieve that goal in netcore and after that moving to netfx. |
Thanks @JRahnama |
@hietshkumar10 what client environment are you building/running your application in where you experienced the Native SNI issue? And are you still blocked? |
Microsoft.Data.SqlClient is not supported on this platform
Created a class library that is running SQL query using Microsoft.Data.SqlClient.
Used DLL of that class library in console app (Including MIcrosoft.Data.SQLClient.dll)
When running method of class library getting above error
If referring f MIcrosoft.Data.SQLClient.dll from runtimes\win\lib\net6.0 error got changed to (DllNotFoundException: Unable to load DLL 'Microsoft.Data.SqlClient.SNI.dll)
And if trying to add reference of Microsoft.Data.SqlClient.SNI.dll giving Bad IL format issue
Same thing happening if achieving above with code.
(Creating components to existing .net6 Component Manager )
The text was updated successfully, but these errors were encountered: