I have a VSIX package where I use the autoloading feature
[ProvideAutoLoad(UIContextGuids80.SolutionExists)]
When I create my command I set the state to Disabled
CommandID menuCommandID = new CommandID(GuidList.guidMyPackageCmdSet, (int)PkgCmdIDList.MyCommand); menuItem = new MenuCommand(MenuItemCallback, menuCommandID); menuItem.Enabled = false;
But after Visual Studio starts the corresponding button in Tools menu is enabled, and isn't until I click the button and VS load the package that it gets disable.
How can I set the initial state of the button to disabled?