Find obsolete Form.OnClosing/OnClosed usage (WFDEV004)

Proprietary

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.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FindFormOnClosingObsolete
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FindFormOnClosingObsolete

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.