9
votes

I'm trying to run msbuild on a solution that has some C++ code in it. I have the SDK installed but not Visual Studio. I get the following error:

error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.

I have vcbuild.exe under C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages

How can make MSBuild find it?

3

3 Answers

3
votes

It might be as simple as vcbuild.exe not being in the path. IIRC, at least the visual studio installer doesn't automatically add the command line tools to the system or user path and you have to run vcvars32.bat to set them first before you can kick off the build.

0
votes

if you don't have the right version of the SDK installed, you could try MSBuild.exe with the flag /toolsversion:2.0