UE4.27Plus Installed Build Problem while Building

When I try to build UE4.27Plus, around HoloLens.Automation.csproj the error occurs.
though I set off HoloLens option.

Does anybody have the same problem and solved it in the past?
The best way I think is to skip this process because it is needless.

Engine\Build\BatchFiles\RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script="Engine/Build/InstalledEngineBuild.xml" -set:HostPlatformOnly=true -set:WithHoloLens=false -set:WithPS4=true -set:WithPS5=true -set:WithGDK=true -set:WithSwitch=true -set:WithLumin=false -set:WithLinux=false -set:WithWin32=true -set:WithMac=false -set:WithIOS=false -set:WithTVOS=false -set:VS2019=false
----
Running: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj /property:Platform=AnyCPU /property:Configuration=Development /verbosity:minimal /nologo
    DotNETUtilities -> D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Binaries\DotNET\DotNETUtilities.dll
    UnrealBuildTool -> D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Binaries\DotNET\UnrealBuildTool.exe
    AutomationUtils.Automation -> D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Binaries\DotNET\AutomationUtils.Automation.dll
    Localization.Automation -> D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Binaries\DotNET\AutomationScripts\Localization.Automation.dll
    AutomationScripts.Automation -> D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Binaries\DotNET\AutomationScripts\AutomationScripts.Automation.dll
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Windows". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
  D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(17,15): error CS0234: The type or namespace name ‘Management’ does not exist in the namespace ‘Windows’ (are you missing an assembly reference?) [D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
  D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,24): error CS0246: The type or namespace name 'IAsyncOperationWithProgress<,>' could not be found (are you missing a using directive or an assembly reference?) [D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
  D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,52): error CS0246: The type or namespace name 'DeploymentResult' could not be found (are you missing a using directive or an assembly reference?) [D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
  D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,70): error CS0246: The type or namespace name 'DeploymentProgress' could not be found (are you missing a using directive or an assembly reference?) [D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
Took 0.7892416s to run MSBuild.exe, ExitCode=1
Command failed (Result:1): C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe D:\UE4.27Plus\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj /property:Platform=AnyCPU /property:Configuration=Development /verbosity:minimal /nologo. See logfile for details: 'MSBuild-2023.06.09-00.35.02.txt'
AutomationTool exiting with ExitCode=1 (Error_Unknown)
BUILD FAILED

I’ve been having this issue for the last 2 weeks and have just figured it out… You need Windows 11 SDK; they did something after the github disruption. Hope this helps you.
Cheers!

I had to uninstall all of my Windows 11 SDKs to even build UE 4.27-plus (as of 9/19/2023 at least). It seemed like everyone on these forums was saying that it would not build with greater than Windows SDK 19041. How did you get it to build with the Windows 11 SDK? (I would love to be able to reinstall those SDKs)

As for this HoloLens issue, since I don’t need HoloLens support, I just added

#define __MonoCS__

to the top of HoloLensPlatform.Automation.cs to make the build happy. I’m confident that it won’t actually call these classes, since I am not building for this target, and it seems to work.

1 Like

what do you mean you just added? just added WHERE?

I mean, can someone from epic step in, I am also having errors and I dont know if we need SDK 11, is this true?

What about other people who were running older versions, did something happen where everyone needs to update?

I get this error

UATHelper: Packaging (Android (ASTC)): Running AutomationTool…
UATHelper: Packaging (Android (ASTC)): Parsing command line: -ScriptsForProject=C:/Users/edubz/Desktop/Embryos_61723/Embryos.uproject BuildCookRun -nocompileeditor -nop4 -project=C:/Users/edubz/Desktop/Embryos_61723/Embryos.uproject -cook -stage -archive -archivedirectory=“C:/Users/edubz/Desktop/New folder” -package -ue4exe=C:\UE4\Engine\Binaries\Win64\UE4Ed
itor-Cmd.exe -compressed -ddc=DerivedDataBackendGraph -pak -prereqs -distribution -nodebuginfo -targetplatform=Android -cookflavor=ASTC -build -target=Embryos -clientconfig=Development -utf8output -compile
UATHelper: Packaging (Android (ASTC)): Dependencies are out of date. Compiling scripts…
UATHelper: Packaging (Android (ASTC)): C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “Windows”. Check to make sure the assembly exists on disk. If this reference is required by your code, you
may get compilation errors. [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(17,15): error CS0234: The type or namespace name ‘Management’ does not exist in the namespace ‘Windows’ (are you missing an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,24): error CS0246: The type or namespace name ‘IAsyncOperationWithProgress<,>’ could not be found (are you missing a using directive or an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Autom
ation.csproj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,52): error CS0246: The type or namespace name ‘DeploymentResult’ could not be found (are you missing a using directive or an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,70): error CS0246: The type or namespace name ‘DeploymentProgress’ could not be found (are you missing a using directive or an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj
]
UATHelper: Packaging (Android (ASTC)): Took 1.5861575s to run MSBuild.exe, ExitCode=1
UATHelper: Packaging (Android (ASTC)): ERROR: Failed to build “C:/UE4/Engine/Programs/AutomationTool/Saved\UATTempProj.proj”:
UATHelper: Packaging (Android (ASTC)): C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “Windows”. Check to make sure the assembly exists on disk. If this reference is required by your code,
you may get compilation errors. [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(17,15): error CS0234: The type or namespace name ‘Management’ does not exist in the namespace ‘Windows’ (are you missing an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,24): error CS0246: The type or namespace name ‘IAsyncOperationWithProgress<,>’ could not be found (are you missing a using directive or an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.
Automation.csproj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,52): error CS0246: The type or namespace name ‘DeploymentResult’ could not be found (are you missing a using directive or an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csp
roj]
UATHelper: Packaging (Android (ASTC)): C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,70): error CS0246: The type or namespace name ‘DeploymentProgress’ could not be found (are you missing a using directive or an assembly reference?) [C:\UE4\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.c
sproj]
UATHelper: Packaging (Android (ASTC)):
UATHelper: Packaging (Android (ASTC)): (see C:\UE4\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
PackagingResults: Error: Failed to build “C:/UE4/Engine/Programs/AutomationTool/Saved\UATTempProj.proj”:
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED
PackagingResults: Error: Unknown Error

ok I installed the 11 SDK and now it works

https://go.microsoft.com/fwlink/?linkid=2237387

but I dont understand what about my other UE4 build that does not have this SDK will it break if I go from machine to machine???

2 Likes

Been doing the SDK dance for a few hours try to work this out, didn’t even occur to me the missing classes would be in the Win11 SDK.

Thankyou! <3

the define trick worked for me, thanks @PetezahUnity

The problem was that the wrong sdk was set in the registry and in my case it wasn’t updated by installing a new sdk.
You can open the HoloLens.Automation.csproj and look for MonoCS (line:56). There is a entry where the sdk is set ‘Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@’(line:63). It was set to a verion that no longer exists. I changed the version to an existing version.

Thank you.

I encountered this error when building a fork of UE4.26 designed for Carla. Adding this line to the top of the file fixed it.