Creating Visual Studio toolbar commands to execute batch files

前端 未结 2 1042
太阳男子
太阳男子 2020-12-31 11:15

I have a few batch files I need to run frequently in developing a certain project. I\'d like to create a Visual Studio toolbar called \"MyProject\" and have commands underne

相关标签:
2条回答
  • 2020-12-31 11:42
    1. How to install an icon in Visual Studio to run a batch file.
    2. On the menu go to Tools > External Tools
    3. Click Add and fill in the following:
      1. Title: The name that shows up for the icon name.
      2. Command: Browse to the file name and click ok or put the file path and file name here.
      3. Check Use Output window if you want to see the batch files output in visual Studio.
      4. Click OK.
    4. Make note of the position # of the Menu contents you just added starting from position 1 at top. You will use this as External Command # later on.
    5. Go to Tools > Customize or right click in the toolbar area and click Customize.
    6. Go to the Toolbars tab click New, Name the Toolbar name and click Ok.
    7. Go to the Commands tab, select the Toolbar radio button, in the dropdown to the right select your toolbar name.
    8. Click the Add Command Button. In the Categories select Tools and in the Commands to the right pick External Command # from above and click ok. It will appear in the tool bar now ready to go.
    0 讨论(0)
  • 2020-12-31 11:51

    In the Tools... menu, select External Tools... and add references to the batch files. Then right-click on a toolbar, select Customize..., go to the Toolbars tab, click on New..., name your new toolbar, click on OK, go to the Commands tab, select the Tools category and drag-drop the appropriate External Command Command onto your custom tool bar.

    If you need to run batch files that always run right before or after a build, you're probably better off making use of build events.

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题