Visual Studio Version Compatibility Issue With Unreal Engine 5.0.3

So Actually I am following the udemy course: https://www.udemy.com/course/unrealcourse/?couponCode=PMNVD2025 i.e. Unreal Engine 5 C++ Developer: Learn C++ & Make Video Games.
The main issue I am facing is this: As instructed in the course first time I go to VS Code & then Terminal > Run Build Task > ObstacleAssaultEditor Win64 Development Build.
It shows me this error:


the whole error message is this:
"Using bundled DotNet SDK
Log file: C:\Users\acer1\AppData\Local\UnrealBuildTool\Log.txt
Building ObstacleAssaultEditor…
Using Visual Studio 2022 14.44.35213 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207) and Windows 10.0.26100.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Adaptive Build] Excluded from ObstacleAssault unity file: MovingPlatform.cpp, ObstacleAssault.cpp
Determining max actions to execute in parallel (12 physical cores, 16 logical cores)
Executing up to 12 processes, one per physical core
Requested 1.5 GB free memory per action, 1.7 GB available: limiting max parallel actions to 1
Building 8 actions with 1 process…
[1/8] Compile SharedPCH.Engine.ShadowErrors.cpp
Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
C:\Users\acer1\Downloads\UE_5.0\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(26): error C4668: ‘__has_feature’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Users\acer1\Downloads\UE_5.0\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(26): error C4067: unexpected tokens following preprocessor directive - expected a newline

  • The terminal process “C:\Windows\System32\cmd.exe /d /c Engine\Build\BatchFiles\Build.bat ObstacleAssaultEditor Win64 Development “E:\Game Development\Unreal Engine 5.0.3\Unreal Projects\ObstacleAssault\ObstacleAssault.uproject” -waitmutex” terminated with exit code: 6.
  • Terminal will be reused by tasks, press any key to close it."
    .
    .
    I am having Unreal Engine 5.0.3 with Visual Studio 2022 Installed(which I have uninstalled now due to the error) also I am on Windows 11 with version: 23H2, I am reinstalling VS 2022 so can anyone tell me which components to select while installing VS 2022 also tell me the correct version of SDK, .NET & MSVC required for the installation or Should I reinstall my Unreal Engine 5.0.3? Please Help me ! I am a complete beginner

Have a look here: Setting Up Your Development Environment for C++ in Unreal Engine | Unreal Engine 5.0 Documentation | Epic Developer Community

I can tell you why but for 5.0, not how to fix it. Basically from 5.0 to 5.5, you cannot use a newer version of MSVC than 14.38 as there was a bug in UE that prevented 14.39 or later working. Recently, Visual Studio forces 14.42 or later on because tools for Unreal actually also need that. With UE 5.6 this is fine but for older versions, there’s a complex workaround.

So for 5.0, you need to install .NET Core 3.1 I think it is, which is now considered out of support by about 3 years.

This is a guide for 5.5 (and 5.3, 5.4 really) so some things would not apply to 5.0. Also I don’t know which version of MSVC you require.


There information on tool versions here:
Setting Up Your Development Environment for C++ in Unreal Engine | Unreal Engine 5.5 Documentation | Epic Developer Community

To summarize, you need the following for Unreal to work

  • MFC, ATL, CLI and Build tools for 14.38 (for 5.4 or later)

  • Microsoft.NET Framework 4.8 SDK

  • Windows 11 SDK

  • .NET 8.0 Runtime

  • .NET SDK

  • .NET 6.0 (for UE 5.1 to 5.4)

It is important to note that both Microsoft.NET Framework 4.8 and .NET 8 is required as they are very different sets of tools.

Steps to try and resolve:

Step 1: Close Visual Studio and Unreal Editor and Launch the Visual Studio Installer. Click Modify and under individual components search for 14.38. Select the CLI, Build tools and ATL items for the x86/x64 only.

Step 2: Now, in your project folder, remove binaries, intermediate, ipch, .vs, DerivedDataCache, Saved and finally the .sln file. Don’t open the project just yet.

At this point try launching your project, if it works then you can skip the next few steps. If it fails, repeat step 2 and then follow the next few steps.

Step 3: Check the folder assuming VS is installed on C Drive: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\ and check the version. There should be a folder called 14.38.33130

Step 4: Now you have that confirmed, navigate to “%appdata%\Unreal Engine\UnrealBuildTool” (WINDOWS+R or run from start menu) and edit BuildConfiguration.xml so it has the following: (it probably has LatestVersion in there)

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<WindowsPlatform>
<CompilerVersion>14.38.33130</CompilerVersion>
<ToolchainVersion>14.38.33130</ToolchainVersion>
</WindowsPlatform>

Now you’ve done all that, launch your project and it will prompt you to build, say yes and hopefully you have a working setup

There are 2 more steps you should now do:

Step 5: Within Unreal, go to the tools menu and select Refresh Project

Step 6: Ensure your projects are also not stored in documents or desktop as OneDrive or a similar cloud tool will interefere with the project. If you have created it there, create a folder such as c:\projects and move the project to this folder then repeat step 5 again

Something that will get you out of trouble later too. When updating C++ code, if you change any part of the .h file, do not compile in Unreal . Close Unreal and Build in VS Code/Visual Studio and re-open the Unreal Project again. This ensures everything works smoothly.

One last recommendation is to actually use Visual Studio and not VS Code for C++. If you are feeling adventurous, consider Jetbrains Rider which is free for personal use