I had had this following error while packaging, similar to the others here (-1) as you mentioned.
UATHelper: Packaging (Windows): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows): Running: G:\unreal launcher\UE_5.6\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\dotnet.exe "G:\unreal launcher\UE_5.6\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" Starfall Win64 Shipping -Project="G:\unreal\game\starfall 5.6\Starfall.uproject" -Manifest="G:\unreal\game\starfall 5.6\Intermediate\Build\Manifest.xml" -remoteini="G:\unreal\game\starfall 5.6" -skipdeploy -distribution -log="C:\Users\gothicserpent\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+unreal+launcher+UE_5.6\UBA-Starfall-Win64-Shipping.txt"
UATHelper: Packaging (Windows): Log file: C:\Users\gothicserpent\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+unreal+launcher+UE_5.6\UBA-Starfall-Win64-Shipping.txt
UATHelper: Packaging (Windows): Using 'git status' to determine working set for adaptive non-unity build (G:\unreal\game\starfall 5.6).
UATHelper: Packaging (Windows): Creating makefile for Starfall (no existing makefile)
UATHelper: Packaging (Windows): Parsing headers for Starfall
UATHelper: Packaging (Windows): Running Internal UnrealHeaderTool "G:\unreal\game\starfall 5.6\Starfall.uproject" "G:\unreal\game\starfall 5.6\Intermediate\Build\Win64\Starfall\Shipping\Starfall.uhtmanifest" -WarningsAsErrors -installed
UATHelper: Packaging (Windows): Total of 0 written
UATHelper: Packaging (Windows): Reflection code generated for Starfall in 2.1330469 seconds
UATHelper: Packaging (Windows): Waiting for 'git status' command to complete
UATHelper: Packaging (Windows): Terminating git child process due to timeout
UATHelper: Packaging (Windows): Writing manifest to G:\unreal\game\starfall 5.6\Intermediate\Build\Manifest.xml
UATHelper: Packaging (Windows): Building Starfall...
UATHelper: Packaging (Windows): Using Visual Studio 2022 14.38.33145 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
UATHelper: Packaging (Windows): Determining max actions to execute in parallel (10 physical cores, 20 logical cores)
UATHelper: Packaging (Windows): Executing up to 10 processes, one per physical core
UATHelper: Packaging (Windows): Using Unreal Build Accelerator local executor to run 10 action(s)
UATHelper: Packaging (Windows): Storage capacity 40Gb
UATHelper: Packaging (Windows): ---- Starting trace: 250721_173332 ----
UATHelper: Packaging (Windows): UbaServer - Listening on 0.0.0.0:1345
UATHelper: Packaging (Windows): ------ Building 10 action(s) started ------
UATHelper: Packaging (Windows): [1/10] Copy tbbmalloc.dll
UATHelper: Packaging (Windows): [2/10] Copy tbb12.dll
UATHelper: Packaging (Windows): [3/10] Copy D3D12Core.dll
UATHelper: Packaging (Windows): [4/10] Copy d3d12SDKLayers.dll
UATHelper: Packaging (Windows): [5/10] Copy DirectML.dll
UATHelper: Packaging (Windows): [6/10] Resource Default.rc2
UATHelper: Packaging (Windows): Resource Default.rc2: Exited with error code -1 . The build will fail.
UATHelper: Packaging (Windows): Resource Default.rc2: WorkingDirectory G:\unreal launcher\UE_5.6\Engine\Source
UATHelper: Packaging (Windows): Resource Default.rc2: C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\rc.exe /nologo /D_WIN64 /l 0x409 /I "." /I "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/INCLUDE" /I "C:/Program Files (x86)/Windows Kits/10/include/10.0.22621.0/ucrt" /I "C:/Program Files (x86)/Windows Kits/10/include/10.0.22621.0/shared" /I "C:/Program Files (x86)/Windows Kits/10/include/10.0.22621.0/um" /I "C:/Program Files (x86)/Windows Kits/10/include/10.0.22621.0/winrt" /DIS_PROGRAM=0 /DUE_GAME=1 /DUSE_SHADER_COMPILER_WORKER_TRACE=0 /DUE_
REFERENCE_COLLECTOR_REQUIRE_OBJECTPTR=1 /DWITH_VERSE_VM=0 /DENABLE_PGO_PROFILE=0 /DUSE_VORBIS_FOR_STREAMING=1 /DUSE_XMA2_FOR_STREAMING=1 /DWITH_DEV_AUTOMATION_TESTS=0 /DWITH_PERF_AUTOMATION_TESTS=0 /DWITH_LOW_LEVEL_TESTS=0 /DEXPLICIT_TESTS_TARGET=0 /DWITH_TESTS=0 /DUNICODE /D_UNICODE /D__UNREAL__ /DIS_MONOLITHIC=1 /DIS_MERGEDMODULES=0 /DWITH_ENGINE=1 /DWITH_UNREAL_DEVELOPER_TOOLS=0 /DWITH_UNREAL_TARGET_DEVELOPER_TOOLS=0 /DWITH_APPLICATION_CORE=1 /DWITH_COREUOBJECT=1 /DUE_TRACE_ENABLED=0 /DUE_TRACE_FORCE_ENABLED=0 /DWITH_VERSE=1 /DUE_USE_VERSE_PATHS=1 /DWITH_VERSE_BPVM=1 /DUSE_STATS_WITHOUT_ENG
INE=0 /DWITH_PLUGIN_SUPPORT=0 /DWITH_ACCESSIBILITY=1 /DWITH_PERFCOUNTERS=0 /DWITH_FIXED_TIME_STEP_SUPPORT=1 /DUSE_LOGGING_IN_SHIPPING=0 /DALLOW_CONSOLE_IN_SHIPPING=0 /DALLOW_PROFILEGPU_IN_TEST=0 /DALLOW_PROFILEGPU_IN_SHIPPING=0 /DWITH_LOGGING_TO_MEMORY=0 /DUSE_CACHE_FREED_OS_ALLOCS=1 /DUSE_CHECKS_IN_SHIPPING=0 /DUSE_UTF8_TCHARS=0 /DUSE_ESTIMATED_UTCNOW=0 /DUE_ALLOW_EXEC_COMMANDS_IN_SHIPPING=1 /DWITH_EDITOR=0 /DWITH_EDITORONLY_DATA=0 /DWITH_CLIENT_CODE=1 /DWITH_SERVER_CODE=1 /DUE_FNAME_OUTLINE_NUMBER=0 /DWITH_PUSH_MODEL=0 /DWITH_CEF3=1 /DWITH_LIVE_CODING=0 /DWITH_CPP_MODULES=0 /DWITH_CPP_COROUT
INES=0 /DWITH_PROCESS_PRIORITY_CONTROL=0 /DUBT_MODULE_MANIFEST="UnrealGame-Win64-Shipping.modules" /DUBT_MODULE_MANIFEST_DEBUGGAME="UnrealGame-Win64-DebugGame.modules" /DUBT_COMPILED_PLATFORM=Win64 /DUBT_COMPILED_TARGET=Game /DUE_APP_NAME="UnrealGame" /DUE_WARNINGS_AS_ERRORS=0 /DUE_ENGINE_DIRECTORY="../../../../../unreal launcher/UE_5.6/Engine/" /DFORCE_ANSI_ALLOCATOR=0 /DUSE_MALLOC_BINNED2=1 /DUSE_MALLOC_BINNED3=0 /DNDIS_MINIPORT_MAJOR_VERSION=0 /DWIN32=1 /D_WIN32_WINNT=0x0601 /DWINVER=0x0601 /DPLATFORM_WINDOWS=1 /DPLATFORM_MICROSOFT=1 /DOVERRIDE_PLATFORM_HEADER_NAME=Windows /DRHI_RAYTRACING=
1 /DWINDOWS_MAX_NUM_TLS_SLOTS=2048 /DWINDOWS_MAX_NUM_THREADS_WITH_TLS_SLOTS=512 /DNDEBUG=1 /DUE_BUILD_SHIPPING=1 /DORIGINAL_FILE_NAME="Starfall-Win64-Shipping.exe" /DBUILT_FROM_CHANGELIST=43139311 /DBRANCH_NAME=++UE5+Release-5.6 /DBUILD_VERSION=++UE5+Release-5.6-CL-43139311 /DBUILD_ICON_FILE_NAME="\"..\\Build\\Windows\\Resources\\Default.ico\"" /DPROJECT_COPYRIGHT_STRING="Fill out your copyright notice in the Description page of Project Settings." /DPROJECT_PRODUCT_IDENTIFIER=Starfall /fo "G:/unreal/game/starfall 5.6/Intermediate/Build/Win64/x64/Starfall/Shipping/Starfall-Win64-Shipping.exe/De
fault.rc2.res" "../Build/Windows/Resources/Default.rc2"
UATHelper: Packaging (Windows): Compile [x64] SharedPCH.Core.Project.ValApi.ValExpApi.Cpp20.cpp: Exited with error code -1 . The build will fail.
UATHelper: Packaging (Windows): Compile [x64] SharedPCH.Core.Project.ValApi.ValExpApi.Cpp20.cpp: WorkingDirectory G:\unreal launcher\UE_5.6\Engine\Source
UATHelper: Packaging (Windows): Compile [x64] SharedPCH.Core.Project.ValApi.ValExpApi.Cpp20.cpp: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\cl.exe @"G:/unreal/game/starfall 5.6/Intermediate/Build/Win64/x64/Starfall/Shipping/Core/SharedPCH.Core.Project.ValApi.ValExpApi.Cpp20.h.obj.rsp"
UATHelper: Packaging (Windows): [7/10] Compile [x64] SharedPCH.Core.Project.ValApi.ValExpApi.Cpp20.cpp
UATHelper: Packaging (Windows): Trace written to file C:/Users/gothicserpent/AppData/Roaming/Unreal Engine/AutomationTool/Logs/G+unreal+launcher+UE_5.6/UBA-Starfall-Win64-Shipping.uba with size 2.4kb
UATHelper: Packaging (Windows): Total time in Unreal Build Accelerator local executor: 4.09 seconds
UATHelper: Packaging (Windows): Result: Failed (OtherCompilationError)
UATHelper: Packaging (Windows): Total execution time: 32.98 seconds
UATHelper: Packaging (Windows): Took 33.46s to run dotnet.exe, ExitCode=6
UATHelper: Packaging (Windows): UnrealBuildTool failed. See log for more details. (C:\Users\gothicserpent\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+unreal+launcher+UE_5.6\UBA-Starfall-Win64-Shipping.txt)
UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 37s
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows): BUILD FAILED
LogStreaming: Display: FlushAsyncLoading(333): 1 QueuedPackages, 0 AsyncPackages
PackagingResults: Error: Unknown Error
After trying your code in BuildConfiguration.xml in my project’s Saved\UnrealBuildTool directory, it all worked!
These are my current results for packaging my projects in 5.6:
UATHelper: Packaging (Windows): Running AutomationTool...
UATHelper: Packaging (Windows): Using bundled DotNet SDK version: 8.0.300 win-x64
UATHelper: Packaging (Windows): Starting AutomationTool...
UATHelper: Packaging (Windows): Parsing command line: -ScriptsForProject="G:/unreal/game/starfall 5.6/Starfall.uproject" Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -EditorIO -EditorIOPort=56217 -project="G:/unreal/game/starfall 5.6/Starfall.uproject" BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project="G:/unreal/game/starfall 5.6/Starfall.uproject" -unrealexe="G:\unreal launcher\UE_5.6\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" -platform=Win64 -installed -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory=G:/packaged
game/starfall -distribution -manifests -clientconfig=Shipping -nodebuginfo -nocompile -nocompileuat
UATHelper: Packaging (Windows): Initializing script modules...
UATHelper: Packaging (Windows): Total script module initialization time: 0.48 s.
UATHelper: Packaging (Windows): Using C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
UATHelper: Packaging (Windows): Executing commands...
UATHelper: Packaging (Windows): Installed Sdk validity:
UATHelper: Packaging (Windows): Win64: (Status=Valid, MinAllowed_Sdk=10.0.19041.0, MaxAllowed_Sdk=10.9.99999.0, Current_Sdk=10.0.22621.0, Allowed_AutoSdk=10.0.22621.0, Current_AutoSdk=, Flags="InstalledSdk_ValidVersionExists, Sdk_HasBestVersion")
UATHelper: Packaging (Windows): Scanning for envvar changes...
UATHelper: Packaging (Windows): ... done!
UATHelper: Packaging (Windows): Cleaning Temp Paths...
UATHelper: Packaging (Windows): BUILD SUCCESSFUL
UATHelper: Packaging (Windows): Setting up ProjectParams for G:\unreal\game\starfall 5.6\Starfall.uproject
UATHelper: Packaging (Windows): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows): Running: G:\unreal launcher\UE_5.6\Engine\Binaries\ThirdParty\DotNet\8.0.300\win-x64\dotnet.exe "G:\unreal launcher\UE_5.6\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" Starfall Win64 Shipping -Project="G:\unreal\game\starfall 5.6\Starfall.uproject" -Manifest="G:\unreal\game\starfall 5.6\Intermediate\Build\Manifest.xml" -remoteini="G:\unreal\game\starfall 5.6" -skipdeploy -distribution -log="C:\Users\gothicserpent\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+unreal+launcher+UE_5.6\UBA-Starfall-Win64-Shipping.txt"
UATHelper: Packaging (Windows): Log file: C:\Users\gothicserpent\AppData\Roaming\Unreal Engine\AutomationTool\Logs\G+unreal+launcher+UE_5.6\UBA-Starfall-Win64-Shipping.txt
UATHelper: Packaging (Windows): Using 'git status' to determine working set for adaptive non-unity build (G:\unreal\game\starfall 5.6).
UATHelper: Packaging (Windows): Creating makefile for Starfall (manifest 'G:\unreal\game\starfall 5.6\Intermediate\Build\Manifest.xml' not found)
UATHelper: Packaging (Windows): Waiting for 'git status' command to complete
UATHelper: Packaging (Windows): Terminating git child process due to timeout
UATHelper: Packaging (Windows): Writing manifest to G:\unreal\game\starfall 5.6\Intermediate\Build\Manifest.xml
UATHelper: Packaging (Windows): Building Starfall...
UATHelper: Packaging (Windows): Using Visual Studio 2022 14.38.33145 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
UATHelper: Packaging (Windows): Determining max actions to execute in parallel (10 physical cores, 20 logical cores)
UATHelper: Packaging (Windows): Executing up to 10 processes, one per physical core
UATHelper: Packaging (Windows): Using Parallel executor to run 5 action(s)
UATHelper: Packaging (Windows): ------ Building 5 action(s) started ------
UATHelper: Packaging (Windows): [1/5] Resource Default.rc2
UATHelper: Packaging (Windows): [2/5] Compile [x64] SharedPCH.Core.Project.ValApi.ValExpApi.Cpp20.cpp
UATHelper: Packaging (Windows): [3/5] Compile [x64] Module.Starfall.cpp
UATHelper: Packaging (Windows): [4/5] Link [x64] Starfall-Win64-Shipping.exe
UATHelper: Packaging (Windows): Creating library G:\unreal\game\starfall 5.6\Binaries\Win64\Starfall-Win64-Shipping.lib and object G:\unreal\game\starfall 5.6\Binaries\Win64\Starfall-Win64-Shipping.exp
UATHelper: Packaging (Windows): [5/5] WriteMetadata Starfall-Win64-Shipping.target
UATHelper: Packaging (Windows): Total time in Parallel executor: 27.57 seconds
UATHelper: Packaging (Windows): Result: Succeeded
UATHelper: Packaging (Windows): Total execution time: 54.44 seconds
UATHelper: Packaging (Windows): Took 54.79s to run dotnet.exe, ExitCode=0
UATHelper: Packaging (Windows): Build command time: 54.82 s
UATHelper: Packaging (Windows): ********** BUILD COMMAND COMPLETED **********
...
UATHelper: Packaging (Windows): ********** STAGE COMMAND COMPLETED **********
UATHelper: Packaging (Windows): ********** PACKAGE COMMAND STARTED **********
UATHelper: Packaging (Windows): Package command time: 0.00 s
UATHelper: Packaging (Windows): ********** PACKAGE COMMAND COMPLETED **********
UATHelper: Packaging (Windows): ********** ARCHIVE COMMAND STARTED **********
UATHelper: Packaging (Windows): Archiving to G:/packagedgame/starfall
UATHelper: Packaging (Windows): Archive command time: 0.30 s
UATHelper: Packaging (Windows): ********** ARCHIVE COMMAND COMPLETED **********
UATHelper: Packaging (Windows): BuildCookRun time: 127.50 s
UATHelper: Packaging (Windows): BUILD SUCCESSFUL
UATHelper: Packaging (Windows): AutomationTool executed for 0h 2m 9s
I hope this helps someone else too. Good call in finding this, @sk.alex.ni !