Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 5196 [details]
Reported on behalf of a user.
Related to bug #2205. Also similar to bug #3811, but the test case for #3811 appears to be working correctly as of Mono 3.2.3.
1. Build and run the attached test project using Mono. This will produce the following error:
"Type not found; name: string, namespace:"
The problem seems to be the use of String.Empty in the call to `XmlFormatterDeserializer.GetTypeFromNamePair (name, String.Empty)` . Breaking on this call and invoking `GetTypeFromNamePair (name, "http://schemas.microsoft.com/2003/10/Serialization/")` in the Immediate window yields a nice looking result, at least in the cases `name = "int"` and `name = "string"`.
>  https://github.com/mono/mono/blob/master/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/XmlFormatterDeserializer.cs#L264
2. Due to this problem, DataContractSerializer fails when deserializing DataMembers that use an array KnownType.
3. The project builds and runs without error on .NET.
4. Note that the project includes two different XML files for the serialized object. The Mono version is currently incorrect due to bug #2205.
## Version information
Pull request that works around the problem for the test case, and that might be acceptable as a complete fix.
Applied the patch.
Added a unit test based on your sample as well