When i am trying to un-install my module from Visual Studio Manage Nuget Package Manager, my Uninitialize method in one InitializableModule is not getting triggered. What is the best way to trigger a Uninitialize method in IInitializableModule module used in Episerver Module.
[InitializableModule][ModuleDependency(typeof(DataInitialization))][ModuleDependency(typeof(ShellInitialization))]public class TInitializer : IInitializableModule
This is how my declaration for the module, but this is not getting called when i am uninstalling my module from nuget package manager in visual stuido. I have some scripts to run when i am trying to uninstall this module.
Uninitialize is for the application, i.e. when your website or application shuts down. If you are thinking about uninstall nuget package, then it can be done via uninstall.ps1 http://www.roundcrisis.com/2014/08/03/Nuget-install-tricks/