- Compiling .dll without restarting Rhino
- How To Debug/Recompile Without Restarting Rhino
- Plugin dev and external .dll reload
After digging for a few days, I cannot really find a solution for How to developing GH plugin without restarting Rhino/GH everytime I change the code. So that's what this repo does -- An starter-kit for those who are familar with Grasshopper plugin development, but are annoyed with the tedious Rhino/GH restarting process.
- A framework that can link external
.dll
(s) to the main application online easily. - For Grasshopper development, it allows us to link an external
dll
to the loaded Grasshopper plugin in a way that:- the external
dll
can be independently compiled and re-compiled without affecting the loaded Grasshopper plugin.
- the external
This approach will greatly increase the developing speed and eliminate the tedious waiting time with ease.
The project has following 3 sub-projects:
pluginComputation
(backend): The core library contains the actural functions that do the work.pluginLoader
(frontend): The GH plugin that will be loaded in Grasshopper. It calls the function from the backend through the linker ("contract").pluginContract
: The definition (required by MEF) that works as the link between the backend (pluginComputation
) and the frontend (pluginLoader
).
Once the pluginLoader
is loaded in a Grasshopper session, changes made to the function body of any functions defined in pluginContract
/pluginComputation
do not require a restart. However, adding new functions (or change function names, return types, etc.) will require a hard RESTART of Rhino/Grasshopper.
The new Hot Reload functionality available in VS2022 achieves some of the goals this plugin tries to provide.
I'm currently not sure how much are the two overlap. But if you're using VS2022, you're welcome to try out.