My Umbraco plugin adds a tab to the Developer section of Umbraco 7 back-office and I need to remove this tab on the uninstall of the associated nuget package.
Anyone has an idea of how this can be done ?
PS.: For installation as a local package I have an Application Event Handler that does the adding and removing of this tab, as you can see from the code below:
/// <summary>
/// Applications the started.
/// </summary>
/// <param name="umbracoApplication">The umbraco application.</param>
/// <param name="applicationContext">The application context.</param>
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
// Install
DashboardHelper.EnsureTab("StartupDeveloperDashboardSection", "CleanUp Manager", "/App_Plugins/RB.Umbraco.CleanUpManager/Index.html");
// Uninstall
InstalledPackage.BeforeDelete += delegate
{
DashboardHelper.RemoveTab("StartupDeveloperDashboardSection", "CleanUp Manager");
};
}
Bu I need to do the same when uninstalling it via nuget. Any Ideas ?
Thanks in advance for your help.