Remove DotNetCliToolReference

Proprietary

Removes a <DotNetCliToolReference> element from .csproj files. Use * to remove every CLI tool reference.

OpenRewrite.CSharp.Recipes.RemoveDotNetCliToolReference

Required

The CLI tool package name to remove. Supports glob patterns. Use * to remove all CLI tool references.

Optional

RegenerateMarkerBoolean

Whether to re-run dotnet restore after the edit to refresh the project's MSBuildProject marker. Defaults to true. Composite recipes that chain multiple csproj-mutating steps may set this to false on intermediate steps and finalize once with EnsureCsprojAttestation.

mod run . --recipe=OpenRewrite.CSharp.Recipes.RemoveDotNetCliToolReference \ -P ToolName=Microsoft.DotNet.Watcher.Tools

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