Visual Studio: Multiple post-build commands?

后端 未结 10 1244
逝去的感伤
逝去的感伤 2020-12-13 16:47

Visual Studio 2008 lets me declare a command and attach it to the post-build event for a project. Like a lot of developers, I use it regularly to xcopy files to the applicat

10条回答
  •  庸人自扰
    2020-12-13 17:13

    There isn't a good solution to this problem. The call idea does cause other scripts to run. I have noticed that error detection will not work. Put 'exit /b 1' into FailMe.cmd The use 'call FailMe.cmd' in the post build steps. Notice the build does not fail? I am using VS 2017 building a C# project. Now try it with 'FailMe.cmd' The build now reports an error.

    So you might be better off just using a single script, if error reporting is important.

提交回复
热议问题