devenv.exe与devenv.com

上星期在做visual studio自动构建的时候,突然发现build过程的日志没有在命令行输出,这样子一旦build失败,就看不到错误原因了。奇怪的是以前是可以看到这些日志的。先后怀疑了CMakeList.txt,构建脚本后,终于发现脚本中有一句devenv solution.sln /rebuild被改成了devenv.exe solution.sln /rebuild 。诱因找到了,背后的原理何在?MSDN的这个页面有很好的说明,Devenv Command Line Switches

The devenv.com utility provides for the delivery of output through standard system streams, such as stdout and stderr, and determines the appropriate I/O redirection when it captures output, for example, to a .txt file. Commands that begin instead with devenv.exe can use the same switches, but will send them to the devenv.exe program, bypassing the devenv.com utility.

可以看到,由于多余的加了exe,日志就没有被转发到标准输出上了。

posted @ 2012-02-20 22:45  Shawnone  阅读(1388)  评论(0编辑  收藏  举报