Unable to load HLA_RhinoPlugin.rhp plug-in: initialization failed

Hey Developers!

This one is a real head-scratcher. Our internal plugin suddenly started throwing an initialization error in Rhino 7, but loads just fine in Rhino 8. It also loads without issues if installed via the Yak package manager. But unzipping the contents of the same Yak package into a local directory and manually installing the plugin via the PluginManager throws the same error.

For most users we can run it via Yak, but our dev team needs to be able to debug the code and hence we need to be able to run it locally. To make things even worse, it works on my computer, but fails for the rest of the team.

We’ve seemingly tried everything - cleaning the registry, changing the plugin’s GUID, even reinstalling .NET Framework.

Any suggestions on how to troubleshoot this are more than welcome!

Related threads:


System.Exception: No PlugIn subclass found.
   at Rhino.PlugIns.PlugIn.CreateFromAssembly(Assembly pluginAssembly, Boolean displayDebugInfo, Boolean useRhinoDotNet)
Unable to load HLA_RhinoPlugin.rhp plug-in: initialization failed.
1 Like

Ah, I feel your pain - not sure if these will help you but two things which have helped me escape sticky situations are making the first line of the plugin constructor.

 HostUtils.SendDebugToCommandLine = true;

and hooking the global .net unhandled exception event.

TaskScheduler.UnobservedTaskException += (sender, args) => {
	if (!args.Observed) {
// log using your log framework

I have had similar errors and I have previously had to go as far as to decompile yak and duplicate its code from a standalone project in order to see how it was scanning / loading our plugin. That was 6 months ago so i’ve forgotten what lead me down that road and how i fixed the plugin but i recall it was the same error message.


Thanks @david.birch.uk, we’ve been able to narrow the search down to this package:

<PackageReference Include="Eto.Platform.Wpf" Version="2.7.0" ExcludeAssets="runtime" />

A fresh branch without this reference loads up just fine. Here comes the magic part, though, reverting back to the master branch makes the problem magically disappear, despite the same package now being properly referenced.

We use this conditionally only for Rhino 7, hence the problem never occurred in Rhino 8:

	<ItemGroup Condition=" '$(RhinoVersion)'=='7' ">
		<PackageReference Include="RhinoCommon" Version="7.35.23346.11001" />
		<PackageReference Include="Eto.Platform.Wpf" Version="2.7.0" ExcludeAssets="runtime" />
		<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2420.47" />