How to create new command in visual studio?
Visual studio has predefined command that are accessible by type ctrl + /. For example >of myfile.cs will open the file named myfiles.cs
I would like to have a comma开发者_如何学运维nd to go to definition of any type. For example >gotodef TextBox would do the same as if I pressed F12 on the word "TextBox" in the source code editor (view it shows all members of the type from the dll metadata).
Any ideas ?
Those commands are known as "aliases", and yes you can add your own ones.
The one you want is called Edit.GoToDefinition
So to register it you would type this:
>alias gotodef Edit.GoToDefinition
and then to use it, type:
>gotodef TextBox
See here for details.
精彩评论