gurrenm3 / BTD-Mod-Helper

A powerful and easy to use API for modding BTD6, BATTD, and other Ninja Kiwi games.
https://gurrenm3.github.io/BTD-Mod-Helper/
GNU General Public License v3.0
175 stars 119 forks source link

[BloonsTD6_Mod_Helper] Failed to save ShowRoundsetChanger for BloonsTD6 Mod Helper [22:08:57.244] [BloonsTD6_Mod_Helper] System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. #245

Closed marchewa122 closed 3 months ago

marchewa122 commented 3 months ago

API Problem

Game Version

43.3

MelonLoader Version

v0.6.4 Open-Beta

Mod Helper Version

v3.1.21

Description

when trying to drag Random Monkey from the mod, the game crashes and I have these errors in the logs.

Logs

[22:08:57.240] [BloonsTD6_Mod_Helper] Failed to save ShowRoundsetChanger for BloonsTD6 Mod Helper [22:08:57.244] [BloonsTD6_Mod_Helper] System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The specified file could not be found. File name: 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at Newtonsoft.Json.Serialization.JsonTypeReflector.get_DynamicCodeGeneration() at Newtonsoft.Json.Serialization.JsonTypeReflector.get_ReflectionDelegateFactory() at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator(Type createdType) at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreatePrimitiveContract(Type objectType) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Newtonsoft.Json.Utilities.ThreadSafeStore2.Get(TKey key) at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContract(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value) at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer) at Newtonsoft.Json.Linq.JToken.FromObject(Object o) at BTD_Mod_Helper.Api.ModOptions.ModSettingsHandler.SaveModSettings(BloonsMod mod, Boolean initialSave) [22:08:57.245] [BloonsTD6_Mod_Helper] Failed to save BypassSavingRestrictions for BloonsTD6 Mod Helper [22:08:57.246] [BloonsTD6_Mod_Helper] System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.The specified file could not be found File name: 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at Newtonsoft.Json.Serialization.JsonTypeReflector.get_DynamicCodeGeneration() at Newtonsoft.Json.Serialization.JsonTypeReflector.get_ReflectionDelegateFactory() at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator(Type createdType) at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreatePrimitiveContract(Type objectType) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Newtonsoft.Json.Utilities.ThreadSafeStore2.Get(TKey key) at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContract(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value) at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer) at Newtonsoft.Json.Linq.JToken.FromObject(Object o) at BTD_Mod_Helper.Api.ModOptions.ModSettingsHandler.SaveModSettings(BloonsMod mod, Boolean initialSave) [22:08:57.248] [BloonsTD6_Mod_Helper] Failed to save AutoHideModdedClientPopup for BloonsTD6 Mod Helper [22:08:57.249] [BloonsTD6_Mod_Helper] System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The specified file could not be found File name: 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at Newtonsoft.Json.Serialization.JsonTypeReflector.get_DynamicCodeGeneration() at Newtonsoft.Json.Serialization.JsonTypeReflector.get_ReflectionDelegateFactory() at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator(Type createdType) at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreatePrimitiveContract(Type objectType) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Newtonsoft.Json.Utilities.ThreadSafeStore2.Get(TKey key) at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContract(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value) at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer) at Newtonsoft.Json.Linq.JToken.FromObject(Object o) at BTD_Mod_Helper.Api.ModOptions.ModSettingsHandler.SaveModSettings(BloonsMod mod, Boolean initialSave) [22:08:57.250] [BloonsTD6_Mod_Helper] Failed to save CleanProfile for BloonsTD6 Mod Helper [22:08:57.250] [BloonsTD6_Mod_Helper] System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.The specified file could not be found File name: 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at Newtonsoft.Json.Serialization.JsonTypeReflector.get_DynamicCodeGeneration() at Newtonsoft.Json.Serialization.JsonTypeReflector.get_ReflectionDelegateFactory() at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator(Type createdType) at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreatePrimitiveContract(Type objectType) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Newtonsoft.Json.Utilities.ThreadSafeStore2.Get(TKey key) at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContract(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value) at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer) at Newtonsoft.Json.Linq.JToken.FromObject(Object o) at BTD_Mod_Helper.Api.ModOptions.ModSettingsHandler.SaveModSettings(BloonsMod mod, Boolean initialSave) [22:08:57.252] [BloonsTD6_Mod_Helper] Failed to save UseOldLoading for BloonsTD6 Mod Helper [22:08:57.253] [BloonsTD6_Mod_Helper] System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The specified file could not be found File name: 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at Newtonsoft.Json.Serialization.JsonTypeReflector.get_DynamicCodeGeneration() at Newtonsoft.Json.Serialization.JsonTypeReflector.get_ReflectionDelegateFactory() at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator(Type createdType) at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreatePrimitiveContract(Type objectType) at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Newtonsoft.Json.Utilities.ThreadSafeStore`2.Get(TKey key) at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContract(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe(Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value) at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer) at Newtonsoft.Json.Linq.JToken.FromObject(Object o) at BTD_Mod_Helper.Api.ModOptions.ModSettingsHandler.SaveModSettings(BloonsMod mod, Boolean initialSave)

jlin368 commented 3 months ago

I got this same issue as well. You have to downgrade Melonloader to 0.6.2 (0.6.3 might work but I haven't tested it). For some reason Melonloader 0.6.4 causes this error, which also makes it so that mod settings won't save.

marchewa122 commented 3 months ago

I got this same issue as well. You have to downgrade Melonloader to 0.6.2 (0.6.3 might work but I haven't tested it). For some reason Melonloader 0.6.4 causes this error, which also makes it so that mod settings won't save.

Thank you very much, I downgraded Melonloader to version 0.6.2 and everything works <3