Bug 51289 - Error executing task IBTool: An item with the same key has already been added.
Summary: Error executing task IBTool: An item with the same key has already been added.
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.4 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-01-08 14:16 UTC by Mike James
Modified: 2017-02-13 20:04 UTC (History)
3 users (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 Mike James 2017-01-08 14:16:34 UTC
When I try and build a new branch of my app I get the following error: 

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: Error executing task IBTool: An item with the same key has already been added. (BaitNews)

I've turned on Diagnostic logs but it's not helping me find the cause of this issue. Its a problem I've had previously with other apps and it seems to randomly come and go so it'd be useful to find out whats going wrong and get it solved.
Comment 2 Mike James 2017-01-08 15:51:44 UTC
Project in case you want to attempt to reproduce: https://github.com/MikeCodesDotNet/Bait-News/tree/v2
Comment 3 Manuel de la Peña [MSFT] 2017-01-09 15:58:31 UTC

Is this happening just when to try to compile a clean checkout of the project? I have checkout the project and did a clean build without issues. Did create a new branch with

git checkout -b bug-51289

and did a clean/rebuild and everything worked. Did the same but using rebuild, and again everything worked. I noticed that the project is targeting 10.1, have you updated to the latests version in the stable channel?

Could you please provide your build env? The easiest way to get exact version information is to use the  "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details"  button and copy/paste the version informations (you can use the 
"Copy Information" button).

My test environment is as follows:

=== Xamarin Studio Community ===

Version 6.1.3 (build 19)
Installation UUID: 01060673-5bee-4cf4-a4c2-5e36a18d39a2
	Mono 4.6.2 (mono-4.6.0-branch/ac9e222) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406020016

=== NuGet ===


=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: (Xamarin Studio Community)
Hash: 8b53676
Branch: cycle8-xi
Build date: 2016-12-18 12:23:27-0500

=== Xamarin.Android ===

Version: (Xamarin Studio Community)
Android SDK: /Users/mandel/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		6.0   (API level 23)

SDK Tools Version: 25.1.6
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Xamarin Studio Community)

=== Build Information ===

Release ID: 601030019
Git revision: 7fabf9293c2d7b638e28a07f798d21799da1f886
Build date: 2016-12-21 07:08:35-05
Xamarin addins: efbae0e683a0060d2230e91e70c1598abc054845
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.12.2
Darwin MacBook-Pro.local 16.3.0 Darwin Kernel Version 16.3.0
    Thu Nov 17 20:23:58 PST 2016
    root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Addin Maker 1.3.2
StyleCop Support
Comment 4 Timothy Risi 2017-02-13 20:04:53 UTC
We have not received the requested information. If you are still 
experiencing this issue please provide all the requested information 
and re-open the bug report. Thanks!