Issues trying to build unreal engine from source (version 5.0.3

I just grabbed unreal engine 5.0.3 from github and ran setup.bat. During the setup process it pulled up a link to download some .net things but that failed at the time so I figured I would just try and set everything up with .net after. So, I have since downloaded visual studio 2019. I made sure to select ‘Desktop development with C++’ as well as the ‘.Net desktop development’ and ‘.net cross-platform development’ when installing visual studio. I have also downloaded Microsoft ASP.NET Core 3.1.15 - Shared Fraemwork. When I look at ‘Apps & Features’ it shows Microsoft .NET SDK 5.0.410(x64) installed.

When I try and run ‘GenerateProjectFiles.bat’ I get a long list of errors, which start with the following:

D:\unreal_engine_5_0_3\Engine\Source\Programs\Shared\EpicGames.Core\EpicGames.Core.csproj : error NU1202: Package JetBrains.Annotations 2021.2.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package JetBrains.Annotations 2021.2.0 does not support any target frameworks. [D:\unreal_engine_5_0_3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
D:\unreal_engine_5_0_3\Engine\Source\Programs\Shared\EpicGames.Core\EpicGames.Core.csproj : error NU1202: Package Microsoft.Extensions.Logging 5.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.Extensions.Logging 5.0.0 does not support any target frameworks. [D:\unreal_engine_5_0_3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
D:\unreal_engine_5_0_3\Engine\Source\Programs\Shared\EpicGames.Core\EpicGames.Core.csproj : error NU1202: Package Microsoft.Extensions.Logging.Abstractions 5.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.Extensions.Logging.Abstractions 5.0.0 does not support any target frameworks. [D:\unreal_engine_5_0_3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
.............................

I tried uninstalling ASP.NET core but still get the same error. What am I doing wrong?

It works with VS2022 so you shouldn’t need to install VS2019.

The steps are basically:

  1. Clone from github.
  2. Run Setup.bat
  3. Run GenerateProjectFiles.bat
  4. Open UE5.sln in visual studio.

You shouldn’t need to install anything else. I suggest uninstall everything and start again from scratch. Report the first error you encounter (if any).

I did this process when I had originally installed visual studio 2022. I uninstalled it and everything else related to it via visual studio uninstaller. I then tried installing visual studio 2019. I will try uninstalling again and maybe clone unreal engine again and see what happens. I’ll report back once I do

1 Like

Okay, tried again. Did the following:

1.) Uninstalled visual studio 2019
2.) Uninstalled .net runtime and asp.net core stuff
3.) re-cloned 5.0.3 engine
4.) ran setup.bat
5.) downloaded visual studio 2022 and selected

  • C++ profiling tools
  • C++ AddressSanitizer (optional)
  • Windows 10 SDK (10.0.18362 or newer)
  • Unreal Engine Installer
    6.) ran GenerateProjectFiles.bat and got same error after ‘Building UnrealBuildTool’
D:\unreal_engine_5_0_3\Engine\Source\Programs\Shared\EpicGames.Core\EpicGames.Core.csproj : error NU1202: Package JetBrains.Annotations 2021.2.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package JetBrains.Annotations 2021.2.0 does not support any target frameworks. [D:\unreal_engine_5_0_3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
D:\unreal_engine_5_0_3\Engine\Source\Programs\Shared\EpicGames.Core\EpicGames.Core.csproj : error NU1202: Package Microsoft.Extensions.Logging 5.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.Extensions.Logging 5.0.0 does not support any target frameworks. [D:\unreal_engine_5_0_3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
1 Like

Where is JetBrains.Annotations coming from? Do you have some JetBrains product installed? Try uninstalling it.

Look through your Installed Programs and Software list and uninstall anything that seems related.

I have no idea. I’ve never explicitly installed such a thing. Thought it was a part of unreal. I don’t see anything related in my programs. Though I just tried looking it up and found this site:

Some kind of package for a package manager for .net? I have no idea. This must’ve installed on my system at some point when trying to deal with .net stuff. I’ll have to see if I can uninstall things

Actually it looks like its used in EpicGames.Core so it must be an actual dependency of UnrealBuildTool. Hmmm.

So I think the error is coming when its trying to build UnrealBuildTool which is a C# program that is used to build unreal engine (including generating project files for visual studio). The main .csproj is UnrealBuildTool.csproj and EpicGames.Core.csproj is a dependency.

One of the dependencies of that build is not installed correctly. Maybe netcoreapp3.1 like the error message says? Did you install the C# stuff when you installed Visual Studio? Do you have “.NET desktop development” checked in Visual Studio installer?

Try going to Visual Studio Installer > Modify > Workloads > .Net desktop development. Is that checkbox checked?

So After trying to delete a bunch of nuget and jetbrains folders I broke the visual studio installation. I restored a previous system image and I have visual studio 2022 installed again. When looking at the modify tab I have selected ‘.net desktop development’, ‘Desktop development with C++’ and ‘Game Development with C++’. I noticed I did not have the ‘unreal engine installer’ checked so I checked that as well. However, I’m still getting the same issue. I have no idea how this is happening. There is also an ‘ASP.NET and web development’ tab, should I select that as well? What I don’t understand is if this stuff is required why doesn’t the github page list these as dependencies?

I have also tried installing the ASP.NET stuff but still same issue. I’m losing hope lol

if windows 11 is installed, which SDK should I install? the latest for windows 10 version? or for version 11?
after updating UE 5.0.3. visual studio 2022 does not start for me. so I started looking for information about the error and saw that I had Windows 10 SDK 10.0.18362 installed.
I hope this was the problem of the startup error

I had to update the nuget.config file with a v3 source.
It is located here: C:\Users\{username}\AppData\Roaming\NuGet\nuget.config
and needs the following content:

<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="nuget.org" value="https://www.nuget.org/api/v2/" />   
  </packageSources>
</configuration>
3 Likes

Just came here to say that after 2h trying to build Unreal 5.2 from git, this is the only thing that made the UnrealBuildTool stop failing to compile.

Thank youuu