79094693

Date: 2024-10-16 15:13:47
Score: 0.5
Natty:
Report link

After enabling more debugging by adding:

"Microsoft.AspNetCore.SignalR": "Debug",
"Microsoft.AspNetCore.Http.Connections": "Debug"

To the appsettings.json I discovered the message:

System.InvalidOperationException: Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property.

Which turns out to be related to: https://learn.microsoft.com/en-us/dotnet/core/compatibility/serialization/8.0/publishtrimmed

So after setting PublishTrimmed to false in the project configuration it is now working as intended. I will most likely go over to using the source generator api later, but at least I now know what the root of the issue was.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: MH1702