Software⏱️ 3 min read📅 2026-06-03

How to Fix: Why does MSBuild look in C:\ for Microsoft.Cpp.Default.props instead of c:\Program Files (x86)\MSBuild? ( error MSB4019)

MSBuild looks for Microsoft.Cpp.Default.props in C:\ instead of Program Files (x86)\MSBuild due to a misconfigured VCTargetsPath. Update the path to include the correct location.

Quick Answer: Update the HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolVersions\V4.0 VCTargetsPath to $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\Microsoft.Cpp.Default.props.

The error MSB4019 occurs when the MSBuild tool fails to locate the Microsoft.Cpp.Default.props file, which is expected to be in a specific location. The issue arises from the way the path to this file is set in the HKLM/software registry.

🛑 Root Causes of the Error

  • The path to Microsoft.Cpp.Default.props is set in the HKLM/software registry, but it points to a 32-bit location (c:\\\MSBuild) instead of the 64-bit location.

🛠️ Step-by-Step Verified Fixes

Method 1: Update the registry path

  1. Step 1: Open the Registry Editor (regedit.exe) and navigate to HKEY_LOCAL_MACHINE/software\\\Microsoft\\\MSBuild\\\ToolVersions\V4.0\VCTargetsPath.

Method 1: Update the registry path (continued)

  1. Step 2: In the right-hand pane, find the value VCTargetsPath and double-click it to edit its value.

Method 1: Update the registry path (continued)

  1. Step 3: In the Value data field, update the path to point to the 64-bit location: ${MSBuildExtensionsPath64}\\\Microsoft.Cpp\v4.0.

🛠️ Step-by-Step Verified Fixes (continued)

Method 2: Set the path manually

  1. Step 1: Create a new file named MSBuildExtensionsPath64.txt in the root of your user directory (C:\\\Users\\\\\\\AppData\\\Roaming\Microsoft\\\MSBuildExtensionsPath64.txt).

Method 2: Set the path manually (continued)

  1. Step 2: In this file, set the value to point to the 64-bit location: ${MSBuildExtensionsPath64}\\\Microsoft.Cpp\v4.0.

💡 Conclusion

By updating the registry path or setting it manually, you should be able to resolve the MSB4019 error and build your VC2010 project successfully.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions