Unable to build UE 5.5 InstalledBuild

Hello!
I’m trying to build a InstalledEngineBuild for UE 5.5 and getting this error:

06:47:14   Running: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe "F:\TeamCity\BuildAgent\work\926a3f111536690c\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj" /property:"Platform"="AnyCPU" /property:"Configuration"="Development" /restore /verbosity:minimal /nologo
06:47:14   
06:47:14   F:\TeamCity\BuildAgent\work\926a3f111536690c\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\sdk\8.0.300\NuGet.targets(439,5): error MSB4062: Die NuGet.Build.Tasks.WarnForInvalidProjectsTask-Aufgabe konnte nicht aus der F:\TeamCity\BuildAgent\work\926a3f111536690c\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\sdk\8.0.300\NuGet.Build.Tasks.dll-Assembly geladen werden. Die Datei oder Assembly "NuGet.Build.Tasks, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden. Stellen Sie sicher, dass die <UsingTask>-Deklaration korrekt ist, die Assembly und alle zugehörigen Abhängigkeiten verfügbar sind und die Aufgabe eine öffentliche Klasse enthält, die Microsoft.Build.Framework.ITask implementiert. [F:\TeamCity\BuildAgent\work\926a3f111536690c\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj]
06:47:14   Took 0,46s to run MSBuild.exe, ExitCode=1
06:47:14   Command failed (Result:1): C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe "F:\TeamCity\BuildAgent\work\926a3f111536690c\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj" /property:"Platform"="AnyCPU" /property:"Configuration"="Development" /restore /verbosity:minimal /nologo. See logfile for details: 'MSBuild-2024.12.25-06.47.14.txt'
06:47:14   AutomationTool executed for 8h 3m 49s
06:47:14   AutomationTool exiting with ExitCode=1 (Error_Unknown)
06:47:14   BUILD FAILED
06:47:14   RunUAT failed

Unfortunately it is in German but besically it says that the NuGet.Build.Tasks.dll DLL can’t be loaded because one of its dependencies was not found.
I’m using TeamCity with this build command:

Engine\Build\BatchFiles\RunUAT.bat BuildGraph -target="Make Installed Build Win64" -nosign -script="Engine\Build\InstalledEngineBuild.xml" -set:WithDDC=false -set:SignExecutables=false -set:EmbedSrcSrvInfo=false -set:WithFullDebugInfo=true -set:HostPlatformEditorOnly=false -set:WithWin64=true -set:WithMac=false -set:WithAndroid=true -set:WithIOS=false -set:WithTVOS=false -set:WithLinux=true -set:WithLinuxArm64=true -set:WithHoloLens=false -set:CompileDatasmithPlugins=false -set:WithServer=true -set:WithClient=true

My Visual Studio version is 17.8.16, for the UE 5.3 and 5.4 it worked well, no issues with building.

1 Like

I have the same issue. I tried to build with MSVC version 17.8, 17.10 and the current latest. All resulted in the same issue. I have cleared the directory and download everything from scratch but doesn’t seems to work either. Would be very interested in a solution to this. Here is the part of my output showing the error:

Running: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe "C:\Git\HaEngine\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj" /property:"Platform"="AnyCPU" /property:"Configuration"="Development" /restore /verbosity:minimal /nologo

C:\Git\HaEngine\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\sdk\8.0.300\NuGet.targets(439,5): error MSB4062: The "NuGet.Build.Tasks.WarnForInvalidProjectsTask" task could not be loaded from the assembly C:\Git\HaEngine\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\sdk\8.0.300\NuGet.Build.Tasks.dll. Could not load file or assembly 'NuGet.Build.Tasks, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Git\HaEngine\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj]
Took 0.34s to run MSBuild.exe, ExitCode=1
Command failed (Result:1): C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe "C:\Git\HaEngine\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj" /property:"Platform"="AnyCPU" /property:"Configuration"="Development" /restore /verbosity:minimal /nologo. See logfile for details: 'MSBuild-2025.01.14-21.13.03.txt'
AutomationTool executed for 2h 28m 49s
AutomationTool exiting with ExitCode=1 (Error_Unknown)
BUILD FAILED

I finally had some time to investigate this further. It turns out I missed a step in the installed build guide: installing the DotNet 6.0 runtime Windows DotNet 6.0 Runtime. After installing it and restarting the computer, the build succeeded. I hope this helps resolve the issue for someone else.

5 Likes

Hello,

(my previous post was not for this subject :sweat_smile:)
It worked for me ! Thank you !

But:

  • Event if you see this message :
    image

Don’t skip the 6.0. I skiped the 6.0. With 9.0 it’s not working on my side, I have no idea why.
Then I installed the 6.0, Run console apps install and it worked. :rocket:

1 Like

Hi! I have exactly the same problem, but installing the .NET 6.0 Runtime did not help in my case.

Like you, I am operating in a CI environment (not TeamCity) and have already tried many different things — from installing all Visual Studio workloads and components with the versions recommended in https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Config/Windows/Windows_SDK.json, to using Visual Studio Build Tools or Visual Studio Community, to explicitly adding the desired version of NuGet.Build.Tasks to the global NuGet cache, and so on.

I was also unable to reproduce this problem on a personal machine, so I suspect it may be something that .NET tries to download on the fly (even though the CI machine has internet access and uses nuget.org as the primary source).

Faced with the same issue on teamcity and on local machine.

18:28:57       INFO:root:Running: C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe "C:\ba\tc\work\dev\ue_src\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj" /property:"Platform"="AnyCPU" /property:"Configuration"="Development" /restore /verbosity:minimal /nologo
18:28:58       INFO:root:
18:28:58       INFO:root:C:\ba\tc\work\dev\ue_src\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\sdk\8.0.300\NuGet.targets(439,5): error MSB4062: The "NuGet.Build.Tasks.WarnForInvalidProjectsTask" task could not be loaded from the assembly C:\ba\tc\work\dev\ue_src\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\sdk\8.0.300\NuGet.Build.Tasks.dll. Could not load file or assembly 'NuGet.Build.Tasks, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\ba\tc\work\dev\ue_src\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj]
18:28:58       INFO:root:Took 0.64s to run MSBuild.exe, ExitCode=1
18:28:58       INFO:root:Command failed (Result:1): C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe "C:\ba\tc\work\dev\ue_src\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj" /property:"Platform"="AnyCPU" /property:"Configuration"="Development" /restore /verbosity:minimal /nologo. See logfile for details: 'MSBuild-2025.04.16-15.28.57.txt'
18:28:58       INFO:root:AutomationTool executed for 3h 6m 6s
18:28:58       INFO:root:AutomationTool exiting with ExitCode=1 (Error_Unknown)
18:28:58       INFO:root:BUILD FAILED

but if i call raw command:

C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe "C:\ba\tc\work\dev\ue_src\Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj" /property:"Platform"="AnyCPU" /property:"Configuration"="Development" /restore /verbosity:minimal /nologo

all is ok!

It seems UE download .NET Runtime 8 with ./Setup.bat launch and uses it by default. But Swarm and other csTools (Engine/Binaries/DotNET/) need .NET Runtime 6.
RunUAT.bat BuildGraph used .NET Runtime 8 and raw call of MSBuild.exe used .NET Runtime 6