jediwhale / fitsharp

Functional testing tools for .NET
http://fitsharp.github.io
Other
152 stars 73 forks source link

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

Closed stefani-nik closed 1 year ago

stefani-nik commented 4 years ago

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

jediwhale commented 4 years ago

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

jediwhale commented 4 years ago

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

Naun commented 3 years ago

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

Naun commented 3 years ago

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