Skip to content
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 9.0 error #110283

Closed
BlameTwo opened this issue Nov 30, 2024 · 2 comments
Closed

System.Text.Json 9.0 error #110283

BlameTwo opened this issue Nov 30, 2024 · 2 comments

Comments

@BlameTwo
Copy link

BlameTwo commented Nov 30, 2024

Description

In System In Text. Json, when I perform AOT publishing on the application, the error message is:
Method not found: 'Void System.' Text.Json.Serialization.Metadata.JsonObjectInfoValues1<WavesLauncher.Core.Models.LauncherIndex>.set_ConstructorAttributeProviderFactory(System.Func1<System.Reflection.ICustomAttributeProvider>)'.

My development environment is as follows:
Visual Studio 2022 preview 17.13
net8.0-windows10.0.22621.0
C# preview
WindowsAppSdk 1.6

In the application, I explicitly applied System Text. Json 9.0 Nuget package, I encountered an error while running the application after AOT. When I removed After System .Text. Json 9.0, it was found that everything was normal.

Has this problem already occurred? But I find this very strange, as if the version is incompatible, and there are no warning signs, which confuses me.

Reproduction Steps

Create one Net 8 program, and simply create a Json object and implement its JsonContext generator. Note that you need to manually reference System.Text.Json 9.0 package.

Afterwards, write a simple serialization and deserialization logic and publish the program in AOT format to generate errors

Expected behavior

He should execute any serialization and deserialization program logic normally

Actual behavior

Method not found: 'Void System.' Text.Json.Serialization.Metadata.JsonObjectInfoValues1<WavesLauncher.Core.Models.LauncherIndex>.set_ConstructorAttributeProviderFactory(System.Func1<System.Reflection.ICustomAttributeProvider>)'.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 30, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

@vcsjones
Copy link
Member

This looks like a duplicate of #110214

Please see that issue for more details.

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants