Bug 13132 - Dictionary.TryGetValue null key error when building iOS archive "Build -> Archive"
Summary: Dictionary.TryGetValue null key error when building iOS archive "Build -> Arc...
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 6.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-07-09 12:51 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2013-07-09 13:29 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-07-09 12:51:20 UTC
Reported on behalf of user whose project built successfully for the AppStore, but produced the following error when building with "Build -> Archive":

An error has occured

System.ArgumentNullException: Argument cannot be null.

Parameter name: key

at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.List`1[Xamarin.Ide.IProjectArchive]].TryGetValue (System.String key, System.Collections.Generic.List`1& value) [0x000ba] in /private/tmp/source/bockbuild/profiles/mono-2-10/build-root/mono-2.10.12/_build/mono-2.10.12.git/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:650

at Xamarin.Ide.ArchiveViewWidget.LoadArchives () [0x00056] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Archival/ArchiveViewWidget.cs:302

at Xamarin.Ide.ArchiveHandler+<Archive>c__AnonStorey19.<>m__3C (System.Object , System.EventArgs ) [0x00082] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Archival/ArchiveCommands.cs:100

at Gtk.Application+InvokeCB.Invoke () [0x00000] in <filename unknown>:0

at GLib.Timeout+TimeoutProxy.Handler () [0x00000] in <filename unknown>:0
Comment 3 Jeffrey Stedfast 2013-07-09 13:29:35 UTC
It looks like the user edited their archives and set the name of one of their archives to an empty string (which ended up removing the "Name" key from the archive's Info.plist).

I've fixed the code to never return null for a Name property that doesn't exist which will fix this exception.