我在Visual Studio 2010中添加了这些预构建事件和后构建事件。
- 预构建事件:echo Hello
- 后构建事件:echo Byebye
现在,如果我构建该项目,将会看到以下内容:
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Build started 2015-08-18 5:50:09 PM.
1>InitializeBuildStatus:
1> Creating "Debug\HelloWorld.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>PreBuildEvent:
1> Hello
1>ClCompile:
1> HelloWorld.cpp
1> HelloWorld.vcxproj -> C:\Users\yuchen\Desktop\HelloWorld\Debug\HelloWorld.exe
1>PostBuildEvent:
1> Byebye
1>FinalizeBuildStatus:
1>
1>Build succeeded.
我重复了同样的步骤来针对Visual Studio 2013进行操作。但不确定预构建事件和后构建事件是否实际运行。
输出是否移动到不同的窗口?是否有其他设置可以使预构建和后构建事件正常工作?
1>------ Rebuild All started: Project: HelloWorld2, Configuration: Debug Win32 ------
1> stdafx.cpp
1> HelloWorld2.cpp
1> HelloWorld2.vcxproj -> C:\Users\yuchen\Desktop\Win32Project1\Debug\HelloWorld2.exe