Fix Visualizer for Visual Studio >17.6
Warning CS0618: 'IVisualizerObjectProvider.GetObject()' is obsolete: 'This method uses binary serialization which is no longer supported, please use IVisualizerObjectProvider3.GetObject instead.'
We should take a look at this warning. Would be nice if the Visualizers would work again in the new versions of Visual Studio.
I use Rider so I'm not familiar with Visual Studio debugger visualizers and can't test it, but I glanced over the docs and it looks like the main work that needs to be done is switch to the modern VisualizerObjectProvider methods that support JSON and deserialize from that instead. I think most of the classes on that list of warnings already implement IJsonSerialize.
Don't bother with this issue if you don't use Visual Studio.
It's only nice to have and not very important.
The way DebuggerVisualizer works has changed in Visual Studio 2022 (17.9+).
If we adopt the new approach, it will break compatibility with all previous versions of Visual Studio 2022 (<17.9).
To avoid compatibility issues, I recommend ignoring the remaining compiler warnings related to DebuggerVisualizer for now and rewriting this from scratch in CADability 2.0.
For more details, refer to Microsoft’s documentation: 🔗 New Debugger Visualizer Model
#49
Adopting the code for newer versions of VS seems legit. Even if i never missed the visualizer.