.NET 4.5 reference assembies not found - making Installed Build UE5 from source with VS2022

Hello. I’m trying to build UE5 Installed Build from source using VS2022. I built it successfully by opening solution in VS2022 and building, but I wanted to make the Installed Build, as I understand that is the way to make reasonably sized package. (Is there another way to clean the 200+ GB build - leaving only editor+engine that can be copied to other machines after building it from VS solution?)

I tried building it using:

RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script=Engine/Build/InstalledEngineBuild.xml -set:HostPlatformOnly=true -set:WithDDC=false

All goes well, until after 3 hours of compiling I get:

error MSB3644: The reference assemblies for .NETFramework,Version=v4.5 were not found.
when compiling Engine\Saved\CsTools\Engine\Source\Programs\UnrealSwarm\SwarmCoordinator\SwarmCoordinator.csproj.

As I said, I have VS2022 installed and it comes with .NET 4.8 I think. I tried installing various .NET developer packs from Microsoft, but it changes nothing.

Any ideas how to fix this? Feels like wrong configuration is generated somewhere, as when building directly from VS2022 solution, everything is fine.

Thanks!

1 Like

I managed to solve this myself - I just edited all .csproj files and replaced framework version from v4.5 to v4.8 and it compiled without any issues!

Other than that - it would be nice to have documentation on how to clean the build after building to get reasonable build size. Even the Installed Build turned out to be 70 GB.

4 Likes

Hello I have the same problem.
Could you please list which csproj you have modified and what line in the csproj ?
I didn’t have csproj with a line 4.5 so I didn’t find where to retarget to the 4.8.
Thanks in advance.

I’ve encounted the same problem, when install-building UE5.0.

Thanks to the info from @render.everything , I retargeted swarm related project files to use v4.8 by Using the batch file attached.(upgrade v4.5 to v4.8 when needed.)

(I don’t know why a install build will take 12h to execute, and thanks to this problem, I’ve tried 8 times to get it work…)
dotNetUpgrade.bat (775 Bytes)

1 Like

Thank you very much for this. I’m doing my 3rd retry now. I hope the error is fixed with that. It takes too long…