I am marking this as a bug, because it is so brutal to the developer that its oversight is most definitely a bug.
If your Roslyn Analyzer is built against an SDK newer than .NET 6, then Unity will not read the analyzer. That is not the bug.
The bug is that instead of communicating this to the developer, it silently fails. It only shows up in the Editor Log if you turn on EnableDomainReloadTimings and even then it does not send it to the Console window like the documentation claims. And again - I would expect that ERRORS would show up, so only after six hours did it dawn on me that maybe that setting might show more than just domain reload timings.
There needs to be a warning or info message if it can’t load the Analyzer DLL, and the Documentation should clearly state that you must build the analyzer against SDK 6.
I am not using System.Text.Json, and that’s totally irrelevant to me, so I did not take a requirement about System.Text.Json to mean anything - especially given the documentation claims that the only version that it is compatible with does not exist. There is no System.Text.Json 6.0.0-preview
. There are versions such as 6.0.0-preview.3.21201.4
and 6.0.0-rc.1.21451.13
but there is no version 6.0.0-preview
.