Can't build the project with Unreal 5.6, receive error "Resource Default.rc2: Exited with error code -1 . The build will fail."

Hello,

I switched from Unreal 5.5.4 to Unreal 5.6 and when I tried to build my solution I received a lot of errors like this:

3>------ Building 243 action(s) started ------
3> Compile [x64] SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp: Exited with error code -1 . The build will fail.
3> Compile [x64] SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp: WorkingDirectory D:\Programs\Epic Games\UE_5.6\Engine\Source
3> Compile [x64] SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe @“D:/Projects/Projects/Ideas/GameAdventureUnreal/Intermediate/Build/Win64/x64/GameEditor/Development/UnrealEd/SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.h.obj.rsp”

3>[1/243] Compile [x64] SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp
3> Compile [x64] SharedPCH.UnrealEd.Project.NonOptimized.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp: Exited with error code -1 . The build will fail.
3> Compile [x64] SharedPCH.UnrealEd.Project.NonOptimized.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp: WorkingDirectory D:\Programs\Epic Games\UE_5.6\Engine\Source
3> Compile [x64] SharedPCH.UnrealEd.Project.NonOptimized.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe @“D:/Projects/Projects/Ideas/GameAdventureUnreal/Intermediate/Build/Win64/x64/GameEditor/Development/UnrealEd/SharedPCH.UnrealEd.Project.NonOptimized.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.h.obj.rsp”

3>[2/243] Compile [x64] SharedPCH.UnrealEd.Project.NonOptimized.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp

3>[3/243] GenerateTLH dte80a.tlh
3> GenerateTLH dte80a.tlh: Exited with error code -1 . The build will fail.
3> GenerateTLH dte80a.tlh: WorkingDirectory D:\Programs\Epic Games\UE_5.6\Engine\Source
3> GenerateTLH dte80a.tlh: C:\WINDOWS\system32\cmd.exe /C “D:\Programs\Epic Games\UE_5.6\Engine\Intermediate\Build\Win64\x64\UnrealEditor\Development\VisualStudioDTE\dte80a.bat”

3>[4/243] Resource Default.rc2
3> Resource Default.rc2: Exited with error code -1 . The build will fail.
3> Resource Default.rc2: WorkingDirectory D:\Programs\Epic Games\UE_5.6\Engine\Source
3> 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.44.35207/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_EDITOR=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=1 /DWITH_PERF_AUTOMATION_TESTS=1 /DWITH_LOW_LEVEL_TESTS=0 /DEXPLICIT_TESTS_TARGET=0 /DWITH_TESTS=1 /DUNICODE /D_UNICODE /D__UNREAL__ /DIS_MONOLITHIC=0 /DIS_MERGEDMODULES=0 /DWITH_ENGINE=1 /DWITH_UNREAL_DEVELOPER_TOOLS=1 /DWITH_UNREAL_TARGET_DEVELOPER_TOOLS=1 /DWITH_APPLICATION_CORE=1 /DWITH_COREUOBJECT=1 /DUE_TRACE_ENABLED=1 /DUE_TRACE_FORCE_ENABLED=0 /DWITH_VERSE=1 /DUE_USE_VERSE_PATHS=1 /DWITH_VERSE_BPVM=1 /DUSE_STATS_WITHOUT_ENGINE=0 /DWITH_PLUGIN_SUPPORT=0 /DWITH_ACCESSIBILITY=1 /DWITH_PERFCOUNTERS=1 /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=1 /DWITH_IOSTORE_IN_EDITOR=1 /DWITH_CLIENT_CODE=1 /DWITH_SERVER_CODE=1 /DUE_FNAME_OUTLINE_NUMBER=0 /DWITH_PUSH_MODEL=1 /DWITH_CEF3=1 /DWITH_LIVE_CODING=1 /DWITH_CPP_MODULES=0 /DWITH_CPP_COROUTINES=0 /DWITH_PROCESS_PRIORITY_CONTROL=0 /DUBT_MODULE_MANIFEST=“UnrealEditor.modules” /DUBT_MODULE_MANIFEST_DEBUGGAME=“UnrealEditor-Win64-DebugGame.modules” /DUBT_COMPILED_PLATFORM=Win64 /DUBT_COMPILED_TARGET=Editor /DUE_APP_NAME=“UnrealEditor” /DUE_WARNINGS_AS_ERRORS=0 /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_DEVELOPMENT=1 /DORIGINAL_FILE_NAME=“UnrealEditor-GameCore.dll” /DBUILD_ICON_FILE_NAME=“"..\Build\Windows\Resources\Default.ico"” /DPROJECT_COPYRIGHT_STRING=“Copyright GameAdventure. All Rights Reserved.” /DPROJECT_PRODUCT_NAME=GameAdventure /DPROJECT_PRODUCT_IDENTIFIER=GameAdventure /fo “D:/Projects/Projects/Ideas/GameAdventureUnreal/Intermediate/Build/Win64/x64/UnrealEditor/Development/GameCore/Default.rc2.res” “../Build/Windows/Resources/Default.rc2”

… a lot of errors with “Resource Default.rc2” …

3>Result: Failed (OtherCompilationError)
3>Total execution time: 47.22 seconds
3>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ““D:\Programs\Epic Games\UE_5.6\Engine\Build\BatchFiles\Build.bat” GameEditor Win64 Development -Project=“D:\Projects\Projects\Ideas\GameAdventureUnreal\GameAdventure.uproject” -WaitMutex -FromMsBuild -architecture=x64” exited with code 6.
3>Done building project “GameAdventure.vcxproj” – FAILED.
========== Build: 5 succeeded, 1 failed, 46 up-to-date, 1 skipped ==========

I cleaned up all the Binaries, Intermediate, Saved folders and rebuild solution.
I followed this but it didn’t helped: Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.6 Documentation | Epic Developer Community

What I can do?
Thank you!

i have a same problem . did u solve this problem ? if you have already solved, please share us

Nop, I reverted back to unreal 5.5. I’m still waiting for a solution.

Also I found a similar post UE 5.6 Compile error - Resource Default.rc2: Exited with error code -1 - #3 by chrissun14

I was having the same error (-1 return) and I was able to workaround by disabling Unreal Build Accelerator (Note that I had the same symptoms- 5.5 was and is still fine, 5.6 source only has this problem) Trying to dig more into the problem (it may just be my local machine as some colleagues are not having the problem) but curious if this helps you as it sounds like multiple people are having this issue.

The way I did this was modify (PROJECT_DIRECTORY)/Saved/UnrealBuildTool/BuildConfiguration.xml to the following:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	<BuildConfiguration>
		<bAllowUBAExecutor>false</bAllowUBAExecutor>
	</BuildConfiguration>
</Configuration>
1 Like