8000 [Breaking change]: Several WinForms Warnings need to be added · Issue #44894 · dotnet/docs · GitHub
[go: up one dir, main page]

Skip to content
[Breaking change]: Several WinForms Warnings need to be added #44894
Closed
@merriemcgaw

Description

@merriemcgaw

Description

We have a handful of analyzer warnings in WinForms that need to be added.

  • WFO0003: Unsupported high DPI configuration.
  • WFO1000: Missing property serialization configuration.
  • WFO1001: IDataObject type does not implement ITypedDataObject

And a couple of obsoletion warnings to add see

  • WFDEV004 - "Form.OnClosing, Form.OnClosed and the corresponding events are obsolete. Use Form.OnFormClosing, Form.OnFormClosed, Form.FormClosing and Form.FormClosed instead."
  • WFDEV005 - "Clipboard.GetData(string) method is obsolete. Use Clipboard.TryGetData<T> methods instead."
  • WFDEV006 - Deprecated Menu, Toolbar and DataGrid controls:
internal const string ContextMenuMessage = $"`{nameof(ContextMenu)}` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `{nameof(ContextMenuStrip)}` instead.";
   internal const string DataGridMessage = $"`{nameof(DataGrid)}` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `{nameof(DataGridView)}` instead.";
   internal const string MainMenuMessage = $"`{nameof(MainMenu)}` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `{nameof(MenuStrip)}` instead.";
   internal const string MenuMessage = $"`{nameof(Menu)}` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `{nameof(ToolStripDropDown)}` and `{nameof(ToolStripDropDownMenu)}` instead.";
   internal const string StatusBarMessage = $"`{nameof(StatusBar)}` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `{nameof(StatusStrip)}` instead.";
   internal const string ToolBarMessage = $"`{nameof(ToolBar)}` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `{nameof(ToolStrip)}` instead.";

Version

.NET 10 Preview 1

Previous behavior

For the WinForms analyzers see: https://github.com/dotnet/winforms/blob/main/docs/analyzers/WinFormsCSharpAnalyzers.Help.md

For details on the Clipboard APIs see: dotnet/winforms#12362

For the warnings on ToolBar, DataGrid etc see: dotnet/winforms#3783

New behavior

detailed above

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

see above

Recommended action

see above

Feature area

Windows Forms

Affected APIs

see above


Associated WorkItem - 375469

6228

Metadata

Metadata

Labels

🏁 Release: .NET 10Work items for the .NET 10 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking changein-prThis issue will be closed (fixed) by an active pull request.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0