Turnkey returned an error, code 1 when packaging in Unreal Engine
Turnkey is the part of AutomationTool that checks and installs platform SDKs before a build. Code 1 means it could not validate the toolchain for the target platform, so packaging stopped before cooking anything useful.
Paste your log: find the cause in seconds Runs in your browser, nothing is uploaded.
When the Turnkey output shows a C# error
Before checking your SDKs, AutomationTool compiles C# code: the automation scripts of your project, and the module rules of the project. If the full Turnkey output shows a line with error CS followed by four digits, that C# error is the cause and the SDK message is only a consequence: Turnkey never got as far as checking your SDKs.
Two cases we know: error CS0579, assembly attributes declared twice in the automation scripts (Build/Scripts), and error CS0101, the same plugin installed twice. Fix that error first; reinstalling Visual Studio or the Windows SDK will not help.
Common causes
- Visual Studio is missing, or installed without the "Game development with C++" workload and the MSVC toolset required by your engine version.
- Several Windows SDKs are installed and the one picked by UnrealBuildTool is incomplete or unsupported.
- The .NET runtime required by AutomationTool is missing or broken.
How to fix it
- Open the Visual Studio Installer and make sure the "Game development with C++" workload is installed, with the MSVC version listed in the release notes of your engine version.
- Install a Windows 10/11 SDK supported by your engine version (for UE 5.8, Epic recommends 10.0.26100 or newer).
- Scroll up in the log: Turnkey usually prints the SDK or component it could not find just before this line.
- Restart the editor and package again.
Questions
Can it be caught before cooking?
Yes, it can be checked before you start a cook: Check Visual Studio, the C++ workload, the MSVC toolset, the Windows SDK and .NET against the engine requirements.
Related errors
- The SDK for Windows is not installed properly in Unreal Engine
- Platform Win64 is not a valid platform to build in Unreal Engine
- Access to the path is denied when packaging in Unreal Engine
- error CS0101 already contains a definition: duplicate plugin in Unreal Engine
- error CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute in Unreal Engine