Subscribe to VS shell command events in VS addin (CSVSAddInCommandEvents)
This Visual Studio add-in code sample demonstrates how to subscribe to the shell command executing and how to change the menu item's caption dynamically for a Visual Studio add-in.