Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing NotSupported exception on VS 2022 17.11.1 #20

Open
77 opened this issue Aug 25, 2024 · 8 comments
Open

Throwing NotSupported exception on VS 2022 17.11.1 #20

77 opened this issue Aug 25, 2024 · 8 comments

Comments

@77
Copy link

77 commented Aug 25, 2024

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)
@77
Copy link
Author

77 commented Sep 2, 2024

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.

@nikefa
Copy link

nikefa commented Sep 27, 2024

Hey 77,
have you found a workaround for the problem?

@Joe-Fernico
Copy link

Unfortunately, I ended up using another Debug Image Viewer. Not sure if it is bad taste to put the name here or not?

@nikefa
Copy link

nikefa commented Sep 27, 2024

I would be very grateful for the name^^
Currently I save the Bitmaps to view them

@Joe-Fernico
Copy link

https://marketplace.visualstudio.com/items?itemName=KGySoft.drawing-debugger-visualizers

@binbon2d
Copy link

@aberus

This comment was marked as outdated.

@aberus
Copy link
Owner

aberus commented Nov 19, 2024

New version released with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants