Can we execute a .bat file in post build event command line in visual studio?

后端 未结 3 771
半阙折子戏
半阙折子戏 2020-12-05 06:12

Can we execute a .bat file in post build event command line in visual studio?

3条回答
  •  悲哀的现实
    2020-12-05 06:50

    Yes, by adding a call to it in the post-build event editor.

    If you go to the Properties page for your project, you should select the Build Events tab. You can type in the call to your batch file in the Post-build event command line text box.

    If you want to refer to the batch file using the paths included in the project or solution, you can click on the Edit Post-Build... button. This will open the Post-build Event Command Line dialog box.

    This dialog box has a Macros >> button that you can click. It will show you all the available Macros that you can use to refer to folders and files within your solution.

    When you select one of those macros, you can use the Insert button to insert them into your script.

提交回复
热议问题