Bug 20710 - Duplicate Resources found
Summary: Duplicate Resources found
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.0
Hardware: PC Windows
: Normal normal
Target Milestone: 15.4
Assignee: Bugzilla
Depends on:
Reported: 2014-06-19 07:49 UTC by Mikkel
Modified: 2017-06-30 09:47 UTC (History)
9 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 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 Mikkel 2014-06-19 07:49:55 UTC
I'm getting this error when compiling my Xamarin.iOS iPad project from VS2010:

>>> Duplicate Resources found at 'Resources\TestB\MyImage@2x~iPad.png' and 'Resources\TestA\MyImage@2x~iPad.png'!

How to reproduce:

1. Create a simple Hello World iPad App in VS2010
2. Add two folders "TestA" and "TestB" to the Resources folder.
3. Add an image named "MyImage@2x~ipad.png" to "TestA" and "TestB".
4. Hit F5 and observe the compile error.

It appears that it only occurs for images named "@2x~ipad.png" - not regular filenames like "MyImage.png".

Looking forward to a quick fix, since this is a huge issue in our project with numerous images named the same in different subfolders (used for themes).
Comment 1 Mikkel 2014-06-19 07:54:28 UTC

It does not happen for files named "MyImage@2x.png" either - only when "~ipad" is in the filename.
Comment 2 Udham Singh 2014-06-19 13:07:16 UTC
I have checked this issue with the steps provided in bug description and getting the same behavior. Please refer the screencast : http://screencast.com/t/VyA0QZMoaSjW

Environment Info :

Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.5.50938 RTMRel

Xamarin (d3cf238e3845e930e312b6ec9b4c6c5437c33067)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android

Xamarin.Android (b5dc5ce91305e19de51d71a1122c109719c4bc34)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS (d3cf238e3845e930e312b6ec9b4c6c5437c33067)
Visual Studio extension to enable development for Xamarin.iOS

Xamarin.iOS Build Host
Comment 3 Vance 2014-07-29 08:54:59 UTC
I am seeing the same thing, however I am not even including the file it is complaining about in the solution.  It is in an Artifacts directory that is simply a subdirectory off the solution file's directory.

I put my common images in this Artifacts directory and then link to these files for Droid and iOS projects.  This compiles fine using Xamarin Studio but not in Visual Studio 2012.

1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(149,3): error : Duplicate Resources found at Resources\LTMobileMainLogo.png and ..\Artifacts\Styles\v1\Images\LTMobileMainLogo.png!
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(149,3): error : Duplicate Resources found at Resources\MainBackground.png and ..\Artifacts\Styles\v1\Images\MainBackground.png!

Microsoft Visual Studio Premium 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Premium

Xamarin (2349ba7b70529ea26ba842e1ec32d054bd6abb3b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2014-07-31 12:54:07 UTC
Just to keep this report up to date, it turned out that the problem from Comment 3 was actually due to a little quirk of the development process on the project. At some point an extra copy of the resources snuck into the project folder. Long story short, no need to worry about the problem from Comment 3 :-)
Comment 5 Juan Marcelo Tondato 2017-06-28 17:24:47 UTC
This is fixed in the latest stable release.
Comment 6 Mikkel 2017-06-30 09:47:45 UTC
Wow - after precisely THREE YEARS - that's kinda' funny :) :) :)