VS maintains a
PreloadAddinStateManaged
registry key. There is an entry that relates your addin's class with its assembly path.
MyCoolAddin.Connect;C:\users\John\Documents\Visual Studio 2010\Addins\MyCoolAddin - For Testing.Addin
Now, if you rename your addin to something that makes more sense, like just MyCoolAddin.Addin (without the " - For Testing" part that VS adds just for... testing), it won't work.
The explanation is that the
ext_cm_UISetup
is sent only the first time the addin is loaded. And the code generated by the addin wizzard creates the Tool menu item exactly in this ext_cm_UISetup
.The solution is to run:
devenv /ResetAddin MyCoolAddin.Connect
and the put your MyCoolAddin.Addin and MyCoolAddin.dll in a folder where VS searches for Addins. (Btw, you can see these foloders in VS in Tools > Options > Environment > Add-in/Macro Security).