This project has moved and is read-only. For the latest updates, please go here.

Could not load file or assembly 'System.Runtime' Error when using JsonConvert.SerializeObject

Aug 9, 2013 at 2:07 AM

I've created a Portable Class Library, using the nuget packages for JSON.NET and the Async package

when i try and serialise a class within the portable library i get this error, in my unit test project

Could not load file or assembly 'System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I only seem to get it when there is an public async method on the class. if i recreate the class in the test project then it works fine. the error only occurs when calling into the portable library
Aug 9, 2013 at 2:34 PM
found a solution here

it seems i need to manually edit the app config as nuget isn't doing this correctly for different frameworks.

the two solutions i found worked were either to change the version number to for example. or just to comment it out entirely.