Bug 34576 - Resource.designer.cs throws "can not find definition for..." exception
Summary: Resource.designer.cs throws "can not find definition for..." exception
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: dean.ellis
Depends on:
Reported: 2015-10-05 20:20 UTC by Ian Geoghegan
Modified: 2015-10-12 15:41 UTC (History)
10 users (show)

See Also:
Tags: BZCU
Is this bug a regression?: ---
Last known good build:

Xamarin Studio logs (60.98 KB, application/zip)
2015-10-07 20:01 UTC, Kent Green [MSFT]

Description Ian Geoghegan 2015-10-05 20:20:29 UTC
Hi. I upgraded to 1.5 and then the 1.5.1 pre-release and the bug exists with both. Multiple definitions exceptions are thrown and project no longer compiles. In addition, updating various packages upon which the package depends (CardView, AppCompat) to comparable pre-release builds does nothing to ameliorate the bug. Nor does deleting bin and obj directories.
Comment 1 Jonathan Pryor 2015-10-06 17:42:41 UTC
Please provide reproduction instructions.
Comment 2 Ian Geoghegan 2015-10-07 11:17:54 UTC
Jonathan, I have created a demo solution with all the packages, assemblies, etc. that I have in my own solution that cause the meltdown. I have confirmed that this demo results in the same bug and have posted the whole thing to my google drive. You can find it here:

Comment 3 Kent Green [MSFT] 2015-10-07 20:01:01 UTC
Created attachment 13234 [details]
Xamarin Studio logs

I was able to reproduce the issue with the sample provided in comment 2. Building the sample throws 78 errors, all seem to be of the form:

> .../Resource.designer.cs(115,115): Error CS0117: `ResourceIssueRepro.Droid.Resource.Animation' does not contain a definition for `fab_in' (CS0117) (ResourceIssueRepro.Droid)

Attaching the logs from my reproduction of the issue.
Comment 6 dean.ellis 2015-10-12 07:55:12 UTC
This looks like a package dependency issue. I downgraded the Xamarin.Forms component from the -pre release (which is what the project was using) to the latest stable ( as well as the Xamarin.Forms.Maps component ( and the project now compiles successfully. 

I think the pre-release version has been built against slightly different versions of Xamarin.Android.Support.Design.. The latest version of that package however does NOT contain resources such as fab_in ... in fact a grep of the entire google package which was downloaded shows that fab_in.xml does not exist (or any other kind of resource called fab_in .. the only reference is design_fab_in.xml. I'm not 100% sure but it looks like google renamed or removed something in the new design stuff (which is not unusual).
Comment 7 Rui Marinho 2015-10-12 09:11:03 UTC
Xamarin.Forms 1.5.1-pre1 depends on Xamarin.Android.Support version 22 , so all support libs should not be upgraded to the latest version (v23) if using Xamarin.Forms 1.5.1-pre1 .

Removing all Xamarin.Android.Support packages and Xamarin.Forms and installing Xamarin Forms 1.5.1-pre1 nuget again should install the correct versions on the Android project.
Comment 8 Ian Geoghegan 2015-10-12 15:41:45 UTC
@Rui Marinho
That didn't work out.

Still trying to massage this configuration; no luck yet but still midstream.

Note You need to log in before you can comment on or make changes to this bug.