创建Visual Studio工具栏命令以执行批处理文件 [英] Creating Visual Studio toolbar commands to execute batch files

查看:145
本文介绍了创建Visual Studio工具栏命令以执行批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发某个项目时,我需要经常运行一些批处理文件.我想创建一个名为"MyProject"的Visual Studio工具栏,并在其下执行命令以执行这些批处理文件.最简单的方法是什么?

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 underneath to execute these batch files. What is the easiest way to accomplish this?

推荐答案

工具... 菜单中,选择外部工具... 并添加对批处理文件.然后右键单击工具栏,选择自定义... ,转到工具栏选项卡,单击新建... ,命名您的新工具栏,单击 OK ,转到 Commands 标签,选择 Tools 类别,然后拖放相应的 External Command 命令进入自定义工具栏.

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.

这篇关于创建Visual Studio工具栏命令以执行批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆