Hetal
Hetal

Reputation: 639

Could not load file or assembly 'System.Runtime.Serialization' in Xamarin.UWP

I have a project in Xamarin.Forms I'm using following line to parse the JSON to object.

var jsonObj = JsonConvert.DeserializeObject(resultstringjson);

It works properly in Xamari.Android and Xamarin.iOS but when I'm running it in UWP it shows following error.

Could not load file or assembly 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Does any one have idea how to fix it?

Upvotes: 0

Views: 433

Answers (1)

Wilson Vargas
Wilson Vargas

Reputation: 2899

You can try adding System.Runtime.Serialization.Primitives to you project.json file in your UWP project directly, like this:

"dependencies": {
     "System.Runtime.Serialization.Primitives":  "4.0.10-*"
}

Upvotes: 1

Related Questions