Hello,
I'm working on an asp.net core 5 application.
Trying to use Microsoft.Data.SqlClient on development machine and it works, but after installing on test server the result is like that:
An error occurred while starting the application.
PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform.
Microsoft.Data.SqlClient.SqlConnection..ctor(string connectionString)
PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform.
Microsoft.Data.SqlClient.SqlConnection..ctor(string connectionString)
TelsatRcpAccess.Startup.CreateDatabaseIfItsNotThere(string OriginalConnectionString) in Startup.cs
Where should I search for source of the problem?
Current content of 'dependencies / packages':
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (5.0.4)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (5.0.4)
Microsoft.AspNetCore.Identity.UI (5.0.4)
Microsoft.Data.SqlClient (2.0.1)
Microsoft.EntityFrameworkCore.SqlServer (5.0.4)
Microsoft.EntityFrameworkCore.Tools (5.0.4)
Microsoft.Extensions.Caching.SqlServer (5.0.1)
Microsoft.VisualStudio.SlowCheetah (3.2.26)
The fact that it works on development machine suggests that problem is with lack of installing something required by sqlclient.
I am installing .net framework 4.8 and .net core 5 before installing test application.
Test server is Windows Server 2019 with IIS and SQL Server 2019.