Somehow I seem to have broken my plugin when updating from R6 to R7. So I want to use it as an opportunity to clean things up a bit. My problem it as follows:
- clean r7 install
- install plugin, works fine
- close rhino, reopen, run plugin, doesn’t run
- try to reinstall plugin, “unable to load, plugin ID in use”
Understanding exactly how this works has been on my list for years…I originally started from the example provided by Dale, but suddenly I can’t get it to work.
First question, what are the minimum classes that I need to declare a GUID attribute on. So far I know:
- Any WPF panel hosts need Guid Attributes
The assembly manifest? It implies this will be the Guid of the “plugin”
- [assembly: Guid(“xxxx…”)]
Somewhere I read that all of the commands should have Guid, but as far as I can tell, this is not required.
Do I need to declare one on the main class deriving from Rhino.Plugins.PlugIn?
From what I can tell, installing the plugin then adds some/all of these Guids to the registry. Other issues I have had, but typically manage to work around, are what to do if I need to move a plugin install. Usually I would disable the plugin in the plugin manager, and then reinstall from the new location. Under rhino 7, something seems to be hanging this up, as any attempt to reinstall, even after manually cleaning the registry, seems to give the “ID in use” error.
Bonus points, maybe I should write an “uninstaller”… but I need to know all of the keys to remove, etc. I would also add, I would be willing to use the new package manager if it affects any of this, but my plugin also distributes with a large number of 3dm files, hundreds of Mb, so I would need to work around that.
For now I just need to figure out why I seem to only get one session of use and then something goes wrong.
The primary issue is the same as
Deleting the dll of the same name in the folder along with the rhp file fixes the issue. Any further thoughts are appreciated though.