My situation: I have a .Net 4.7.2 WinForms application. It references a project that is a .Net Standard class library The .Net Standard library references the Microsoft.SqlServer.SqlManagementObjects NuGet package using a PackageReference
When I build the winforms application, it is pulling in the Microsoft.SqlServer.SqlManagementObjects package from the net462 lib folder instead of the netstandard2.0 folder. This is a problem because the .Net Standard version of the library has different classes (e.g. it uses Microsoft.Data.SqlConnection instead of System.Data.SqlConnection). So when the application is run you get an error saying System.MissingMethodException: Method not found: 'Void Microsoft.SqlServer.Management.Common.ServerConnection..ctor(Microsoft.Data.SqlClient.SqlConnection)'
Is there any way around this? I feel like the SMO libraries should have been separated into different packages for .Net Standard and .Net Framework if they have differences like this.