Loading embeded resources on Grasshopper for Mac - PriorityLoad()

I’m developing a plugin for Grasshopper and I’m loading my assemblies from embedded resources via the GH_LoadingInstruction -> PriorityLoad().
I’m subscribing to the AppDomain.CurrentDomain.AssemblyResolve event and feeding the corresponding dll on request as stream from GetManifestResourceStream. This works fine on Windows and all my dll’s are loading fine from inside when needed.
However on Mac it’s not working. I cannot even get a response from the PriorityLoad() when starting Grasshopper which is weird, not even a RhinoApp.WritelLine reponse during load. When I externalize the dll’s it’s working fine, but I’m very interested in keeping them embedded.

Is PriorityLoad not implemented in the mac version or what could be the issue? Could it be permissons? The GHA is built on windows.


public class Start : GH_AssemblyPriority

private readonly string[ ] assemblies = { "...................

	public override GH_LoadingInstruction PriorityLoad()
		RhinoApp.WriteLine(" !!!! PriorityLoad !!!!");
		AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

		return GH_LoadingInstruction.Proceed;

	public Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
		AssemblyName assembly = new AssemblyName(args.Name);
		RhinoApp.WriteLine("Requesting assembly: " + assembly.Name);
		if (assemblies.Contains(assembly.Name))
			return LoadStream(assembly.Name);

		return null;

public Assembly LoadStream(string assemblyName)
	{ .....................

(Bump) Does anyone know why PriorityLoad doesn’t fire on starting up Grasshopper for Mac. It does without a problem on Windows.

Thank you :slight_smile: