I am getting this exception in my Blazor Web App, whenever i try to use JsonSerializer while AOT is enabled. I get the exception when running in debug mode, which i find strange
System.InvalidOperationException: 'Reflection-based serialization hasbeen disabled for this application. Either use the source generatorAPIs or explicitly configure the'JsonSerializerOptions.TypeInfoResolver' property.'
Steps to reproduce my problem:
Create a Blazor Web App (WebAssembly) with .NET 8. Got to project properties and enable AOT
Goto Home.razor and add this code, so we trigger the use of System.Text.Json.JsonSerializer
@code{ protected override void OnInitialized() { var test = System.Text.Json.JsonSerializer.Serialize("Hello World"); }}Now run the project in debug mode. When it tries to serialize, i get this exception
