简体   繁体   中英

Setting working directory for custom build steps in Visual Studio 2008

是否可以在Visual Studio 2008 C ++项目中为“自定义生成步骤”命令设置工作目录?

I don't know if you can set a default working directory but you can change it yourself in your custom build step.

In the Property Pages dialog for the file with the custom build step, select the Command Line field and click the ... button:

属性页对话框

In the Command Line dialog, you can add multiple commands that all will be executed for the custom build. To change the working directory to C:\\MyFolder and launch MyProgram.exe located in that folder, add the following lines:

命令行对话框

An alternative is to define all this in a bat file such as MyCustomBuild.bat and call it in the Command Line field: call MyCustomBuild.bat

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM