This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.

Bug 40458

Summary: [regression] JsonSerializationExceptionA member with the name '' already exists on 'System.Version'
Product: iOS Reporter: Cody <cody.beyer>
Component: GeneralAssignee: Sebastien Pouliot <sebastien>
Status: VERIFIED FIXED    
Severity: normal CC: chorsfield, mono-bugs+monotouch, sebastien, sunilk
Priority: Normal    
Version: XI 9.8 (tvOS / C7)   
Target Milestone: (C7)   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Sample

Description Cody 2016-04-16 02:22:03 UTC
Created attachment 15738 [details]
Sample

# Description

The following sample app demonstrates an issue where an exception is thrown when attempting to serialize a string. 

This only appears to occur when Link SDK Assemblies is enabled

# Exception

https://gist.github.com/CodyBeyer/8bb9f665c245a7cf3f0ac0346d40cc2b

# Sample

Attached

# Steps to Reproduce

1. Download sample
2. Deploy to iOS
3. Run test ‘JsonVersionBug’

# Expected Results

Test should pass

# Actual Results

Exception is thrown

# Versions

=== Xamarin Studio Business ===

Version 6.0 (build 4968)
Installation UUID: 882f6404-87ab-4833-9233-461dacb82d1e
Runtime:
	Mono 4.4.0 (mono-4.4.0-branch/a3fabf1) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000122

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.3 (10183.3)
Build 7D175

=== Xamarin.iOS ===

Version: 9.8.0.244 (Xamarin Business)
Hash: 977921b
Branch: cycle7
Build date: 2016-04-07 14:20:17-0400

=== Xamarin.Android ===

Version: 6.1.0.37 (Xamarin Business)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.2   (API level 17)
		4.4   (API level 19)
		6.0   (API level 23)

SDK Tools Version: 25.1.1
SDK Platform Tools Version: 23.1.0
SDK Build Tools Version: 23.0.3

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)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: 2.8.0.244 (Xamarin Business)

=== Xamarin Inspector ===

Version: 0.7.1.0
Hash: 545e74c
Branch: master
Build date: Fri Apr  8 17:34:53 UTC 2016

=== Build Information ===

Release ID: 600004968
Git revision: ab7092ce63351276394f283e4f9c8646baf51fce
Build date: 2016-04-08 09:30:34-04
Xamarin addins: be0a0aef6ec8b075b4ba4690bd147d1e33c2abd7
Build lane: monodevelop-lion-cycle7

=== Operating System ===

Mac OS X 10.11.4
Darwin clb-mbp.local 15.4.0 Darwin Kernel Version 15.4.0
	Fri Feb 26 22:08:05 PST 2016
	root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector 0.7.1.0
Comment 1 Sebastien Pouliot 2016-04-19 02:30:21 UTC
A new optimization (c7), to reduce executable size, is interfering with the reflection usage of the json assembly.

This will be turned off automagically when we detect the pattern (reflecting parameter names) so it will behave identically to earlier releases (in this case) but still save size if the feature is not used.
Comment 2 Sebastien Pouliot 2016-04-19 16:02:51 UTC
Fixed in maccore/master e17d05376da9d8bd80f9490d58779adaf206d5cc
and maccore/cycle7 4e485e743b7518f23c5380da57eb213ad5540648
Comment 3 Sunil Kumar 2016-05-13 18:18:19 UTC
I have checked this issue with latest C7 builds and observed that now this issue works fine. Now I am successfully able to run attached sample without any exception as shown in screencast: http://www.screencast.com/t/LYlmhwIU

Environment info:
=== Xamarin Studio Enterprise ===

Version 6.0 (build 5154)
Installation UUID: 561c7a69-0a91-4bae-ad7c-f0c79d594337
Runtime:
	Mono 4.4.0 (mono-4.4.0-branch/63a214c) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000154

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.8.0.317 (Xamarin Enterprise)
Hash: 0611769
Branch: cycle7
Build date: 2016-05-12 16:43:37-0400

=== Xamarin.Android ===

Version: 6.1.0.55 (Xamarin Enterprise)
Android SDK: /Users/tajinder/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 25.1.3
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.8.0.317 (Xamarin Enterprise)

=== Build Information ===

Release ID: 600005154
Git revision: b156a1306159e21f90cca9b1363c87851d7bedf5
Build date: 2016-05-13 09:01:05-04
Xamarin addins: bfc46cb52cf55ad4ad9df4ba062487ba6566fb58
Build lane: monodevelop-lion-cycle7

=== Operating System ===

Mac OS X 10.10.5
Darwin Tajinders-iMac.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Addin Maker 1.3.1
DNX 0.2
NuGet Package Management Extensions 0.10.1
Test Template Parameters 0.4
JSON Copy 1.1
Manifest.addin 0.0.0.0