Packaging Error, any ideas?

Howdy all,

I was just trying to package up my project for windows 64 and I got the following error. Anyone happen to know what it means? Any help is greatly greatly appreciated.

UATHelper: Packaging (Windows (64-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (64-bit)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=I:/KillerBunniesFromMars/unrealProjects/protoTypeB/protoTypeB.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=I:/KillerBunniesFromMars/unrealProjects/protoTypeB/protoTypeB.uproject -cook -stage -archive -archivedirectory=
I:/KillerBunniesFromMars/PackagedProjects -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
UATHelper: Packaging (Windows (64-bit)): Automation.Process: Setting up command environment.
UATHelper: Packaging (Windows (64-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for I:\KillerBunniesFromMars\unrealProjects\protoTypeB\protoTypeB.uproject
UATHelper: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: System.ArgumentException: An item with the same key has already been added.
UATHelper: Packaging (Windows (64-bit)):    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
UATHelper: Packaging (Windows (64-bit)):    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
UATHelper: Packaging (Windows (64-bit)):    at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.ProjectUtils.CompileAndLoadTargetsAssembly(ProjectProperties Properties, FileReference TargetsDllFilename, Boolean DoNotCompile, List`1 TargetScripts)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List`1 ExtraSearchPaths)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.ProjectUtils.DetectProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, Boolean AssetNativizationRequested)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.ProjectUtils.GetProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, Boolean AssetNativizationRequested)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.ProjectParams..ctor(FileReference RawProjectPath, CommandUtils Command, String Device, String MapToRun, String AdditionalServerMapParams, ParamList`1 Port, String RunCommandline, String StageCommandline, String BundleName, String StageDirectoryParam, String UE4Exe, String SignPak, List`1 ClientCon
figsToBuild, List`1 ServerConfigsToBuild, ParamList`1 MapsToCook, ParamList`1 DirectoriesToCook, String InternationalizationPreset, ParamList`1 CulturesToCook, ParamList`1 ClientCookedTargets, ParamList`1 EditorTargets, ParamList`1 ServerCookedTargets, List`1 ClientTargetPlatforms, Dictionary`2 ClientDependentPlatformMap, List`1 ServerTargetPlatforms, Dictio
nary`2 ServerDependentPlatformMap, Nullable`1 Build, Nullable`1 Cook, Nullable`1 Run, Nullable`1 SkipServer, Nullable`1 Clean, Nullable`1 Compressed, Nullable`1 UseDebugParamForEditorExe, Nullable`1 IterativeCooking, Nullable`1 CookAll, Nullable`1 CookPartialGC, Nullable`1 CookMapsOnly, Nullable`1 CookOnTheFly, Nullable`1 CookOnTheFlyStreaming, Nullable`1 Un
versionedCookedContent, Nullable`1 EncryptIniFiles, Nullable`1 SkipCookingEditorContent, Nullable`1 NumCookersToSpawn, String AdditionalCookerOptions, String BasedOnReleaseVersion, String CreateReleaseVersion, String CreateReleaseVersionBasePath, String BasedOnReleaseVersionBasePath, Nullable`1 GeneratePatch, String DLCName, String DiffCookedContentPath, Nul
lable`1 DLCIncludeEngineContent, Nullable`1 NewCook, Nullable`1 OldCook, Nullable`1 CrashReporter, Nullable`1 DedicatedServer, Nullable`1 Client, Nullable`1 Deploy, Nullable`1 FileServer, Nullable`1 Foreign, Nullable`1 ForeignCode, Nullable`1 LogWindow, Nullable`1 NoCleanStage, Nullable`1 NoClient, Nullable`1 NoDebugInfo, Nullable`1 NoXGE, Nullable`1 Package
, Nullable`1 Pak, Nullable`1 Prereqs, String AppLocalDirectory, Nullable`1 NoBootstrapExe, Nullable`1 SignedPak, Nullable`1 NullRHI, Nullable`1 FakeClient, Nullable`1 EditorTest, Nullable`1 RunAutomationTests, String RunAutomationTest, Nullable`1 CrashIndex, Nullable`1 SkipCook, Nullable`1 SkipCookOnTheFly, Nullable`1 SkipPak, Nullable`1 SkipStage, Nullable`
1 Stage, Nullable`1 Manifests, Nullable`1 CreateChunkInstall, Nullable`1 Unattended, Nullable`1 NumClients, Nullable`1 Archive, String ArchiveDirectoryParam, Nullable`1 ArchiveMetaData, Nullable`1 CreateAppBundle, ParamList`1 ProgramTargets, Nullable`1 Distribution, Nullable`1 Prebuilt, Nullable`1 RunTimeoutSeconds, String SpecifiedArchitecture, Nullable`1 I
terativeDeploy, Nullable`1 FastCook, Nullable`1 IgnoreCookErrors, Nullable`1 RunAssetNativization, Nullable`1 CodeSign, Nullable`1 TreatNonShippingBinariesAsDebugFiles, String Provision, String Certificate, ParamList`1 InMapsToRebuildLightMaps, ParamList`1 TitleID)
UATHelper: Packaging (Windows (64-bit)):    at BuildCookRun.SetupParams()
UATHelper: Packaging (Windows (64-bit)):    at BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Windows (64-bit)):    at AutomationTool.Program.Main()
UATHelper: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Hi lennysunreal,

The automation tool error from your logs is:

Program.Main: ERROR: AutomationTool terminated with exception: System.ArgumentException: An item with the same key has already been added.

This could be caused by a number of factors, here are a couple of AnwserHub posts with resolutions:

Unable to Package C++ Project for Win32/Win64

Program.Main: ERROR: An item with the same key has already been added

Let me know if neither of these apply to your issue. If not please add more information about your project:

  • Are you using the Binary (from Launcher) version of the Editor or working from Source (Github)
  • Is this a C++ project or Blueprints only
  • etc. (Any additional information you would consider relevant)

.

Thank you so very much :slight_smile: . I shall dig into this tonight.

Annnd sorry for the long delay on the reply. I worked on a bunch of other things before I got back to this. Anywhoozle. The first link you provided did the trick!

At one point my project was called ProtoTypeA. Becuase of that these files existed

Intermediate/protoTypeA.Target.cs

Binaries/protoTypeA.target

Then I changed my projects name to ProtoTypeB when I made a duplicate of it at one point. The I continued on working with ProtoTypeB. Becuase of that this files existed

Intermediate/protoTypeB.Target.cs

So! In order to get things to work again I deleted the first two ProtoTypeA files I listed above annnnnd Huuzzaaah :smiley:

Coompiled and working.

Thank you so very much :slight_smile:

Side note: If there was an error message that said. “Hey dummy! You got a duplicate file here that is causing errors, you should go delete it”

It would be awesome sauces :slight_smile: