Skip to content

Microsoft.Data.SqlClient is not supported on this platform. #497

Answered by govert
omerrasyonet asked this question in Q&A
Discussion options

You must be logged in to vote

In particular, it looks like you'll need to copy the Microsoft.Data.SqlClient.dll from the runtimes\win\lib\netcoreapp3.1\ and also Microsoft.Data.SqlClient.SNI.dll from runtimes\win-x64\native. The first of these is overwritten with every build, so you need to re-copy every time, or add a post-build task or similar.
Then at least I get past the PlatformNotSupportedException. I don't have an easy setup to test further than this.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@omerrasyonet
Comment options

Answer selected by omerrasyonet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants