jediwhale / fitsharp

Functional testing tools for .NET

Home Page:http://fitsharp.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working with .Net Core 3.1 because of Microsoft.Data.SqlClient

stefani-nik opened this issue · comments

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

I've also found a few issues with Core 3.1 and am investigating

Can you provide more detail on what you are trying to do?

commented

Hi,

I have an issue with Microsoft.Data.SqlClient also. I have the following exception:
System.PlatformNotSupportedException: Strings.PlatformNotSupported_DataSqlClient at Microsoft.Data.SqlClient.SqlConnection..ctor(String connectionString)

This is crashing when initializing the connection in a fixture:
using (var connection = new SqlConnection(SuiteSetup.ConnectionString)){}

The application is targeting .NetCore 3.1. NuGet versions are Microsoft.Data.SqlClient 3.0.0 and fitsharp 2.8.2.1.

Thanks

commented

I don't know if it can help fixing the issue, but I found a crappy workaround:

  1. Downgrade package Microsoft.Data.SqlClient 3.0.0 to 2.0.1
  2. Copy those dlls directly into the Runner folder:
    C:\Users\UserName\.nuget\packages\microsoft.data.sqlclient\2.0.1\runtimes\win\lib\netstandard2.0
    C:\Users\UserName\.nuget\packages\microsoft.data.sqlclient.sni.runtime\2.0.1\runtimes\win-x64\native