rename_symbol
Safely rename a type or member across the entire solution (Roslyn Renamer). Cascades to references, constructors, overrides, nameof, and XML doc crefs. Defaults to preview mode (returns edits without writing files); set preview=false to apply. New compiler errors the rename would introduce are reported as Conflicts, and apply mode refuses to write them unless force=true. Locals/parameters and file renames are not supported.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | ✓ | Symbol to rename: simple type (MyClass), fully qualified (Namespace.MyClass), or member (MyClass.MyMethod) |
newName | string | ✓ | New name — a bare C# identifier, e.g. 'OrderProcessor' |
renameOverloads | bool | Rename all overloads of a method together (default: true; false renames a single arbitrary overload) | |
renameInStrings | bool | Also rewrite occurrences inside string literals (default: false) | |
renameInComments | bool | Also rewrite occurrences inside comments (default: true) | |
preview | bool | Preview only — return edits without writing to disk (default: true) | |
force | bool | Apply even when Conflicts are reported (default: false) |