Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
We are currently using .net 8 and we are upgrading to .net 9. But with the upgrade, our service can't start because some ShouldSerializeXXX methods throw NullReferenceException. e.g.
And from stacktrace, I can see the ShouldSerializeXXX methods are called from here in namespace Newtonsoft.Json.Serialization:
Microsoft.AspNetCore.Mvc.NewtonsoftJson has already been upgraded to 9.0.0
This works fine in .net 8 but breaks in .net 9
Expected Behavior
NullReferenceException should not be thrown when start the service
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
9.0.101
Anything else?
No response