How can I add a custom command to Visual Studio?

六月ゝ 毕业季﹏ 提交于 2019-11-27 14:34:42

问题


There's an external command I'm using constantly - basically launching a batch file. I'd like to put a toolbar button (and possibly keyboard shortcut) for this into the IDE. Is there an easy way to do that?


回答1:


First, add an item to your Tools menu by choosing Tools, External Tools, and filling out the dialog, like this:

Then bring up Tools Customize, click the Keyboard button at the bottom, and find the appropriate external tool number:




回答2:


All the configured external commands in VS are available to add to a Toolbar or Menu through the Tools>Customize menu as "External Command ##". You just need to know which number corresponds to the particular command you've configured. I believe it is in order of entry in the external commands list.

Similarly, you can find those names in the commands list in Options>Environment>Keyboard and assign a shortcut to your command that way.



来源:https://stackoverflow.com/questions/6414788/how-can-i-add-a-custom-command-to-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!