Packaging game server fails using Unreal Engine source build

I’m attempting to package the server version of the Unreal Shooter Game for UE 4.24.3 Win64, and am getting some strange errors relating to HoloLens (which I wasn’t even aware I was linking against).

My packaging log looks like this:


UATHelper: Packaging (Windows (64-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (64-bit)): Parsing command line: -ScriptsForProject="C:/Users/Jonathan/Documents/Unreal Projects/ShooterGame/ShooterGame.uproject" BuildCookRun -nocompileeditor -nop4 -project="C:/Users/Jonathan/Documents/Unreal Projects/ShooterGame/ShooterGame.uproject" -cook -stage -archive -archivedirectory=C:/Users/Jonathan/Desktop/Server -p
ackage -ue4exe=C:\UnrealEngine\Engine\Binaries\Win64\UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -target=ShooterGame -clientconfig=Development -utf8output -compile
UATHelper: Packaging (Windows (64-bit)): Dependencies are out of date. Compiling scripts....
UATHelper: Packaging (Windows (64-bit)): C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,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 m
ay get compilation errors. [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(934,12): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(934,71): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(945,63): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(957,68): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(972,66): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(1079,12): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(1079,71): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(1080,12): error CS0234: The type or namespace name 'ApplicationModel' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): Took 2.0421273s to run MSBuild.exe, ExitCode=1
UATHelper: Packaging (Windows (64-bit)): ERROR: Failed to build "C:/UnrealEngine/Engine/Programs/AutomationTool/Saved\UATTempProj.proj":
UATHelper: Packaging (Windows (64-bit)): C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,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:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(934,12): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(934,71): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(945,63): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(957,68): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(972,66): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(1079,12): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(1079,71): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)): HoloLensPlatform.Automation.cs(1080,12): error CS0234: The type or namespace name 'ApplicationModel' does not exist in the namespace 'Windows' (are you missing an assembly reference?) [C:\UnrealEngine\Engine\Source\Programs\AutomationTool\HoloLens\HoloLens.Automation.csproj]
UATHelper: Packaging (Windows (64-bit)):
UATHelper: Packaging (Windows (64-bit)): (see C:\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
PackagingResults: Error: Failed to build "C:/UnrealEngine/Engine/Programs/AutomationTool/Saved\UATTempProj.proj":
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

I’m a bit confused because I used to be able to run the packaging process fine, so something must have gone wrong on my system somewhere in the meantime. Is there anything that might be causing these issues?

1 Like

In case it helps anyone, it seems the problem was that my Windows 10 SDK installation had broken. I reinstalled the SDK from Windows SDK archive - Windows app development and that fixed things.

8 Likes

Confirm here as well on VS2022
Changed Win sdk from 10.0.19 to 10.0.18 and everything become fine
Also you can do it via Visual Studio Installer

2 Likes

Build started…
1>------ Build started: Project: HoloLens.Automation, Configuration: Development Any CPU ------
1>C:\Documents\ue-4.27-html5-es3\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(17,15,17,25): error CS0234: The type or namespace name ‘Management’ does not exist in the namespace ‘Windows’ (are you missing an assembly reference?)
1>C:\Documents\ue-4.27-html5-es3\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,24,1235,89): error CS0246: The type or namespace name ‘IAsyncOperationWithProgress<,>’ could not be found (are you missing a using directive or an assembly reference?)
1>C:\Documents\ue-4.27-html5-es3\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,52,1235,68): error CS0246: The type or namespace name ‘DeploymentResult’ could not be found (are you missing a using directive or an assembly reference?)
1>C:\Documents\ue-4.27-html5-es3\Engine\Source\Programs\AutomationTool\HoloLens\HoloLensPlatform.Automation.cs(1235,70,1235,88): error CS0246: The type or namespace name ‘DeploymentProgress’ could not be found (are you missing a using directive or an assembly reference?)
2>------ Build started: Project: AutomationTool, Configuration: Development Any CPU ------
2>CSC : error CS0006: Metadata file ‘C:\Documents\ue-4.27-html5-es3\Engine\Binaries\DotNET\AutomationScripts\HoloLens\HoloLens.Automation.dll’ could not be found
========== Build: 0 succeeded, 2 failed, 19 up-to-date, 0 skipped ==========
========== Build started at 9:25 PM and took 04.192 seconds ==========

I swapped the windows sdk in VS2022 and i am still getting the exact same problem on building AutomationTool

I am as well. Did you ever find a fix?

What fixed it for me is, in VIsual Studio, Solution Explorer, right click and Add Reference… on Programs->Automation->HoloLens.Automation->References:
image
and in the Browse section, which was initially an empty list, click on browse:


and locate the Windows.winmd file from the desired Windows SDK.

Note - You will need to change the file type to All Files, and by default installation they are usually located in C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.20348.0 or similar folder.

Hope this helps :slight_smile: