Publish for net48 and net7.0?

My plugin needs to be compiled differently for net48 and net7.0 runtimes. Since Rhino 8.19 targeting net7.0 works well. However, would I now have to publish it as two separate Yak packages? Can they both be installed? Or can I pack both the net7.0 and net48 build into one yak package and let the Rhino runtime decide which one to load ? @CallumSykes

can this be done with a distribution tag? my manifest.yml is here and my deploy action here

You can publish one Yak package with two folders for the different versions \net7.0\ and \net4.8\

do I need to specify that in the manifest.yml?

no you can just put the single manifest in the root folder.

thanks @david.birch.uk that worked !

@david.birch.uk it worked once but now I get

System.Exception: No PlugIn subclass found.
   at Rhino.PlugIns.PlugIn.CreateFromAssembly(Assembly pluginAssembly, Boolean displayDebugInfo, Boolean useRhinoDotNet)

on .NET 7 and 8 while 4.8 is still working.
Have you seen this before?

This is my fsproj

oddly enough I had the same error message today at work.

I’d want to be certain you have Rhino set to the correct version of .net you are expecting (it only changes on restart of Rhino). See below for how to change.

The message occurs is because Rhino is running with a different (lower?) version of .net than your plugin.

To change use SetDotNetRuntime command and (for example) select the NetCoreVersion and set it to 8 (and restart rhino)

If that’s not it then be careful as to whether you have 2 versions of the plugin installed - this can happen when you have a local .rhp file you have manually installed and then you install a second version (with the same plugin id) via the package manager. (or the opposite order or you install with 2 rhino’s open)
You can check by going Tools > Options >plugins >yours > details > filename > up 2 directories and see if there are multiple versions or if its pointing where you expected.

Indeed, I had a local .rhp of my plugin too. It had it’s own GUID Somehow it only showed up in the plugin manager after uninstalling the YAK package. Removing the local .rhp folder and reinstalling from YAK made it work.