Performing an toolbox upgrade

Nov 16, 2010 at 2:33 PM


I am having an problem getting the OnToolboxUpgraded event to execute for our Package integration using MPF.

We already have the product installed at client but now we need to send an update having problems updating the toolbox to reflect the new Toolbox items.

I can open VS2010 and do an reset Toolbox and see the items but closing and opening VS2010, the new toolbox items are gone.

Do I need to set some registry entry in order to get the toolbox to execute the OnToolboxUpgraded event?


Nov 16, 2010 at 6:33 PM
Edited Nov 16, 2010 at 6:41 PM

Also forgot to mention, I did specify the ProvideToolboxItemsAttribute as follow

[ProvideToolboxItems(4, NeedsCallBackAfterReset = true)]


I also implemented the events and subscribed to them

Nov 17, 2010 at 8:04 AM

Did some searching and found the follow:

I tried implementing the following code:
        int IVsPackage.ResetDefaults(uint grfFlags)
            if (Zombied)

            if (grfFlags == (uint)__VSPKGRESETFLAGS.PKGRF_TOOLBOXITEMS)
                this.OnToolboxInitialized(this, EventArgs.Empty);
            else if (grfFlags == (uint)__VSPKGRESETFLAGS.PKGRF_TOOLBOXSETUP)
               this.OnToolboxUpgraded(this, EventArgs.Empty);

            return NativeMethods.S_OK;


Doing an reset on the toolbox, this code gets executed, but changing the registry value and then devenv.exe /setup  seems to have no effect.

Any idea what I could possibly be missing?