Skip to content

Indirect usage of BinaryFormatter via WinForms ImageList causes compiler warningsΒ #40044

@SoftCircuits

Description

@SoftCircuits

Type of issue

Missing information

Description

After updating my WinForms application to .NET 8, I'm now getting MSB3825 compiler warnings saying that BinaryFormatter is deprecated and will be removed in a future version.

This article recommends that I "migrate away from BinaryFormatter due to its security and reliability flaws."

But this isn't helpful. I never opted into using BinaryFormatter. I added other WinForm components, and apparently they are using this type. In my case, it appears that an ImageList control is using it.

So does this mean I need to stop using ImageList? How can I migrate away from something that is being used behind the scenes by WinForms? None of this information helps me to resolve the issue.

Page URL

https://learn.microsoft.com/en-us/dotnet/core/compatibility/serialization/8.0/binaryformatter-disabled

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/compatibility/serialization/8.0/binaryformatter-disabled.md

Document Version Independent Id

5048d220-6e5c-3130-b1db-ead1efbf7c36

Article author

@gewarren

Metadata

  • ID: 0eba416b-f96c-6684-b54e-1c765f0c6efe
  • Service: dotnet-fundamentals

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions