Visual Studio Setup For Unreal Engine 5
The correct configuration items to compile the engine from source
If you’ve set up UE5 and tried to compile from source, you’ve probably found that it didn’t work, and started fighting with Visual Studio in order to make it go.
Following the Epic Building From Source guide won’t get you a compiling install. There’s one additional prerequisite step that’s not well-documented: Visual Studio setup. So, here are the steps I use to set it up.
The Steps
The latest VS C++ toolchain doesn’t work with UE5.3 and below, but if you’re not actually using Visual Studio, you can install just the build tools for VS, fixed to a particular release. The version you want is 17.6 and it can be downloaded from the release page.
If you do need to use VS then you’ll need Professional to pick your version, but if you’re still on 5.3 at this stage you’re likely a professional so you probably already have it.
When you run the installer, you’ll see a window like this.
From the two-column list of options on the left, make sure the following items are ticked:
.NET desktop development
Desktop development with C++
Universal Windows Platform development
Game development with C++, plus the following optional items under this heading:
C++ profiling tools
C++ AddressSanitizer
After you’ve selected the correct options, the window should look more like this. Please ignore the day/night mode swap.
Now, go to the Individual Components tab and ensure the following items are ticked:
.NET Framework 4.8 SDK
.NET Framework 4.7.2 targeting pack
.NET Framework 4.6.1 targeting pack
MSVC v143 - VS 2022 C++ x64/x86 build tools (v14.36-17.6)
C++ v14.36 (17.6) ATL for v143 build tools (x86 & x64)
C++ v14.36 (17.6) MFC for v143 build tools (x86 & x64)
C++/CLI support for v143 build tools (14.36-17.6)
Windows 11 SDK (10.0.22000.0)
Run Setup.bat in the source folder as administrator.
You’re done! Now you can follow the guide.
Why is it like this?
The official documentation doesn’t know anything about your setup and doesn’t want to, they have to account for everything and that’s all well and good but it’s still a problem you’d have to solve for yourself. Now you don’t have to.
// for those we have lost
// for those we can yet save