I can't resolve my problem very long time...
I have main application and some plugins, libs that loads in runtime. I created a new sample application, they imitated my issue.
Main app:
string exepath = Path.GetDirectoryName( Assembly.GetExecutingAssembly().Location);
string asmname = Path.Combine(exepath, "TestSql.dll");
var asm = Assembly.LoadFrom(asmname);
var type = asm.GetType("TestSql.Class1");
var class1 = Activator.CreateInstance(type);
Second project:
using System.Data.SqlClient;
namespace TestSql
{
public class Class1
{
public Class1()
{
SqlConnection sqlConnection = new SqlConnection();
}
}
}
And some screenshots:
You can simply repeat it.
What I use:
- NetCore 3.1
System.Data.SqlClient4.8.1 (I tried to use Microsoft.Data.SqlClient 2.0 - same error)
Please help me ((
Great thanks!

