System.Data.SqlClient types not found in LP6
The following code writes "Failure" in LP6 using either .NET Core 3.1 or .NET 5, but it writes "Success" in a .NET Core console app both on Windows and on Linux. (It also writes "Success" in LP5 or a Framework console app.)
I know that the
SqlClientFactory class technically lives in the
System.Data.SqlClient assembly under .NET Core (and the
System.Data assembly under Framework). But why is it that a console app can correctly resolve this, but LP cannot?
// using System.Data.SqlClient NuGet package var aqn = "System.Data.SqlClient.SqlClientFactory, System.Data"; var type = Type.GetType(aqn); Console.WriteLine(type == null ? "Failure" : "Success");