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

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 ?

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.

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.

The answer to all your question lies here. Struggled a lot to find this. Finally got it working. =)
Just to save you time visiting the link here is what's useful in that link.
INSTRUCTIONS:
You can install with npm:
$ npm install -g node-gyp
You will also need to install:
On Unix:
python (v2.7 recommended, v3.x.x is not supported)
make A proper C/C++ compiler toolchain, like GCC
On Windows:
Python (v2.7.3 recommended, v3.x.x is not supported)
Windows XP/Vista/7: Microsoft Visual Studio C++ 2010 (Express version
works well)
For 64-bit builds of node and native modules you will also need the Windows > 7
64-bit SDK
If the install fails,
try uninstalling any C++ 2010 x64&x86 Redistributable that you have
installed first.
If you get errors that the 64-bit compilers are not installed you may
also need the compiler update for the Windows SDK 7.1
Windows 7/8:
Microsoft Visual Studio C++ 2012/13 for Windows Desktop (Express
version works well)
If you have multiple Python versions installed,
you can identify which Python version node-gyp uses by setting the
'--python' variable:
$ node-gyp --python /path/to/python2.7
If node-gyp is called by way of npm and you have multiple versions of
Python installed, then you can set npm's 'python' config key to the
appropriate value:
$ npm config set python /path/to/executable/python2.7

This can be fixed by installing all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated cmd (run as administrator).

Related

My newest Windows 10 SDK installation does not include rc.exe and rcdll.exe so I get LNK1158 error

I'm running Visual Studio 2015 Update 3, On Windows 10 Professional. I just installed the latest version of Windows SDK. I'm trying to compile a VC++ Console Application, very simple, but I cannot compile it because I get this error:
LINK: fatal error LNK1158: cannot run 'rc.exe'
I tried googling and I came up with this QandA but I can't find any rc.exe and rcdll.exe in my /kits/10/bin folder! Where could the problem lie?
If it matters, I installed the SDK version that came with the setup, and then installed the newest Windows 10 SDK that was on this ISO file:
17763.1.180914-1434.rs5_release_WindowsSDK.iso
I have read that rc.exe is no longer included in the Windows SDK. I had installed the oldest MSVC C++ compiler in the Visual Studio 2019 installer, but it did not contain rc.exe either. I installed the newest (which is also version 14, but with a higher minor version number!) and it contains rc.exe.

Visual Studio 2017 does not detect Windows Driver Kit installation

I already have Visual Studio 2017 professional with Desktop Development with C++ installed.
I am trying to build the Virtual Serial project found here:
https://github.com/Microsoft/Windows-driver-samples/tree/master/serial/VirtualSerial
When I try to build it, I get the error:
Severity Code Description Project File Line Suppression State
Error MSB8020 The build tools for WindowsUserModeDriver10.0 (Platform Toolset = 'WindowsUserModeDriver10.0') cannot be found. To build using the WindowsUserModeDriver10.0 build tools, please install WindowsUserModeDriver10.0 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". virtualserial C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets
I cannot find any instructions on installation aside from this website.
https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
I downloaded the WDK for Windows 10, version 1803.
I closed VS2017 and ran the installer.
When running the installer I got the message in the screenshot below, I clicked Next to continue installing
After running the installer, the project still does not build, with the same error: WindowsUserModeDriver10.0 is not installed.
What am I missing during installation? Is this the correct installer for regular VS2017 (not community edition)?
Thanks,
I know this is old, but I recently fell into this rabbit hole. What worked for me was uninstalling all of the WDKs, rebooting, and installing WDK 1803 (the wdksetup.exe program downloaded from Other WDK downloads shows version 10.0.17134.1 in properties). That WDK installer specifically calls out VS 2017 when you add the Visual Studio integration at the end of the install process.
In my situation, I installed vs2022 with SDK 19041 and WDK 19041.
After some testing, I realized that VS2022 only supports WDK 22621(so on this date). So I installed WDK 22621 and SDK 22621, and problem solved.
If you still can't find Kernel Driver Build option, try run this file C:\Program Files (x86)\Windows Kits\10\Vsix\VS2022\10.0.22621.0\WDK.vsix(WDK 19041 only has VS2019). It's a Visual Studio's extension.
According to this: https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware-winpc/windows-wdk-on-visual-studio-2017-community/fdbd2b44-e57a-4849-903d-04001205a764
WDK is not currently supported by visual studio 2017.
This is ridiculous

Qt 5.8 msvc 2015 compile error

I have installed Qt using an offline installer qt-opensource-windows-x86-msvc2015_64-5.8.0. I have visual studio community edition 2017 installed with c++ build tools. because it's compiler was incompatible with the qt version, then I installed visual c++ build tools 2015 from http://landinghub.visualstudio.com/visual-cpp-build-tools . When I try to compile a project it gives an error :-1: error: LNK1158: cannot run 'rc.exe'. Heres how my qt kit looks like,
Can someone figure out whats the mistake and how to fix it.
Thanks.
I've fixed this both on my own machine and on several co-workers machines.
It tends to happen when you have both Visual Studio 2015 and VS 2017 installed. Or more precisely, multiple versions of the Windows SDK installed. When that happens, the vcvars32.bat script (located in your Visual Studio install dir) does not correctly add the location of the resource compiler (rc.exe) to your PATH. Thus, QT Creator runs vcvars32.bat (as specified in Qt Creator under Option->Build&Run->Compilers, but the tools directory for the Windows SDK Kit isn't properly added to the PATH environment.
The simple fix is to add the appropriate version of RC.exe to your path.
Do this from the command line:
cd "c:\program files(x86)"
dir /s rc.exe
You'll get several versions (x86 and x64) and for several versions of the SDK. Add the PATH for where rc.exe lives for the version that corresponds to the SDK and build flavor to your vcvars32.bat startup script.
For example:
PATH="C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86";%PATH%
Restart Qt Creator and that should fix it.
Another fix that worked for me is to uninstall all versions of Visual Studio (and all those side installs of SQL, Windows SDKs, dev tools, etc...). Reboot. Then cleanly install VS 2017 again. Then cleanly uninstall and re-install all of Qt again. That seemed to work for me. A wonderful way to spend an afternoon.
If you update to Qt 5.9 it supports MSVC 2017. However, if you want to get it working with 5.8, I believe you might be missing the Windows SDK. You can download the SDK from Microsoft for Windows 7, 8 or 10, just get whichever version is appropriate for you.
With some googling I found a couple of other somewhat related solutions here, & here, and I've summed them up below:
If you've already got the SDK or installed it and it still doesn't work, it appears that copying rc.exe and rcdll.dll from the WindowsSDK folder to your MSVS installs \VC\bin folder may fix the problem. You might also try copying those same two files to Qt's \Qt*version number**compiler version*\bin.

npm config set C compiler not to vcbuild.exe

When trying to npm install a node project in a Windows7 machine I am suffering from the inglorious error message:
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.
Because I am under Cygwin I have already installed gcc ($ gcc -v and $ g++ -v respond in both Cygwin and cmd).
How can I tell npm to use gcc to compile instead of the vcbuild.exe that I don't have installed?
Note: I have already tried node-gyp and it did not work.
Note2: I know for sure the code runs without problems in linux.
Here is what sorted out my problem and the steps that I took to reach the long-awaited solution:
Installed Visual Studio Community but the VCBuild.exe was not there still.
Installed Microsoft Build Tools 2015 and tried to install the affected module as: npm install bcrypt --msvs_version=2015 but I got the following error:
error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
My last shot was to install Visual Studio Express for Desktop and after npm install bcrypt --msvs_version=2015 I manage to npm install and npm start my app in Windows7!!
Lastly I uninstalled Visual Studio Community and Microsoft Build Tools 2015.
Note I had to remove the bcrypt module from the dependencies in package.json and install it as npm install bcrypt --msvs_version=2015 inside my app folder.

Error building sample driver: An SDK corresponding to WDK version '8.1' was not found

I used one Windows Driver samples from github (Filesys) and tried to build it on Windows 10 with Visual Studio 2015.
I have installed both:
WDK8.1 with its SDK
WDK10
But when i try to build a project i see this error message:
An SDK corresponding to WDK version '8.1' was not found. Please install the SDK before building. minispy (Filter\minispy) C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets
but SDK of 8.1 is already installed.
Is there any option in Visual studio that i could use to point it to SDK 8.1?
I had the same problem and the solution
is sdk version 10 released after VS 2015 .
You should download and install it manually. I used the following link for downloading sdk :
https://dev.windows.com/en-us/downloads/windows-10-sdk
Also see this link for help with downloading and installing sdk
http://blogs.msdn.com/b/jpwdkblog/archive/2015/08/21/windows-10.aspx
good luck
In this case, you may missed No.3.
Check following points:
Install Visual Studio 2015
Install Visual C++ (Not installed by default)
Install Windows SDK for Windows 10 (Not installed by default)
Install WDK 10 (Download separately)
Upgrade project from WDK 8.1 (for more detail: https://msdn.microsoft.com/en-us/library/windows/hardware/mt270257%28v=vs.85%29.aspx )
Currently,
Visual Studio 2015 supports WDK 10.
Visual Studio 2013 supports WDK 8.1.
In my environment, Visual Studio 2015 may not support WDK 8.1.
When build in WindowsUserModeDriver8.1 with VS2015, an error was occurred: prop is not found.
WDK 10 supports build drivers for Windows 10 / 8.1 / 8 (/ 7?).
(see also: https://msdn.microsoft.com/en-US/library/windows/hardware/dn914754%28v=vs.85%29.aspx )
To build Windows 8.1 driver, follow below.
Open project properties
Navigate to Configuration Properties > General
Check: Platform Toolset Windows****ModeDriver10.0
Navigate to Configuration Properties > Driver settings
Check: Target OS Version: Windows 8.1
Check: Target Platform: Desktop (Default: Universal)
You are likely targeting the wrong platform toolset. To build a driver for Windows 10, you need to target one of the Windows 10 platform toolset (WindowsKernelModeDriver10.0 or WindowsUserModeDriver10.0). If you want to use SDK 8.1, then you should use the WDK 8.1 platform toolsets (WindowsKernelModeDriver8.1 or WindowsUserModeDriver8.1).
You cannot use the 10.0 toolsets and try to make them point to SDK 8.1 because there were some key changes to how files are laid on disk between the two kits. Using the appropriate toolset should hopefully fix the issue!
Have you followed all the instructions during the installation of VS? https://msdn.microsoft.com/en-us/windows/hardware/dn913721.aspx
After correct installation I have handled the problem.
(Optional)
Did you install Windows 10 SDK?
Download link: https://dev.windows.com/en-us/downloads/windows-10-sdk

Resources