Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 ?

like image 220
Ashish Negi Avatar asked Sep 04 '13 08:09

Ashish Negi


2 Answers

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.

like image 115
br2000 Avatar answered Oct 02 '22 04:10

br2000


Setting up the VS2010 and other applications as listed at node-gyp wiki solved the problems.

On Windows XP/Vista/7, node-gyp requires Python 2.7 and Visual Studio 2010

According to the readme file in Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1, to ensure that your system has a supported configuration,

uninstall the following products first (if you want to save tons of time)

and then reinstall them in the order listed: (you can uninstall in any order :P)

Visual Studio 2010

Windows SDK 7.1

Visual Studio 2010 SP1

Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1

On x64 environments, the last update in the list fixes errors about missing compilers and

error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found.

like image 28
Ashish Negi Avatar answered Oct 02 '22 04:10

Ashish Negi