AllowPluginUnloading

 
 
 
Posted by:Vincentt
Data created:12 May 2015

Hello again,

I’ve experienced a weird bug, I think. When I set AllowPluginUnloading to true in the Manager Configuration, the next time I’ll start up Max it will ignore the plugins in the bin/assemblies folder. This is resulting in my plugins not being loaded of course. Is this meant to happen? LoadAssembliesOnStartup is still set to true.

My workaround consists of setting it to true when Max starts now and setting it to false when it’s shutting down.

Thanks,
Vin

Hi Vin,

Which Max version are you attempting this in? Plugin unloading was supported up to a certain point/version but then certain requirements related to Autodesk made me disable that functionality.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Oh, I see. I'm trying this with Max 2015. I spent some time trying to load dlls in different AppDomains so I could load/unload them without restarting Max. But then I bumped into the Manager.Load/Unload assembly and thought my struggle was over Laughing.

The assemblies are still getting unlocked though, after calling unload, so it is working. But I was confused about the weird side-effect. 

Ah, interesting that you discovered that :) Generally in .NET it isn't possible to unload an assembly from an AppDomain. But Manager.Unload will release it nevertheless and let you load another version on top of the previous one as long as the assembly version revision number differs.

Marsel Khadiyev (Software Developer, EPHERE Inc.)