Bug 26319 - Xaml Add Method - Sequence Contains No Elements
Summary: Xaml Add Method - Sequence Contains No Elements
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-22 23:05 UTC by Nick Daniels
Modified: 2016-04-08 19:04 UTC (History)
5 users (show)

Tags:
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 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 NORESPONSE

Description Nick Daniels 2015-01-22 23:05:28 UTC
Bear in mind that this is what dotpeek has come up with from the Xamarin.Forms.Xaml assembly, but in the ApplyValueVisitor class, in void Visit(ElementNode node, INode parentNode):

Func<MethodInfo, bool> predicate = (Func<MethodInfo, bool>) (mi =>
        {
          if (mi.Name == "Add")
            return mi.GetParameters().Length == 1;
          return false;
        });
        MethodInfo methodInfo;
        if ((methodInfo = Enumerable.First<MethodInfo>(runtimeMethods, predicate)) == null)
          throw new XamlParseException(string.Format("Value of {0} does not have a Add() method", (object) localname), (IXmlLineInfo) node);
        methodInfo.Invoke((object) enumerable, new object[1]
        {
          this.Values[(INode) node]
        });

That call to First should be to FirstOrDefault so the intended, and more useful, XamlParserException will be thrown.
Comment 1 Ram Chandra 2015-02-20 01:07:03 UTC
We have checked this issue and unable to reproduce this issue.

Could you please provide us sample project ,build info ,Xamarin.Forms version ,Ide logs .So that we can able to reproduce this issue at our end.

Screencast: http://www.screencast.com/t/5GNGyKc6ePyS

You can copy log from Help->Open Log Directory-> Latest Ide logs.

Environment Info:
Xamarin.Forms version : 1.3.4.6325-pre1
=== Xamarin Studio ===

Version 5.7.2 (build 2)
Installation UUID: 3d25a767-a003-4a7d-9f5e-e57987cf6cf0
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Apple Developer Tools ===

Xcode 6.1 (6602)
Build 6A1052c

=== Xamarin.iOS ===

Version: 8.6.2.22 (Business Edition)
Hash: 862702c
Branch: 
Build date: 2015-02-18 15:19:23-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/mac360_xamarin/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 507020002
Git revision: d6231e6325f274cea59da478410f561312c5b401
Build date: 2015-02-17 19:04:38-05
Xamarin addins: b212fd66838b0d6e2435966e541e66ab9c988698

=== Operating System ===

Mac OS X 10.10.0
Darwin mac360-xamarins-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 2 Rui Marinho 2016-04-08 19:04:00 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team