Hello,
I am porting an old project from Framework 4.61 to dotnet6. There exists a kind of plugin system using reflection.
This worked as long as no other dll is needed in the plugin, because as soon as another dll (custom or 3rd party) is needed, a
System.IO.FileNotFoundException: Could not load file or assembly. is triggered
The dll's definitely exists in the correct directory. Under Framework 4.61 everything works correctly.
I am porting an old project from Framework 4.61 to dotnet6. There exists a kind of plugin system using reflection.
C#:
var tempAssembly = System.Reflection.Assembly.LoadFile(dllFilename);
var instance = (BaseService)tempAssembly.CreateInstance(assemblyName);
This worked as long as no other dll is needed in the plugin, because as soon as another dll (custom or 3rd party) is needed, a
System.IO.FileNotFoundException: Could not load file or assembly. is triggered
The dll's definitely exists in the correct directory. Under Framework 4.61 everything works correctly.