← All recipes
Moderne licensed

Rename Form.OnClosing/OnClosed to OnFormClosing/OnFormClosed (WFDEV004)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FormOnClosingRenameArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Renames Form.OnClosing to OnFormClosing and Form.OnClosed to OnFormClosed for .NET 10 compatibility. Parameter type changes (CancelEventArgsFormClosingEventArgs, EventArgsFormClosedEventArgs) must be updated manually.

Single recipenet10dotnetwinformsProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FormOnClosingRename

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet