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?
To install MSBuild on a system that doesn't have Visual Studio, go to Build Tools for Visual Studio 2019, or install the . NET SDK. If you have Visual Studio, then you already have MSBuild installed. With Visual Studio 2022, it's installed under the Visual Studio installation folder.
Is it possible to build an application on a system if the MSBuild is not installed? If so, How? Yes, it is actually possible because the MSBuild doesn't depend on the Visual Studio of its operations.
To run MSBuild at a command prompt, pass a project file to MSBuild.exe, together with the appropriate command-line options. Command-line options let you set properties, execute specific targets, and set other options that control the build process.
Visual Studio determines the build order and calls into MSBuild separately (as needed), all completely under Visual Studio's control. Another difference arises when MSBuild is invoked with a solution file, MSBuild parses the solution file, creates a standard XML input file, evaluates it, and executes it as a project.
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.
You can download the required windows SDK here: http://www.microsoft.com/downloads/thankyou.aspx?familyId=e6e1c3df-a74f-4207-8586-711ebe331cdc&displayLang=en
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With