Wrong version of vcbuild.exe is invoked
Asked Answered
A

1

1

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?

Abbyabbye answered 8/11, 2012 at 14:26 Comment(3)
There is a command line vcvars.bat that should set paths etc correctly - it lives in the hierarchy somewhere (can't remember where off hand) - but if you run the correct version (for the vc++ you want) it should sort that out. If you don't use this, Is it possible that you have the path hard coded in your environment?Sedum
I need to use vcvars for VS 2010. This works for the other systems but not mine. And no, I don't have VS 2008 (9.0) path hardcoded in environment.Abbyabbye
You'll need to go through the pain of comparing them I suspect... see whats differentSedum
C
0

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.

Cantwell answered 8/11, 2012 at 15:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.