← All recipes
Moderne licensed

Find obsolete Form.OnClosing/OnClosed usage (WFDEV004)

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

Finds usage of Form.OnClosing, Form.OnClosed, and the Closing/Closed events. In .NET 10, these are obsolete (WFDEV004). Use OnFormClosing/OnFormClosed and FormClosing/FormClosed instead.

Single recipenet10searchdotnetwinformsProprietary

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.FindFormOnClosingObsolete

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

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