HouseRules

HouseRules

1.4k Downloads

Migrate to JSON libraries that are supported by Oculus platform.

orendain opened this issue ยท 1 comments

commented

@jimconner discovered that the Configuration mod doesn't fully run when the game runs via the Oculus PC app (runs fine on Steam).

From my minimal research and experience, this seems to be a compatibility issue between the .NET standard supported by Oculus and the one required by system.text.json, the package we use to do JSON de/serialization.

I don't know enough about .NET to know immediately know where to make changes, so this issue may not be fully fixed for a while.

From what I can tell, a few things may be in play:

Will need to do some more reading during free time.

commented

Sorry to disappoint, but this hasn't fixed the issue for me. I'm still getting the same PlatformNotSupportedException... The only change is that the stack trace now mentions Newtonsoft JSON instead of the other microsoft one.

[17:14:05.590] [RulesAPI:Configuration] [WARNING] Failed to write rule entry AbilityActionCostAdjustedRule to config. Skipping that rule: System.PlatformNotSupportedException: Operation is not supported on this platform.
  at Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateDynamicMethod (System.String name, System.Type returnType, System.Type[] parameterTypes, System.Type owner) [0x00018] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateDefaultConstructor[T] (System.Type type) [0x00010] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator (System.Type createdType) [0x00005] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract (Newtonsoft.Json.Serialization.JsonContract contract) [0x00093] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateDictionaryContract (System.Type objectType) [0x00007] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x00089] in <f74995119334484fb6db6825be2eac0d>:0
  at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].GetOrAdd (TKey key, System.Func`2[T,TResult] valueFactory) [0x00034] in <2b3a3162be434770b7a4fac8b896e90c>:0
  at Newtonsoft.Json.Utilities.ThreadSafeStore`2[TKey,TValue].Get (TKey key) [0x00000] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract (System.Type type) [0x0000b] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContract (System.Object value) [0x00011] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe (System.Object value) [0x00005] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00028] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x0023a] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value) [0x00000] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Linq.JToken.FromObjectInternal (System.Object o, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x0001c] in <f74995119334484fb6db6825be2eac0d>:0
  at Newtonsoft.Json.Linq.JToken.FromObject (System.Object o) [0x00006] in <f74995119334484fb6db6825be2eac0d>:0
  at RulesAPI.Configuration.ConfigManager.WriteRuleset (RulesAPI.Ruleset ruleset) [0x00081] in <d46bb7bdb1c44e40b72e4c4241e7c435>:0