I was following an article on how to create a command and add it to the Code Window context menu, it was going really well until some point.
I ran the code and Visual Studio was crying with E_INVALID_ARGS error on the
this._applicationObject.DTE.Commands.AddNamedCommand
This one is widelly used and pretty standard method so I thought the problem is somewhere in my code.
I realized that almost all the parameters I am passing to this method are pretty common as well so the problem must be at ....
Well, the command name I used was containing dots, that's why the error.
If you receive this message, please check the command name for dots (the second parameter you are passing to this method).
Since Visual Studio and other addin types seem to be working with very similar framework (the so called "extensibillity framework"), I suspect this rule is also applicable for other types of addins such as Outlook, Excel, Word, etc.
1 comment:
Useful tip, man!Learn it the hard way :)
Post a Comment