generative modeling for Rhino
Hi GH people,
Now I am learning rhino SDK with c#.
Since the codes need to be compiled and loaded into Rhino before using them, it was hard to edit and test them. Whenever I need to change the code, I have to close Rhino, edit the code, recompile the code, reopen Rhino and run the plugin to see the result.
So, my question is...
Is there anyway to modify a code in VS and test it without closing and reopening Rhino? For instance, Revit provides an official plugin (plug-in manager) to dynamically load plugins, so that users do not have to close and reopen Revit to reload the plugins. I wonder if there is any intermediate plugin like this for Rhino. If there is not, can anybody suggest me how I can make that kind of bridging plug-in manager?
In advance, thank you!
If there is I haven't found it. Restarting Rhino every time is what I do when debugging.
If that is the only way to debug the code, I think I should live with it... at least until MS provides some good stuff.
In Rhino 4, using VS2008, it exists. It's called "Edit And Continue" and it's not too great, but it works.
It does not work in VS2010 as they are not allowing reflection-loaded assemblies (plug-ins). I'm not sure about VS2012. Edit and Continue is a Microsoft-supported feature, so you should be able to use it in that setup. I did manage to use it, and the Wizards for components and plug-ins allow to use it, but it's not so easy to get it to work the first time on an already-built project, I must say. For Expression Editions, the instructions are here.
Please let me know if you have other questions.
Thanks for the kind reply. I am using Rhino 5 ans VS2010, so I cannot use edit and continue function. As you and David said, it seems there is no way to debug the code without reopening Rhino. (it is also seems hard even to debug the existing project, as you mentioned...)
Anyway, since I cannot use the "edit and continue"-like function in VS2010, now I am trying to make some plug-in manager, so that I can edit and run c# codes without closing and reopening it. Even if I succeed in make this plugin manager, I do not think that I can actually debug the code keeping Rhino open, but I will be more than happy if I can just try edited code without closing Rhino. I will post if I make it.
and Thanks David again.