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.
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
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.