Fixed xamarin-bug #8565: System.Runtime.Serialization assembly remapping bug when...
authorPablo Ruiz Garcia <pablo.ruiz@gmail.com>
Tue, 27 Nov 2012 17:53:58 +0000 (18:53 +0100)
committerPablo Ruiz Garcia <pablo.ruiz@gmail.com>
Tue, 27 Nov 2012 17:53:58 +0000 (18:53 +0100)
The problem is related to a fix for issues #8037 & #6528
(e3b9881) which seems to be breaking shadow copy
with programs targeting .net35 and referencing System.Runtime.Serialization.dll

The fix consists on adding a new version_set entry to each supported_runtime
at mono/metadata/domain.c so I we cope with the case of assemblies which must
be remapped to v4.0 on net4/net45, but which should be remapped to v3.0 (instead
of v3.5) when targeting net2 or net3x.

See: https://bugzilla.xamarin.com/show_bug.cgi?id=8565

License: This patch is under the MIT/X11 license.

mono/metadata/assembly.c
mono/metadata/domain-internals.h
mono/metadata/domain.c

index 7f49b4ce50c457981ef6365b0342247629f2a954..78caa2c2a2f4ddf6267d2a329e763c308389dd4a 100644 (file)
@@ -114,7 +114,7 @@ static const AssemblyVersionMap framework_assemblies [] = {
        {"System.Management", 0},
        {"System.Messaging", 0},
        {"System.Runtime.Remoting", 0},
-       {"System.Runtime.Serialization", 2},    
+       {"System.Runtime.Serialization", 3},
        {"System.Runtime.Serialization.Formatters.Soap", 0},
        {"System.Security", 0},
        {"System.ServiceProcess", 0},
index ccf2db538daf8bf485b34ed14a0758ebfe12f869..02c3d5270359348fba84d00fbcbd87a12079e1d7 100644 (file)
@@ -393,7 +393,7 @@ typedef struct  {
 typedef struct  {
        const char runtime_version [12];
        const char framework_version [4];
-       const AssemblyVersionSet version_sets [3];
+       const AssemblyVersionSet version_sets [4];
 } MonoRuntimeInfo;
 
 #define mono_domain_lock(domain) mono_locks_acquire(&(domain)->lock, DomainLock)
index 5a17ff008f076118a0eac5717ff37a19ad391b32..79f67061db8b16a2afd82ea1eb7166eb22b14fe4 100644 (file)
@@ -121,12 +121,12 @@ static MonoAotModuleInfoTable *aot_modules = NULL;
 /* This is the list of runtime versions supported by this JIT.
  */
 static const MonoRuntimeInfo supported_runtimes[] = {
-       {"v2.0.50215","2.0", { {2,0,0,0},    {8,0,0,0}, { 3, 5, 0, 0 } }        },
-       {"v2.0.50727","2.0", { {2,0,0,0},    {8,0,0,0}, { 3, 5, 0, 0 } }        },
-       {"v4.0.30319","4.5", { {4,0,0,0},    {10,0,0,0}, { 4, 0, 0, 0 } }   },
-       {"v4.0.30128","4.0", { {4,0,0,0},    {10,0,0,0}, { 4, 0, 0, 0 } }   },
-       {"v4.0.20506","4.0", { {4,0,0,0},    {10,0,0,0}, { 4, 0, 0, 0 } }   },
-       {"moonlight", "2.1", { {2,0,5,0},    {9,0,0,0}, { 3, 5, 0, 0 } }    },
+       {"v2.0.50215","2.0", { {2,0,0,0}, { 8,0,0,0}, {3,5,0,0}, {3,0,0,0} } },
+       {"v2.0.50727","2.0", { {2,0,0,0}, { 8,0,0,0}, {3,5,0,0}, {3,0,0,0} } },
+       {"v4.0.30319","4.5", { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
+       {"v4.0.30128","4.0", { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
+       {"v4.0.20506","4.0", { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
+       {"moonlight", "2.1", { {2,0,5,0}, { 9,0,0,0}, {3,5,0,0}, {3,0,0,0} } },
 };