error CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute in Unreal Engine

Before running any command, Turnkey included, AutomationTool compiles the C# automation project of your game, Build/Scripts/<Project>.Automation.csproj. The C# compiler found each assembly attribute twice (AssemblyCompanyAttribute, AssemblyVersionAttribute...), so that build failed and Turnkey never checked your SDKs.

  • Blocking: the package fails
  • Build stage: UnrealBuildTool, ExitCode=8
  • From user reports, not yet reproduced in our lab

Paste your log: find the cause in seconds Runs in your browser, nothing is uploaded.

Why Turnkey says it failed

Before running a command, AutomationTool compiles the automation scripts of your project: the C# project in Build/Scripts whose name ends in .Automation.csproj, where Epic documents automation projects for a project outside the engine folder. Turnkey checks your SDKs (the VerifySdk command) only once that build succeeds.

When it fails, the editor reports "Turnkey failed to run properly" or "SDK not installed properly". That is only a consequence: your SDK was never checked, and reinstalling the SDK or Visual Studio will not fix it.

The first error is the cause

Each CS0579 line names one attribute (AssemblyCompanyAttribute, AssemblyVersionAttribute...), usually seven in a row, printed twice, then Build FAILED and AutomationTool exiting with ExitCode=1 (Error_Unknown). The path at the start of the line is the AssemblyInfo.cs generated under Build/Scripts/obj; the path in brackets is the automation project that failed.

As with a duplicate plugin and error CS0101, the C# error is the cause and the lines after it are consequences.

How sure we are

We built this page from one real log posted by a user and from the .NET issues where the same error comes from stale obj and bin folders or a duplicate AssemblyInfo.cs. The fix has not been confirmed by that user yet, and our lab has not reproduced the error.

Common causes

  • Stale obj or bin folders in Build/Scripts: the project was copied or downloaded with its build output, built with another .NET version (UE 5.8 bundles the .NET 10 SDK, hence obj/Development/net10.0 in the path), or the folders were created by another tool such as the VS Code C# extension.
  • A hand-written AssemblyInfo.cs (for example Build/Scripts/Properties/AssemblyInfo.cs) declares the same attributes as the file generated by the .NET SDK.
  • A second copy of the .csproj, or another project with its own obj and bin folders, in a subfolder of Build/Scripts.

How to fix it

  1. Close the Unreal Editor, and Visual Studio or VS Code if they have the project open.
  2. Delete the obj and bin folders in Build/Scripts, and the Intermediate folder of the project.
  3. Package again: AutomationTool rebuilds the automation project from scratch.
  4. If CS0579 comes back, look in Build/Scripts (Properties/ included) for a hand-written AssemblyInfo.cs and remove its [assembly: ...] attributes, or the file itself.
  5. Check that Build/Scripts and its subfolders contain only one <Project>.Automation.csproj, and no copied folder with its own .csproj, obj or bin.

Questions

Do I need to reinstall the Windows SDK or Visual Studio?

No. Turnkey stopped before checking them. Fix CS0579 first; if Turnkey still fails after that, the SDK check is real: see Turnkey returned an error, code 1.

Is it safe to delete Build/Scripts/obj and bin?

Yes. They only hold build output, and AutomationTool recreates them the next time it compiles the scripts. Keep the .cs and .csproj files.

Can it be caught before cooking?

Yes, it can be checked before you start a cook: Look in Build/Scripts for obj and bin folders, a hand-written AssemblyInfo.cs, or more than one .csproj.

Reports and sources

Decode your log

Paste your packaging log, or drop Log.txt with Cook-*.txt / UBA-*.txt. The analysis runs in your browser: the log is never uploaded.

Get notified when the in-editor plugin launches

The same decoder inside the Unreal Editor, with checks that catch these errors before you cook.