Could you please advise how can i resolve the issue, I'm trying to migrate the current net472 project to net5.0 project, and encountered the System.TypeLoadException error while initialize the IntegrationServices with SqlConnection.
using (var connection = new SqlConnection(_connectionString))
{
var catalog = (new IntegrationServices(connection));
....
}
System.TypeInitializationException: The type initializer for 'Microsoft.SqlServer.Management.IntegrationServices.IntegrationServices' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Microsoft.SqlServer.Diagnostics.STrace.STraceSource' threw an exception.
---> System.TypeLoadException: Could not load type 'Microsoft.SqlServer.Server.SqlContext' from assembly 'System.Data, Version=4.0.0.0,