Rename Form.OnClosing/OnClosed to OnFormClosing/OnFormClosed (WFDEV004)
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FormOnClosingRenameArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetRenames Form.OnClosing to OnFormClosing and Form.OnClosed to OnFormClosed for .NET 10 compatibility. Parameter type changes (CancelEventArgs → FormClosingEventArgs, EventArgs → FormClosedEventArgs) 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.FormOnClosingRenameIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet