-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Text.Json.JsonSerializer' threw an exception. ---> System.MissingMethodException #10839
Comments
The underlying issue: mono/mono#20805 |
Workaround doesn't work in my case. I applied 1:1 the references, but now I cannot use the "ReadOnlySpan" and "Span" classes. I don't know if this playes any role, but the those classes are used over .net standard 2.0 library. |
We also use .NET Standard 2.0 libraries. In the Xamarin main project we use the overrides for System.Buffers/System.Memory to convince NuGet that the dependency is satisfied without overwriting the actual files coming from the Mono/Xamarin framework. |
Dupe of #10548 |
…it (#10928) The [SDK conflict resolution code](https://github.com/dotnet/sdk/blob/3c1307d22747bac8c499a711d1bac39d7fdba541/src/Tasks/Common/src/ConflictResolution/ResolvePackageFileConflicts.cs#L54-L57) expects the FrameworkList.xml file to be located in `$(TargetFrameworkDirectory)/RedistList/FrameworkList.xml`. Fixes dotnet/runtime#49211 Fixes dotnet/runtime#49940 Fixes dotnet/runtime#49477 Fixes #10912 Fixes #10839 Fixes #10548 Fixes #10592 Fixes mono/mono#20805 Fixes mono/mono#20894
just updated to visual studio 16.9.1, Visual Studio for Mac 8.9 (build 1651). Latest Xamarin Forms 5.0.0.2012 etc.
by calling Serialize using System.Text.Json.Serializer of simple class (UserIdentity) below:
I get following exception:
System.TypeInitializationException: The type initializer for 'System.Text.Json.JsonSerializer' threw an exception. ---> System.MissingMethodException: Method not found: int System.Text.Encodings.Web.TextEncoder.FindFirstCharacterToEncodeUtf8(System.ReadOnlySpan
1<byte>) at System.Text.Json.JsonEncodedText.EncodeHelper (System.ReadOnlySpan
1[T] utf8Value, System.Text.Encodings.Web.JavaScriptEncoder encoder) [0x00000] in <7e3a59f5e4004edbb4b17c580799cc52>:0at System.Text.Json.JsonEncodedText.TranscodeAndEncode (System.ReadOnlySpan
1[T] value, System.Text.Encodings.Web.JavaScriptEncoder encoder) [0x00033] in <7e3a59f5e4004edbb4b17c580799cc52>:0 at System.Text.Json.JsonEncodedText.Encode (System.ReadOnlySpan
1[T] value, System.Text.Encodings.Web.JavaScriptEncoder encoder) [0x00014] in <7e3a59f5e4004edbb4b17c580799cc52>:0at System.Text.Json.JsonEncodedText.Encode (System.String value, System.Text.Encodings.Web.JavaScriptEncoder encoder) [0x00014] in <7e3a59f5e4004edbb4b17c580799cc52>:0
at System.Text.Json.JsonSerializer..cctor () [0x00042] in <7e3a59f5e4004edbb4b17c580799cc52>:0
--- End of inner exception stack trace ---
This was working fine in previous releases!
[DataContract]
public class UserIdentity
{
///
/// UserIdentity
///
public UserIdentity()
{
Header = DefaultHeader;
}
The text was updated successfully, but these errors were encountered: