English 中文(简体)
buildbot C++ build on Windows: use devenv.com, vcbuild.exe, or MSBuild.exe?
原标题:

My buildbot has been running for 3 years using devenv.com to compile the projects on Windows.

Now devenv.com has troubles to build for 64 bits versions: passing the configuration as "Debug|x64" generates command line errors because of the pipe character. Escaping and enclosing between quotes result into other errors, some because of the spaces in the directory names, some because of strangely understood command line.

I tried both vcbuild.exe, and MSBuild.exe. vcbuild.exe works perfectly: I d like to stick to it. MSBuild.exe, on the other side, has a completely strange and complicated output that my coworkers feel terrible. But it is touted everywhere as THE way to build.

The question is: which of devenv.com, vcbuild.exe, and MSBuild.exe is the method that is most likely to last in time?

最佳回答

MSBuild (before Visual Studio 2010/.NET 4) doesn t itself build C++ projects. It calls out to vcbuild.exe. So if you are happy not using MSBuild then I would stick to that for the C++ projects. For managed projects (and for C++ using VS 2010) use MSBuild.

问题回答

MSBuild is the method "most likely to last". VCBuild.exe is dead; it s last release was 2008. MSBuild 4.0 will still use it, if it needs to build a VC project from VS2008 or earlier. As for devenv.exe -- of course, it s just headless Visual Studio. Functionally it is the same as hitting build in VS. That means that these days, it s essentially just handing off to MSBuild, but sometimes with less parallelism than msbuild.exe will get. The main reason you might still have to use devenv.exe is .vdproj (Deployment) projects. These legacy things have a build process hard coded into VS. I recommend an alternative like WiX or Installshield which are MSBuild based. Not long now until everything build in VS is MSBuild.

In short -- MSBuild is the future, use it unless you have deployment projects or other special circumstances.

Dan

I ran into the same problem, and solved it by Windows-shell-escaping the pipe character:

"Debug^|Win32"

msbuild.exe does not (did not?) know how to build setup projects. devenv.exe does.





相关问题
Command Line Parameters

I m trying to add my file in Visual Studio as command line parameters. I know my code works since when I use fopen("whole path here", "r"), it runs. I then add the file as a command line parameter ...

Read from File, or STDIN

I ve written a command line utility that uses getopt for parsing arguments given on the command line. I would also like to have a filename be an optional argument, such as it is in other utilities ...

R - capturing elements of R output into text files

I am trying to run an analysis by invoking R through the command line as follows: R --no-save < SampleProgram.R > SampleProgram.opt For example, consider the simple R program below: mydata =...

热门标签