Throwing NotSupported exception on VS 2022 17.11.1
This was working previously but not working on Visual Studio Enterprise 2022 v17.11.1.
An unhandled exception of type 'System.NotSupportedException' was thrown by the custom visualizer component in the process being debugged.
This method is not supported when using the formatter policy 'Legacy'.
at Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource.Serialize(Stream serializationStream, Object target)
at Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource.GetData(Object target, Stream outgoingData)
at Aberus.VisualStudio.Debugger.ImageVisualizer.ImageVisualizerBitmapObjectSource.GetData(Object target, Stream outgoingData)
at Microsoft.VisualStudio.DebuggerVisualizers.DebuggeeSide.Impl.ClrCustomVisualizerDebuggeeHost.GetData(Object visualizedObject)
https://learn.microsoft.com/en-us/visualstudio/debugger/walkthrough-writing-a-visualizer-in-csharp?view=vs-2022
Due to the security issues described in Special debugger side considerations for .NET 5.0+, starting with Visual Studio 2022 version 17.11, visualizers won't be able to specify the Legacy formatter policy.
Hey 77, have you found a workaround for the problem?
Unfortunately, I ended up using another Debug Image Viewer. Not sure if it is bad taste to put the name here or not?
I would be very grateful for the name^^ Currently I save the Bitmaps to view them
https://marketplace.visualstudio.com/items?itemName=KGySoft.drawing-debugger-visualizers
https://marketplace.visualstudio.com/items?itemName=KGySoft.drawing-debugger-visualizers
Same isssue ?
Here is a quick fix (It may or may not work 🚧), can you try and give a feedback if it solves this issue: SetupVisualizer.zip
New version released with a fix.