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.
So when i am uninstalling my nuget package (which is a Episerver Module) , i need to trigger the powershell script to run my code which should be done at uninstallation?
mostly yes. you need to write a uninstall.ps1 and put it in your nuget package. When your package is uninstalled, nuget will execute your uninstall.ps1 automatically
You can checkout some Episerver packages that does this already . If I recall correctly Episerver.Framework has some PS scripts to execute at various package installation stages..
Hi ,
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.
Regards,
Manik