error MSB3411: Could not l oad the Visual C++ component "VCBuild.exe"

Ashish Negi picture Ashish Negi · Sep 4, 2013 · Viewed 30.7k times · Source

I have Visual Studio 2010 with SP1 and Windows sdk 7.1. I also have VS2012 and Windows kit 8.

when i run Windows SDK 7.1 Command Prompt and run node-gyp build --msvs_version=2010 it gives me 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 Fr
amework 3.5, or 2) install Microsoft Visual Studio 2008.

Is it trying to find VCBuild.exe.

I found that vcbuild has been replaced with msbuild.

Is it a valid error ?

I also found that in Windows 7, for .NET 3.5, you just need to turn it on from Control Panel. I have looked at other questions on stackoverflow like here and this.

But issue is that since vcbuild.exe does not exist in system with vs2010 then why does node-gyp is searching for it ? Or am i missing something ?

How do i resolve this error ?

Answer

br2000 picture br2000 · Jun 23, 2014

The following has worked for me (as of June 2014), as described in here.

  • Install free Visual Studio Express 2013 for Windows (not VS Express 2013 for Web)

  • npm install --msvs_version=2013

Otherwise, I have spent a lot of time installing old Microsoft packages and patches, and it wasn't helpful.