Bug 28689 - Xaml: Type argument mandatory for x:Array extension
Summary: Xaml: Type argument mandatory for x:Array extension
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 1.4.2
Hardware: PC Windows
: Normal critical
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-02 11:34 UTC by Daniel Münch
Modified: 2015-06-17 04:08 UTC (History)
7 users (show)

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


Attachments
Example solution with minimal test-case (180.09 KB, application/octet-stream)
2015-04-02 11:34 UTC, Daniel Münch
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:
VERIFIED FIXED

Description Daniel Münch 2015-04-02 11:34:16 UTC
Created attachment 10606 [details]
Example solution with minimal test-case

In my Xaml I'm making heavy use of the x:Array extension for declaring arrays. For example, an array of strings is declared like this:

<x:Array x:Key="stringArray" x:Type="{x:Type x:String}">
        <x:String>Test1</x:String>
        <x:String>Test2</x:String>
</x:Array>
Up until Xamairn.Forms 1.4 this worked flawlessly. After upgrading to 1.4.1 this morning, I get the following exception on startup:
Type argument mandatory for x:Array extension

Anything I've overseen? 

I attached an example solution with minimal test-case and iOS and Android projects. both platforms exhibit this behavior.
Comment 1 Sadik Ali 2015-04-03 02:57:39 UTC
I have checked this issue and able to reproduce this issue with the help of attached sample and getting same behavior as mentioned in bug description.I am using Xamarin.Forms 1.4.2.6353-pre2.

Screencast: http://www.screencast.com/t/O9VhDzPksw
XVS Logs: https://gist.github.com/Arpit360/b5948058f1853a3cedee
Device Logs: https://gist.github.com/Rajneesh360Logica/068162386c59816e4c9d
Application Output: https://gist.github.com/Arpit360/dbfce7c961d375c37df2

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Professional

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.9.536.0 (9c4e670)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.38 (38ac51a9d0866c7726a7484d82632c82c8221594)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.8.1.0 (61fa2c6e0f2ef51eb98b8810de13b4469f379cc7)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 2 Stephane Delcroix 2015-05-22 05:17:42 UTC
the syntax for the x:Array is

<x:Array x:Key="stringArray" Type="{x:Type x:String}">
        <x:String>Test1</x:String>
        <x:String>Test2</x:String>
</x:Array>

See https://msdn.microsoft.com/en-us/library/ms752340(v=vs.110).aspx (the attribute name is "Type", not "x:Type")

That being said, even with the correct syntax, the parser can't properly process <x:Array/> in ResourceDictionaries.

So the bug is still there.
Comment 3 Jason Smith [MSFT] 2015-05-22 13:31:22 UTC
Should be fixed in next release
Comment 4 Parmendra Kumar 2015-06-16 12:51:36 UTC
I have checked this issue with Xamarin.Forms.1.4.3.6364-pre3 and I am still getting exception when run the attached sample project.

Exception:System.InvalidOperationException: Type argument mandatory for x:Array extension

Screencast: http://www.screencast.com/t/8LGLcCo9Oa

Please let me know if I have missed anything to check this issue.

Environment info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.11.590.0 
Xamarin.Android   5.1.3.1 
Xamarin.iOS   8.10.1.0
Comment 5 Stephane Delcroix 2015-06-16 17:47:52 UTC
On 2015-05-22, the Village Idiot said:

> the syntax for the x:Array is
> 
> <x:Array x:Key="stringArray" Type="{x:Type x:String}">
>         <x:String>Test1</x:String>
>         <x:String>Test2</x:String>
> </x:Array>
Comment 6 Parmendra Kumar 2015-06-17 04:08:51 UTC
I have checked this issue as per comment #2 and its working fine at my end.

Hence closing this issue.

Environment info:

Xamarin.Forms 1.4.3.6364-pre3

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.11.590.0 
Xamarin.Android   5.1.3.1 
Xamarin.iOS   8.10.1.0