Hey there,
I am porting a C++ based plugin over to the C# /.NET API.
With C++ I could always simply unload the plugin, recompile, and re-load it.
Now with the .NET plugin, unloading does not appear to fully release the plugin anymore: when compiling it after unloading it from the plugin-manager window it will tell me that the DLL is still used by another process.
Is this a known issue with the NET api or is there something i can do?
Hey there,
I am porting a C++ based plugin over to the C# /.NET API.
With C++ I could always simply unload the plugin, recompile, and re-load it.
Now with the .NET plugin, unloading does not appear to fully release the plugin anymore: when compiling it after unloading it from the plugin-manager window it will tell me that the DLL is still used by another process.
Is this a known issue with the NET api or is there something i can do?
Yes, this issue seems annoying, I have to restart Maya to avoid that. But luckily, it's already a known issue, and we had reported this issue to our engineering team. The ticket number is Maya-27532.
Yes, this issue seems annoying, I have to restart Maya to avoid that. But luckily, it's already a known issue, and we had reported this issue to our engineering team. The ticket number is Maya-27532.
Hi
it is actually impossible (or almost impossible) to unload a .Net DLL because there is no way to unload assembly dll from a domain. The only way to unload .Net code is to load an assembly in another appdomain and when you wanted to reload it, stop it it and start it again.
So while you can't unload or reload a dll, you can unload and reload an appdomain and execute code in it. But it turns not applicable directly to a plug-in framework,
cheers
cyrille
Hi
it is actually impossible (or almost impossible) to unload a .Net DLL because there is no way to unload assembly dll from a domain. The only way to unload .Net code is to load an assembly in another appdomain and when you wanted to reload it, stop it it and start it again.
So while you can't unload or reload a dll, you can unload and reload an appdomain and execute code in it. But it turns not applicable directly to a plug-in framework,
cheers
cyrille
Hello Marius,
Is it possible for you to share how you unload/reload plugin?
I'm trying to develop a .net plugin and would like to debug at any time using Visual Studio but since if that assembly was ever loaded prior to I can only debug my updated code by closing Maya once and they starting it again.
Thanks for your help in advance.
macyaroze
Hello Marius,
Is it possible for you to share how you unload/reload plugin?
I'm trying to develop a .net plugin and would like to debug at any time using Visual Studio but since if that assembly was ever loaded prior to I can only debug my updated code by closing Maya once and they starting it again.
Thanks for your help in advance.
macyaroze
I know that this is an old thread and just stumbled upon it. There is a way to do this without having to close the main application. You load in an assembly that points to a separate Dev assembly and work out of the dev assembly while working. That way you don't have to go through the process of closing and restarting the application every time you make changes to your code.
I know that this is an old thread and just stumbled upon it. There is a way to do this without having to close the main application. You load in an assembly that points to a separate Dev assembly and work out of the dev assembly while working. That way you don't have to go through the process of closing and restarting the application every time you make changes to your code.
Can't find what you're looking for? Ask the community or share your knowledge.