Microsoft.Data.SqlClient is not supported on this platform. #497
-
Hi, I'm using Microsoft.Data.SqlClient in a net6.0-windows ExcelDna project and I received this message : "Microsoft.Data.SqlClient is not supported on this platform." How can I fix this problem Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think this is similar to the discussion here: https://groups.google.com/g/exceldna/c/4PQLjPj76N4 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
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.