Bug 29287 - Attempt to get attributes for class derived from Xamarin Forms ContentPage throws in 1.4.2
Summary: Attempt to get attributes for class derived from Xamarin Forms ContentPage th...
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Chris King
Depends on:
Reported: 2015-04-21 21:07 UTC by George Josh Karabin
Modified: 2015-07-16 08:23 UTC (History)
4 users (show)

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

Passing test case (forms 1.3.1, but similar code worked for us in 1.4.1) (170.30 KB, application/zip)
2015-04-21 21:07 UTC, George Josh Karabin
Failing test case (updated packages references to forms 1.4.2) (170.46 KB, application/zip)
2015-04-21 21:08 UTC, George Josh Karabin

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 George Josh Karabin 2015-04-21 21:07:13 UTC
Created attachment 10853 [details]
Passing test case (forms 1.3.1, but similar code worked for us in 1.4.1)

My team has been using a little reflection to find the custom attributes associated with a type.  This has worked well on all platforms (iOS, Android, and WP8 silverlight) through Xamarin Forms 1.4.1.  This breaks, only on iOS, using Xamarin Forms 1.4.2.
Comment 1 George Josh Karabin 2015-04-21 21:08:06 UTC
Created attachment 10854 [details]
Failing test case (updated packages references to forms 1.4.2)
Comment 2 George Josh Karabin 2015-04-22 09:33:49 UTC
Tested with 1.4.3-pre1 - problem's still there.
Comment 3 George Josh Karabin 2015-04-22 10:00:21 UTC
Oh, and to clarify, the problem occurs only on attributes assigned to classes that are derived from Xamarin Forms classes, for instance, ContentPage.  We see the problem in our app using XAML-specified subclasses, but for simplicity, my examples just show classes specified wholly in C#.
Comment 4 Dominic N [MSFT] 2015-04-24 13:10:19 UTC
I have been able to replicate the issue on my end by doing the following:

1. Download "Passing Test Case"
2. Clean and then build for iOS
3. Remove XF packages
4. Add XF 1.4.3-pre1 packages
5. Clean and then build for iOS

Marking as confirmed.
Comment 5 Chris King 2015-05-22 16:05:57 UTC
System.TypeLoadException: Could not load type Xamarin.Forms.Platform._PageRenderer, Xamarin.Forms.Platform, Version=, Culture=neutral, PublicKeyToken=null while decoding custom attribute

App is not loading Xamarin.Forms.Platform.

var assemblyName = new AssemblyName("Xamarin.Forms.Platform, Version=, Culture=neutral, PublicKeyToken=null");
Comment 6 George Josh Karabin 2015-05-22 16:26:25 UTC
I built the test app using the new application wizard.  There shouldn't be anything odd in the solution or project level stuff.  I just added the nuget and off I went.  Is there a manual step to force Xamarin.Forms.Platform to load that I need to do?  Or are you just noting that it's a problem on the Xamarin end?
Comment 7 Stephane Delcroix 2015-06-22 04:43:37 UTC
This will be fixed in 1.4.4
Comment 8 Parmendra Kumar 2015-07-16 08:23:35 UTC
I have checked this issue with provided steps in comment#4 and I am not getting any Exception on X.F 1.4.4-pre1, Its working fine on both iOS and Android.

Hence closing this issue.