Hi,
I'm writing a plugin based dotnet core GUI app with Avalonia. My plugins are class C# assemblies. I can load them but when thoses plugins wants to use, say Windows Registry manipulation, they want to obviously load Microsoft.Win32.Registry.
I wrote a ResolveEventHandler:
It works for the base library Microsoft.Win32.Registry.dll, but I also get another event on Microsoft.Win32.Registry.resources.
How do I handle that Microsoft.Win32.Registry.resources ? There is no such .dll.
I'm writing a plugin based dotnet core GUI app with Avalonia. My plugins are class C# assemblies. I can load them but when thoses plugins wants to use, say Windows Registry manipulation, they want to obviously load Microsoft.Win32.Registry.
I wrote a ResolveEventHandler:
C#:
static Assembly OnAssemblyResolv(object sender, ResolveEventArgs args)
{
try
{
string assemblyPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), new AssemblyName(args.Name).Name + ".dll");
Assembly assembly = Assembly.LoadFile(assemblyPath);
return assembly;
}
catch(Exception e)
{
Debug.WriteLine(e.Message);
}
return null;
}
It works for the base library Microsoft.Win32.Registry.dll, but I also get another event on Microsoft.Win32.Registry.resources.
How do I handle that Microsoft.Win32.Registry.resources ? There is no such .dll.