Is there an event that gets triggered, when removing an Add-In by pressing the "Delete this Add-In" button in the Add-In Manager - using ArcMap 10.x?

enter image description here

I want to listen to this event to let my Add-In automatically remove any toolbars, close all dockable windows that came with my Add-In, etc.

  • 1
    Did you test to see if deleting the add-in fires IExtension.Shutdown ? If so, it seems like you could do your cleanup there. If your addin doesn't include an Extension, perhaps consider implementing one solely for the purpose of cleanup. – Kirk Kuykendall Nov 29 '16 at 15:37
  • Yes, this was my first intention. It seems that the Extension class from the AddIns namespace (ESRI.ArcGIS.Desktop.Addins) does not implement IExtension (resources.arcgis.com/en/help/arcobjects-net/componenthelp/…). But it has the OnShutdown() method, which only gets called, when the extension is unloaded. But the extension won't be unloaded when deleting the add-in - using the Add-In Manager. I also tried the OnSetState() method but with no success. – Christian Junk Nov 30 '16 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.