0

I updated yesterday morning to the latest versions of Xamarin and Xcode. I am now posed with this error when loading the iOS project: "Failed to resolve assembly: 'System.Text.Json, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51". Where can I find it? It not in "C:\Users\username.nuget\packages".

Error Message

Additionally, Output stated:

2>_CompileToNative: 2> [xma]: Uploading 'Sentry.iOS.exe' (36/36 KB) 100.00%... 2> /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch @/Users/marcgeorge/Library/Caches/Xamarin/mtbs/builds/Sentry.iOS/44d8d7434e850748f5ee25da92692acc/obj/iPhoneSimulator/Debug/response-file.rsp 2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(884,3): warning MT0136: Cannot find the assembly 'System.Text.Json, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' referenced from '/Users/marcgeorge/Library/Caches/Xamarin/mtbs/builds/Sentry.iOS/44d8d7434e850748f5ee25da92692acc/bin/iPhoneSimulator/Debug/Microsoft.OData.Edm.dll'. 2>
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(884,3): error MT2002: Failed to resolve assembly: 'System.Text.Json, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

enter image description here

It appears that the problem is with Xamarin.iOS.Common.targets which needs to located the Json library.

dbc
  • 104,963
  • 20
  • 228
  • 340
Marc George
  • 134
  • 1
  • 18
  • Not even sure `System.Text.Json` works on Xamarin.IOS, see [System.Text.Json Serializer does not appear to work on Xamarin iOS #31326](https://github.com/dotnet/runtime/issues/31326). – dbc Jul 09 '20 at 13:50
  • 1
    What code do you used for? You could try to reinstall the `System.Text.Json` from the GitHub.https://www.nuget.org/packages/System.Text.Json/ – Wendy Zang - MSFT Jul 10 '20 at 07:21

1 Answers1

0

Reinstalling the Nugget as suggested by @Wendy resolved the issue.

Marc George
  • 134
  • 1
  • 18