-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
The issue has already been reported and fixed for Xamarin and .NET. I'm working on a Blazor SPA app and get the following exception when I try to serialize an object.
Is there a possibilty to workaround that issue?
System.MissingMethodException: Constructor on type 'System.ComponentModel.ReferenceConverter' not found.
at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) <0x22dc130 + 0x00330> in :0
at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) <0x22dbac0 + 0x000c6> in :0
at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture) <0x2b63b28 + 0x0002a> in :0
at System.SecurityUtils.SecureCreateInstance (System.Type type, System.Object[] args, System.Boolean allowNonPublic) <0x2b63a50 + 0x0008e> in :0
at System.SecurityUtils.SecureCreateInstance (System.Type type) <0x2b63980 + 0x0000c> in :0
at System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance (System.Type objectType, System.Type callingType) <0x2b60828 + 0x0003c> in :0
at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable (System.Collections.Hashtable table, System.Type callingType) <0x2b5fe48 + 0x00276> in :0
at System.ComponentModel.ReflectTypeDescriptionProvider+ReflectedTypeData.GetConverter (System.Object instance) <0x2b5a100 + 0x0015e> in :0
at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter (System.Type type, System.Object instance) <0x2b542f8 + 0x00022> in :0
at System.ComponentModel.TypeDescriptor+TypeDescriptionNode+DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetConverter () <0x2b54048 + 0x00042> in :0
at System.ComponentModel.TypeDescriptor.GetConverter (System.Type type) <0x2b4d778 + 0x00014> in :0
at Newtonsoft.Json.Serialization.JsonTypeReflector.CanTypeDescriptorConvertString (System.Type type, System.ComponentModel.TypeConverter& typeConverter) [0x00000] in //Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs:77
at Newtonsoft.Json.Serialization.DefaultContractResolver.CanConvertToString (System.Type type) [0x00000] in //Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs:1275
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x000ab] in //Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs:1222
at (wrapper delegate-invoke) System.Func2[System.Type,Newtonsoft.Json.Serialization.JsonContract].invoke_TResult_T(System.Type) at System.Collections.Concurrent.ConcurrentDictionary2[TKey,TValue].GetOrAdd (TKey key, System.Func2[T,TResult] valueFactory) <0x2b1bad0 + 0x0007c> in :0 at Newtonsoft.Json.Utilities.ThreadSafeStore2[TKey,TValue].Get (TKey key) [0x00000] in //Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs:64
at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract (System.Type type) [0x0000b] in //Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs:198
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.WriteStartArray (Newtonsoft.Json.JsonWriter writer, System.Object values, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000a4] in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:827
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList (Newtonsoft.Json.JsonWriter writer, System.Collections.IEnumerable values, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00029] in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:669
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000d4] in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:179
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x0008d] in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:469
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x000b0] in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:173
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00079] in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:95
at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x0023a] in //Src/Newtonsoft.Json/JsonSerializer.cs:1149
at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in //Src/Newtonsoft.Json/JsonSerializer.cs:1049
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00028] in //Src/Newtonsoft.Json/JsonConvert.cs:664
at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00007] in //Src/Newtonsoft.Json/JsonConvert.cs:613
at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value) [0x00000] in //Src/Newtonsoft.Json/JsonConvert.cs:529
at JsonSerializerExtensions.CloneJson[T] (T value, T newInstance) [0x00001] in D:\Git\blazor-