Bug 34388 - Problem with resource case from references library in the Resource.designer file
Summary: Problem with resource case from references library in the Resource.designer file
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 6.0.0
Hardware: Macintosh Windows
: Normal normal
Target Milestone: 6.0 (C6)
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2015-09-29 07:39 UTC by arx iT
Modified: 2015-10-06 16:03 UTC (History)
8 users (show)

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


Attachments
Android sample of the component does not compile (49 bytes, text/plain)
2015-09-29 07:41 UTC, arx iT
Details
Logs from my repo of the issue (253.91 KB, application/zip)
2015-10-05 16:14 UTC, Kent Green [MSFT]
Details


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:
Status:
RESOLVED FIXED

Description arx iT 2015-09-29 07:39:38 UTC
There is a problem with the auto generated resource.designer.cs file concerning referenced librairies. Was working with the stable release of Xamarin.

Please try with the android sample of the Satellite Menu component : http://components.xamarin.com/view/satellite-menu. It generates the following lines in the file :

=========
public static void UpdateIdValues()
		{
...
global::SatelliteMenu.Resource.Animation.popoutMenuItemAnticipateInterpolator = global::UnineRouting.Droid.Resource.Animation.popoutMenuItemAnticipateInterpolator;
global::SatelliteMenu.Resource.Animation.popoutMenuItemClickAnim = global::UnineRouting.Droid.Resource.Animation.popoutMenuItemClickAnim;
global::SatelliteMenu.Resource.Animation.popoutMenuItemClickInterpolator = global::UnineRouting.Droid.Resource.Animation.popoutMenuItemClickInterpolator;
global::SatelliteMenu.Resource.Animation.popoutMenuItemInRotateInterpolator = global::UnineRouting.Droid.Resource.Animation.popoutMenuItemInRotateInterpolator;
global::SatelliteMenu.Resource.Animation.popoutMenuItemOutRotateInterpolator = global::UnineRouting.Droid.Resource.Animation.popoutMenuItemOutRotateInterpolator;
global::SatelliteMenu.Resource.Animation.popoutMenuItemOvershootInterpolator = global::UnineRouting.Droid.Resource.Animation.popoutMenuItemOvershootInterpolator;
global::SatelliteMenu.Resource.Animation.popoutMenuRotateLeftAnim = global::UnineRouting.Droid.Resource.Animation.popoutMenuRotateLeftAnim;
global::SatelliteMenu.Resource.Animation.popoutMenuRotateRight = global::UnineRouting.Droid.Resource.Animation.popoutMenuRotateRight;
global::SatelliteMenu.Resource.Layout.popoutMenuItem = global::UnineRouting.Droid.Resource.Layout.popoutMenuItem;
...
}

public partial class Animation
		{
			...
			// aapt resource value: 0x7f04000a
			public const int popoutmenuitemanticipateinterpolator = 2130968586;
			
			// aapt resource value: 0x7f04000b
			public const int popoutmenuitemclickanim = 2130968587;
			
			// aapt resource value: 0x7f04000c
			public const int popoutmenuitemclickinterpolator = 2130968588;
			
			// aapt resource value: 0x7f04000d
			public const int popoutmenuiteminrotateinterpolator = 2130968589;
			
			// aapt resource value: 0x7f04000e
			public const int popoutmenuitemoutrotateinterpolator = 2130968590;
			
			// aapt resource value: 0x7f04000f
			public const int popoutmenuitemovershootinterpolator = 2130968591;
			
			// aapt resource value: 0x7f040010
			public const int popoutmenurotateleftanim = 2130968592;
			
			// aapt resource value: 0x7f040011
			public const int popoutmenurotateright = 2130968593;
			
			...
		}
=========

In the Animation class the variable name are in lower case, but in the UpdateIdValues method it's mixed case (e.g. UnineRouting.Droid.Resource.Animation.popoutMenuItemAnticipateInterpolator => popoutmenuitemanticipateinterpolator)

Strangely the obj\Debug\__library_projects__\SatelliteMenu\library_project_imports\__res_name_case_map.txt file contains the following lines :
=========
anim/popoutMenuItemAnticipateInterpolator.xml;anim/popoutmenuitemanticipateinterpolator.xml
anim/popoutMenuItemClickAnim.xml;anim/popoutmenuitemclickanim.xml
anim/popoutMenuItemClickInterpolator.xml;anim/popoutmenuitemclickinterpolator.xml
anim/popoutMenuItemInRotateInterpolator.xml;anim/popoutmenuiteminrotateinterpolator.xml
anim/popoutMenuItemOutRotateInterpolator.xml;anim/popoutmenuitemoutrotateinterpolator.xml
anim/popoutMenuItemOvershootInterpolator.xml;anim/popoutmenuitemovershootinterpolator.xml
anim/popoutMenuRotateLeftAnim.xml;anim/popoutmenurotateleftanim.xml
anim/popoutMenuRotateRight.xml;anim/popoutmenurotateright.xml
values/popoutMenuAttr.xml;values/popoutmenuattr.xml
values/popoutMenuStrings.xml;values/popoutmenustrings.xml
layout/popoutMenuItem.xml;layout/popoutmenuitem.xml
=========

I have lastest alpha (Sept 29th 2015), info :

=== Xamarin Studio ===

Version 5.10 (build 800)
Installation UUID: 983400da-787a-4680-b4b8-b122d2ea6faf
Runtime:
	Microsoft .NET 4.0.30319.34014
	GTK+ 2.24.23 (MS-Windows theme)
	GTK# 2.12.30

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 6.0.0 (Business Edition)
Android SDK: C:\Users\arxit\AppData\Local\Android\android-sdk
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)

SDK Tools Version: 24.3.3
SDK Platform Tools Version: 22.0.0
SDK Build Tools Version: 22.0.0

Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 510000800
Git revision: 92083188182e8c4588153e0d63e99c1a7037e4b6
Build date: 2015-09-18 15:01:03-04
Xamarin addins: 97a862a9dcaa31e9044c8613ef42e0a588c8d012
Build lane: monodevelop-windows-cycle6

=== Operating System ===

Windows 6.3.9600.0 (64-bit)
Comment 1 arx iT 2015-09-29 07:41:12 UTC
Created attachment 13122 [details]
Android sample of the component does not compile

Try with the android sample
Comment 2 arx iT 2015-09-29 07:42:40 UTC
Current workaround, commenting the following lines(1260-1265) in the C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets file :
<!-- Only copy if the file contents changed, so users only get Reload? dialog for real changes -->
	<CopyIfChanged
		SourceFiles="$(ResgenTemporaryDirectory)\$(AndroidResgenFilename)"
		DestinationFiles="$(_AndroidResourceDesignerFile)"
		Condition="'$(_AndroidResourceDesignerFile)' != '' And Exists ('$(ResgenTemporaryDirectory)\$(AndroidResgenFilename)')"
	/>
Comment 3 Kent Green [MSFT] 2015-10-05 16:14:57 UTC
Created attachment 13194 [details]
Logs from my repo of the issue

I was able to reproduce the issue based on the build currently in the Alpha channel; but not on Stable. 

## Steps to reproduce
1. Open the SatelliteMenu android sample from the SatelliteMenu Component.
2. Update the Android API Target Framework, target version & minimum version (I used Android 5.0 Lollipop, API-21 & API-15 respectively.)
3. Build the project

## Results
Based on my tests, if you're on the stable channel the build will complete correctly. On the Alpha channel the build will fail with the errors detailed in the bug description.


## Build information (Stable channel / Does NOT reproduce the issue):
=== Xamarin Studio ===

Version 5.9.7 (build 9)
Installation UUID: 8ef63a7c-1b18-40de-a334-7f78777fcb55
Runtime:
	Mono 4.0.4 ((detached/d481017)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400040004

=== Apple Developer Tools ===

Xcode 7.0.1 (8228)
Build 7A1001

=== Xamarin.iOS ===

Version: 9.0.1.20 (Business Edition)
Hash: d8e9592
Branch: master
Build date: 2015-09-18 23:22:05-0400

=== Xamarin.Android ===

Version: 5.1.6.7 (Business Edition)
Android SDK: /Users/kentgreen/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
Java SDK: /usr
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.2.111 (Business Edition)

=== Build Information ===

Release ID: 509070009
Git revision: 31fa64709030b3edb971237780a452a4c69943c4
Build date: 2015-09-17 11:44:37-04
Xamarin addins: b105d33d8cd72911ff2cf3ee0b7715d37e5f19a6

=== Operating System ===

Mac OS X 10.10.5
Darwin Kents-Macbook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

-------------------------------------------

## Build Information (Alpha channel, *DOES* reproduce the issue)
=== Xamarin Studio ===

Version 5.10 (build 800)
Installation UUID: 8ef63a7c-1b18-40de-a334-7f78777fcb55
Runtime:
	Mono 4.2.1 (explicit/4a18c57)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010056

=== Xamarin.Profiler ===

Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 7.0.1 (8228)
Build 7A1001

=== Xamarin.iOS ===

Version: 9.2.0.67 (Business Edition)
Hash: f85a845
Branch: master
Build date: 2015-09-23 10:34:01-0400

=== Xamarin.Android ===

Version: 6.0.0.2 (Business Edition)
Android SDK: /Users/kentgreen/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

=== Xamarin Android Player ===

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

=== Xamarin.Mac ===

Version: 2.4.0.62 (Business Edition)

=== Build Information ===

Release ID: 510000800
Git revision: 92083188182e8c4588153e0d63e99c1a7037e4b6
Build date: 2015-09-18 15:03:06-04
Xamarin addins: 97a862a9dcaa31e9044c8613ef42e0a588c8d012
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.10.5
Darwin Kents-Macbook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2015-10-05 17:05:57 UTC
I suspect the fix for this might already be included in the Alpha release branch. If that is true, then this bug will be resolved in the next Alpha build.

In particular, I suspect this bug might have been fixed by the same change (reverting some new experimental logic related to resources) that was applied to resolve non-public Bug 33465.
Comment 6 Peter Collins 2015-10-06 16:03:31 UTC
I believe @Brendan's suspicions are correct, and I am no longer able to reproduce this failure on the latest Alpha release published yesterday (XA 6.0.0.8).