Crow301
Crow301

Reputation: 11

How do you make Visual Studio use the proper MSBuild.exe?

I'm currently in the process of turning a newly bought machine into our build machine by porting over all of the build software that is on our existing machine, for the company I work for. I've gotten all the proper software installed on the new machine and now I'm in the process of getting a build to actually go through properly. I've been receiving an "Could not load the Visual C++ component VCBuild.exe" error when the build script tries to compile one of our solutions. So, I tried running the VCBuild.exe file manually and tried to build a solution outside of our build script. In doing so I received the below error message (entire section of command line included).

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages>vcbuild I:\WORKDIR\Utilities\INCBUILD\INCBUILD.SLN Microsoft (R) Visual C++ Project Builder - Command Line Version 9.00.21022 Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Build Engine Version 2.0.50727.8784 [Microsoft .NET Framework, Version 2.0.50727.8784] Copyright (C) Microsoft Corporation 2005. All rights reserved.

INCBUILD.SLN(1): Solution file error MSB5014: File format version is not recognized. MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.

Doing some googling and searching through the forums here I believe that the issue is that VCBuild.exe is calling the wrong version of MSBuild.exe. In the command line blerp above it shows that it is using the MSBuild.exe from .NET 2. From what I've read the solution to my problem is to make VCBuild.exe use the MSBuild.exe from .NET 3.5 or 4 by changing the environment variable to point at one of them instead of the .NET 2 version.

My issue is that I am not sure how to find and change this variable so that VCBuild.exe will call the proper version of MSBuild.exe

Thank you in advance for any assistance.

Upvotes: 1

Views: 378

Answers (0)

Related Questions