简体   繁体   中英

Attempting to deserialize an object using JSON.NET in Windows 10 Universal App fails with FileNotFoundException

I'm using the Windows 10 Preview SDK, and attempting to port forward some code that depends on JSON.NET. It's failing with the following exception:

{"Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.":"System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes"}

I can see that namespace present in the Object Browser, so I'm not sure what's missing or how to resolve this error. This seems to be blocking my app from moving over.

Current workaround:

Use this version: 6.0.8

Important: You have to check ALL projects on your solution. If any of them have a 7.0.x version, downgrade it to 6.0.8.

Hope the fix will arrive soon.

This is a bug in NuGet that was fixed between RC and RTM releases. https://github.com/NuGet/Home/issues/454 .

We might be able to ship an update on the gallery before RTM

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM