Weird issues in Visual Studio 2022: Solving the CS0534 error when solving the Json trimming problem

TL/DR: Visual Studio 2022 is wrong, and your code is OK Background: I'm having to switch from the awesome NewtonSoft JSON library over to some crappy System.Text.Json library (because VS thinks that breaking everyone to support Trimming is somehow ever OK). The sample code for that is wrong, but that's OK, it points to the right code. Except that if you copy-paste the sample code, it fails: The…