If you are using Rider make sure you are not using it’s Build tools.
Here is what ChatGPT said and saved me
What’s Going Wrong
The MSBuild expression:
$(VCTargetsPath)\Microsoft.Cpp.Default.props
is evaluating to:
C:\Program Files\JetBrains\JetBrains Rider 2025.1\tools\MSBuild\Microsoft\VC\v170\
which does not contain the C++ build tools (especially for v170
= Visual Studio 2022 toolset).
Solution
You must configure Rider to use MSBuild from Visual Studio, not the bundled one. Here’s how:
Step-by-Step Fix
1. Install Visual Studio 2022 with C++ Build Tools (if not already)
If you haven’t done this:
- Go to: Download Visual Studio Tools - Install Free for Windows, Mac, Linux
- Download Visual Studio 2022 Community Edition
- During installation, select:
Desktop development with C++
Game development with C++ (for Unreal Engine)
Optional: .NET desktop development
2. Find the Correct MSBuild Path
Typically, the correct MSBuild path is:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
Or for Professional/Enterprise:
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe
3. Configure Rider to Use That MSBuild
- Open Rider
- Go to:
arduino
File > Settings > Build, Execution, Deployment > Toolset and Build
- Set:
- MSBuild path to the one above
- Use environment variables from → Visual Studio
This ensures Rider can find:
Microsoft.Cpp.Default.props
- The correct
VCTargetsPath
- Proper integration with Unreal projects
Verify After
After making these changes:
- Close and reopen Rider
- Rebuild your project
If the issue persists, check:
%VCTargetsPath%
environment variable (should be auto-set by VS tools)- Whether
Microsoft.Cpp.Default.props
really exists at:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Default.props