NEED HELP: I tried to build UE 5.1 from Source - Lots of errors and warnings

I followed the tutorial of Building UE from source, and I got stuck on 121 out of 122 projects loaded on VS. On top of that, I had lots of errors I tried to fix by getting the netcoreapp 3.0, updating the “vulnerable” NuGet packages to stable versions, and adding missing the missing components, only to make things worse and have more errors.

Is there any way I can fix or salvage this?

No clue what you’ve been doing. Is this VS 2022? UE5 project appears to be unloaded. I have no clue what NuGet is or what any of those packages are and I build from source almost every day.

I just do:

  1. Setup.bat
  2. GenerateProjectFiles.bat
  3. Open .sln file with VS 2022
  4. Build UE project.

That’s it.

You’re saying you’re getting errors just loading the solution?

It took me couple of days on how to fix most of the errors and warnings by myself.
And somehow I managed to retarget the TargetFramework of projects cpp’s to net.6.0 to handle most of the problems with package vulnerabilities and other issues, after redownloading binary content and generating the project files again in different location.

Here’s what I did (and what you should’ve told me (at least in my case) ):

  1. First of all, try shortening the file path, where you placed the source code of the engine otherwise all projects in your solution in VS (Visual Studio) won’t load up.

  2. As to fix the errors and warnings a.o. about vulnerability
    Head over to: Tools > NuGet Package Manager > Manage NuGet Packages for Solution

From there, search up for the Package referenced in Error List: For ex. Microsoft.Extensions.Logging

Update the package versions of the Projects, that appeared in Error List to Stable Versions.
Packages may fail to restore when trying to update them to stable version and revert back to vulnerable version.
In that case, restart VS reopen the solution file and try updating the packages again.

  1. If warnings, (or at least some of them) about TargetFramework appear.
    You just need to open up the cpp. project file located listed on Error List in your solution, and in first line of each project file change the TargetFramework from net3.0 to net.6.0.

I’ll leave this unsolved for now, until I’ll encounter more problems with building UE from Source.

1 Like

Congrats on fixing it! Hope everything works for you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.