Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
FokkusuES's avatar
FokkusuES
Explorer
9 months ago
Solved

Meta Oculus branch unreal 4.27 wont compile completely in Visual Studio 2022

It also refuses to compile with 2019 (which was hard to acquire anyways since its out of support by Microsoft, but still recommended by Epic Games's documentation. We have installed every dependency ...
  • FokkusuES's avatar
    9 months ago

    For anyone reading this, we did not fix the issue, but we managed to sidestep it completely, we have a working version of this fork on one of our development machines, and we managed to use it to create a Installed Build doing the procedure described here and here.

    With that we avoided having to compile the engine from scratch on our other development machines.

    I'm going to list here all the information that we gathered about creating said Installed Build that is not present on epic's documentation that I liked. If you encounter our same situation and have a working compilation you can follow our very same steps.

    We did in this order:
    - Install dotnet-runtime-6.0.36-winx64
    - Rebuild UAT automation in Visual Studio 2022 from engine project after full rebuild of engine.
    - Install vs 2017 with all the standard components for unreal.
    - Install vs 2019 with C# and Visual Basic Roslyn Compilers component alone.
    - Install Windows Software Development Kit 10.0.22621 with at least the option Debugging Tools for Windows enabled.
    - To check the platforms that the engine can build to we use this command:

    BuildGraph -script=Engine/Build/InstalledEngineBuild.xml -listonly

    - Running then runUAT.bat (in Engine\Build\BatchFiles\) with CMD console using these parameters, disabling every platform that we do not want to use:

    BuildGraph -script=Engine/Build/InstalledEngineBuild.xml -target="Make Installed Build Win64" -nosign -set:GameConfigurations=Development;Shipping -set:WithWin64=true -set:WithWin32=false -set:WithAndroid=true -set:WithDDC=false -set:WithLinuxAArch64=false -set:WithLinux=false -set:WithIOS=false -set:WithTVOS=false -set:WithMac=false -set:WithHoloLens=false -set:WithLumin=false -set:WithLuminMac=false -clean

     

    - Build shader compiler using Build.bat (in Engine\Build\BatchFiles\) with these parameters:

    ShaderCompileWorker Win64 Development

    - If there is an error about Hololens despite having disabled the deployment for it, go to the file HoloLensPlatform.Automation.cs and add to the top:

    #define __MonoCS__

    Then build UE4 before retrying the buildgraph command with runuat.bat

    Compiled installed build is in LocalBuilds/ inside engine source folder