Page 1 of 1

Jiwa 7 having to close and open jiwa for code changes to

PostPosted: Wed Jan 22, 2014 4:44 pm
by indikad
Having to close and open Jiwa each time when make a change in plugin code ( to see the effects of the changes ) can be a bit cumbersome. Is there a way around ?

Re: Jiwa 7 having to close and open jiwa for code changes to  Topic is solved

PostPosted: Tue Jan 28, 2014 2:50 pm
by Mike.Sheen
indikad wrote:Having to close and open Jiwa each time when make a change in plugin code ( to see the effects of the changes ) can be a bit cumbersome. Is there a way around ?


Hi Indika,

Unfortunately not at this time.

The problem is that once an assembly is loaded into an application domain, it cannot be unloaded. So, any subsequent changes to the code for a plugin will mean that the application domain (ie: Jiwa) needs to be unloaded before the plugin assembly can be recompiled and reloaded.

I understand it can be frustrating developing plugins this way - so I'll post a tutorial in the coming days showing how to use a surrogate Jiwa application within Visual Studio to let you develop a plugin within Visual Studio (allowing edit and continue, etc) - and then how you transfer the Visual Studio code to a Jiwa plugin.

Mike

Re: Jiwa 7 having to close and open jiwa for code changes to

PostPosted: Mon Feb 03, 2014 9:20 pm
by Mike.Sheen
I should clarify this a little more.

We did attempt to allow changes to plugins not to require the exiting of Jiwa 7 to take effect - the "Isolate" checkbox on the plugin header indicates if the plugin is to be isolated to its own application domain. That will cause the plugin to be put into its own application domain, and thus any changes allow the application domain to be unloaded, the plugin recompiled, and reloaded whenever a plugin is changed.

However, it is of limited use if your plugin refers to any classes which do not inherit from MarshalByRef - and as it happens the Windows Forms class does not inherit from MarshalByRef, so your plugin will not be able to interact with any Windows Forms classes (including the Jiwa forms - which inherit ultimately from the System.Windows.Forms.Form class).

Re: Jiwa 7 having to close and open jiwa for code changes to

PostPosted: Wed Feb 12, 2014 7:54 pm
by Mike.Sheen
Ok, I've done a rough guide on how to develop plugins using Visual Studio - here. I hope this addresses your concerns.