You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a native AOT project targeting 8.0 that I upgraded System.Text.Json to 9.0.0 in. When this app is published using the 8 sdk, a missing method warning shows up, and the app fails at runtime.
If the app is built using the 9 sdk, or System.Text.Json is not upgraded, there are no warnings, and everything runs as expected.
Is using the updated STJ intended to be supported if you're not using the newest sdk?
Reproduction Steps
Create a new project using the web api aot template (dotnet new webapiaot)
Make sure you're using the .net 8 SDK (I used global.json)
Add the System.Text.Json 9.0.0 nuget package to the project
Description
I have a native AOT project targeting 8.0 that I upgraded System.Text.Json to 9.0.0 in. When this app is published using the 8 sdk, a missing method warning shows up, and the app fails at runtime.
If the app is built using the 9 sdk, or System.Text.Json is not upgraded, there are no warnings, and everything runs as expected.
Is using the updated STJ intended to be supported if you're not using the newest sdk?
Reproduction Steps
dotnet new webapiaot
)dotnet publish
Expected behavior
Publish completes with no missing method warnings
Actual behavior
Warning shown:
ILC: Method '[STJIssue]AppJsonSerializerContext.Create_Todo(JsonSerializerOptions)' will always throw because: Missing method 'Void System.Text.Json.Serialization.Metadata.JsonObjectInfoValues
1.set_ConstructorAttributeProviderFactory(System.Func1<System.Reflection.ICustomAttributeProvider>)'
Regression?
No response
Known Workarounds
Don't upgrade System.Text.Json to 9.0, or use the 9 sdk
Configuration
Repro is from an arm64 Mac. Issue was first noticed when building in a linux arm64 container
Other information
The app is deployed to AWS Lambda, so unfortunately there is no easy way for me to update the SDK used in the docker image their build tooling uses.
The text was updated successfully, but these errors were encountered: