Bug 1498 - [PATCH] Creating a XmlSerializer from type which contains abstract IEnumerable<> throws InvalidOperationException on mono
Summary: [PATCH] Creating a XmlSerializer from type which contains abstract IEnumerabl...
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.XML ()
Version: master
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
Depends on:
Reported: 2011-10-14 10:36 UTC by Tom Hindle
Modified: 2014-08-29 07:28 UTC (History)
2 users (show)

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

Test case showing issue (553 bytes, text/plain)
2011-10-14 10:36 UTC, Tom Hindle
patch that allows abstract IEnumerables not to have Add method. (644 bytes, patch)
2011-10-14 12:29 UTC, Tom Hindle

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 GitHub or Developer Community 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 Tom Hindle 2011-10-14 10:36:12 UTC
Created attachment 695 [details]
Test case showing issue

The following throws InvalidOperationException on mono, and doesn't throw on .NET

public abstract class Test1
	public abstract IEnumerable<string> Test { get; }	

new XmlSerializer(typeof(Test1));
Comment 1 Tom Hindle 2011-10-14 12:29:56 UTC
Created attachment 696 [details]
patch that allows abstract IEnumerables not to have Add method.
Comment 2 marcos.henrich 2014-08-29 07:28:26 UTC
Hi Tom,

Thank you for the detailed bug report.

This issue is fixed in Mono 3.6.