這可能不是與100%Json.NET但因爲它是崩潰的組件......Json.NET的Windows Store應用認證崩潰
序列化工作得很好,直到Windows應用程序證書的第二次測試工具包。這個程序開始啓動它拋出以下異常:
System.EntryPointNotFoundException Entry point was not found.
at Newtonsoft.Json.Utilities.ReflectionUtils.GetFieldsAndProperties(Type type, BindingFlags bindingAttr) in \Newtonsoft.Json\Utilities\ReflectionUtils.cs:line 661
at Newtonsoft.Json.Serialization.DefaultContractResolver.GetSerializableMembers(Type objectType) in \Newtonsoft.Json\Serialization\DefaultContractResolver.cs:line 267
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateProperties(Type type, MemberSerialization memberSerialization) in \Newtonsoft.Json\Serialization\DefaultContractResolver.cs:line 845
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract(Type objectType) in \Newtonsoft.Json\Serialization\DefaultContractResolver.cs:line 349
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) in \Newtonsoft.Json\Serialization\DefaultContractResolver.cs:line 734
at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type) in \Newtonsoft.Json\Serialization\DefaultContractResolver.cs:line 232
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe(Object value) in \Newtonsoft.Json\Serialization\JsonSerializerInternalWriter.cs:line 77
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value) in \Newtonsoft.Json\Serialization\JsonSerializerInternalWriter.cs:line 58
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value) in \Newtonsoft.Json\JsonSerializer.cs:line 608
at Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Formatting formatting, JsonSerializerSettings settings) in \Newtonsoft.Json\JsonConvert.cs:line 749
的代碼看起來像這樣...
var test = JsonConvert.SerializeObject(new { id = "a", test = "test" });
上的應用程序運行WACK後,我必須重新安裝它,使之重新工作。
有誰知道怎麼WACK運行該應用程序?我猜想它在每次啓動時會以各種各樣的環境進行模擬,但我無法瞭解它是如何攪亂我的應用程序的。
我有同樣的問題,我發現,這是因爲在WACK本地代碼編譯Json.NET,這會導致這個奇怪的問題。如果您轉到包文件夾並從AC \ Microsoft \ CLR_v4.0_32中刪除Json.NET,它將開始再次運行。 –