Unable to build unreal engine from source (Nuget package issues?)

After downloading the source code, installing visual studio and required packages and running setup.bat and then trying to run GenerateProjectFiles.bat, I’m getting errors with nuget packages being incompatible with net6.0:

D:\UnrealEngine\Engine\Source\Programs\Shared\EpicGames.Serialization\EpicGames.Serialization.csproj : error NU1202: Pa
ckage OpenTracing 0.12.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package OpenTracing 0.12.1 does not
support any target frameworks. [D:\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
D:\UnrealEngine\Engine\Source\Programs\Shared\EpicGames.IoHash\EpicGames.IoHash.csproj : error NU1202: Package OpenTrac
ing 0.12.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package OpenTracing 0.12.1 does not support any ta
rget frameworks. [D:\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
D:\UnrealEngine\Engine\Source\Programs\Shared\EpicGames.Core\EpicGames.Core.csproj : error NU1202: Package OpenTracing
0.12.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package OpenTracing 0.12.1 does not support any target
 frameworks. [D:\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
D:\UnrealEngine\Engine\Source\Programs\Shared\EpicGames.Box\EpicGames.Box.csproj : error NU1202: Package Microsoft.Win3
2.Registry 5.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.Win32.Registry 5.0.0 does
not support any target frameworks. [D:\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
D:\UnrealEngine\Engine\Source\Programs\Shared\EpicGames.Box\EpicGames.Box.csproj : error NU1202: Package System.Securit
y.AccessControl 5.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package System.Security.AccessControl 5
.0.0 supports: uap10.0.16299 (UAP,Version=v10.0.16299) [D:\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBu
ildTool.csproj] ....

In order to start from a clean slate, I reinstalled my windows OS and repeated above steps to no avail. This is currently what shows as installed on my system:

dotnet --list-sdks
8.0.204 [C:\Program Files\dotnet\sdk]

dotnet --list-runtimes
Microsoft.AspNetCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

What is going on and how do I fix this? Any help would be appreciated

Edit:

I also receive this warning concerning packages being restored using .netframework versions other than ‘net6.0’:

D:\UnrealEngine\Engine\Source\Programs\Shared\EpicGames.Box\EpicGames.Box.csproj : warning NU1701: Package 'System.Data
.DataSetExtensions 4.5.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework
,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the p
roject target framework 'net6.0'. This package may not be fully compatible with your project. [D:\UnrealEngine\Engine\S
ource\Programs\UnrealBuildTool\UnrealBuildTool.csproj]

I noticed the cproj files (ex. UnrealEngine\Engine\Source\Programs\Shared\EpicGames.Box.csproj) within the unreal engine source list ‘net6.0’ in the targetframework field:

<PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>

is this incorrect?

For an update for my situation I ended up re-downloading the unreal engine source but downloaded it to a different drive (my C:/ drive. Originally, I downloaded it to my D:/ drive). I repeated my steps above and generateprojectfiles.bat finally worked. It seems like unreal source expects to be downloaded to the C:/ drive? I’m not sure why yet but will continue to investigate and see if this can be changed. In my mind the engine should be able to be downloaded to any drive

Hi @Boagz I wasn’t sure when I saw your post but your report suggest that through your download files got corrupted, or perhaps a hard drive issue? I had the problem of damaged downloaded files from downloading through the DOS panel. Since, I download directly via GitHub without problems so far.

Hmm, maybe? I did just download to my laptop and was able to run GenerateProjectFiles.bat without much issue (a couple warnings but still completed). I would have to look a bit more into it to confirm

Hello Boagz. I’m having similar issues with Nuget Packages and they’re being incompatible with net6.0. Were you able to solve this problem?