Wrong version of vcbuild.exe is invoked

做~自己de王妃 提交于 2019-12-11 05:55:24

问题


I have several versions of Visual Studio installed on my system (2005, 2008 and 2010). Also I have a Visual Studio 2005 (8.0) C++ project (vcproj) and solution (sln) associated with it. When I run the following command

msbuild helloworld.sln

the msbuild of version 4.0 is called and then it invokes vcbuild.exe from Visual Studio 9.0 directory. This leads to an error

vcbuild.exe : error VCBLD0010: Project 'XYZ' requires upgrade. Use'vcbuild /upgrade' or 'devenv /upgrade' to upgrade the project.

On the other systems MSBuild 4.0 invokes vcbuild.exe from Visual Studio 8 directory and the project successfully compiles. I cannot figure out why on my system the vcbuild 9.0 invokes instead of 8.0. Do anybody have an idea how to troubleshoot this issue?


回答1:


When running Visual Studio builds from the command line, you should always do that in a command line in which you first ran the vcvarsall.bat from the correct version of VS. Visual Studio installation puts shortcuts to such command lines into the Start menu.



来源:https://stackoverflow.com/questions/13290921/wrong-version-of-vcbuild-exe-is-invoked

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!