RoslynRefactor 0.1.0-ci.72
This is a prerelease version of RoslynRefactor.
dotnet tool install --global RoslynRefactor --version 0.1.0-ci.72
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local RoslynRefactor --version 0.1.0-ci.72
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=RoslynRefactor&version=0.1.0-ci.72&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package RoslynRefactor --version 0.1.0-ci.72
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RoslynRefactor
Command-line and MCP access to the Roslyn-powered refactorings built in to Visual Studio.
Supported Refactorings
Please tell me if there's another VS refactoring that you really want.
| Command | Description |
|---|---|
| convert-to-linq-call-form | Convert a foreach loop into a LINQ expression using fluent method calls (Where/Select) |
| convert-to-linq-query-form | Convert a foreach loop into a LINQ expression using query syntax (from/where/select) |
| extract-iefe-no-captures | (PREVIEW) Wrap a capture-free selection (statements or an expression) in an immediately-invoked static lambda. Would-be captures are instead passed in or returned. |
| extract-interface | Extract the public members of a class/struct/interface into a new interface, in a new file |
| extract-method | Extract selected statements into a new method |
| inline-method | Inline a called method's (or local function's) body at the call site |
| inline-temporary-variable | Inline a local variable's initializer into all usages, then remove the declaration |
| introduce-variable | Introduce a local variable for a selected expression |
| make-method-static | Convert an instance method into a static method by adding a parameter for its receiver, and update all call sites |
| move-static-member | Move a static member (method/property/field/event) to another type in the same project |
| rename | Rename a symbol across a solution/project |
| reorder-parameters | Reorder a method/property/indexer/delegate's parameters and update all call sites |
Example
RoslynRefactor extract-method --project Sample.sln --file Sample/Program.cs --start-line 21 --start-column 9 --end-line 27 --end-column 10
Batch response files
Put an @file token anywhere on the command line to run the same command once per line
of that file, combined with any shared arguments given alongside the @file token:
RoslynRefactor extract-method --project Sample.sln @inputs.txt
inputs.txt:
--file Sample/Program.cs --start-line 21 --start-column 9 --end-line 27 --end-column 10
--file Sample/Program.cs --start-line 29 --start-column 9 --end-line 35 --end-column 10
Using with AI coding agents
See this project's AGENTS.md and SKILL.md.
MCP server
JSON descriptions of the tools exposed by the MCP server.
Using the MCP server with Claude Code
If you have RoslynRefactor installed as a dotnet tool:
dotnet tool install -g RoslynRefactor --prerelease
claude mcp add RoslynRefactor -- RoslynRefactor mcp
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-ci.72 | 54 | 9/26/2026 |
| 0.1.0-ci.63 | 67 | 9/11/2026 |
| 0.1.0-ci.60 | 82 | 9/10/2026 |
| 0.1.0-ci.55 | 79 | 9/9/2026 |
| 0.1.0-ci.50 | 76 | 9/5/2026 |
| 0.1.0-ci.49 | 73 | 9/5/2026 |
| 0.1.0-ci.48 | 74 | 9/5/2026 |
| 0.1.0-ci.47 | 76 | 9/5/2026 |
| 0.1.0-ci.45 | 83 | 9/5/2026 |
| 0.1.0-ci.44 | 64 | 9/1/2026 |
| 0.1.0-ci.43 | 70 | 9/1/2026 |
| 0.1.0-ci.42 | 64 | 9/1/2026 |
| 0.1.0-ci.41 | 77 | 8/31/2026 |
| 0.1.0-ci.40 | 63 | 8/31/2026 |
| 0.1.0-ci.39 | 81 | 8/31/2026 |
| 0.1.0-ci.38 | 76 | 8/28/2026 |
| 0.1.0-ci.35 | 71 | 8/28/2026 |
| 0.1.0-ci.34 | 66 | 8/28/2026 |
| 0.1.0-ci.27 | 65 | 8/28/2026 |
| 0.1.0-ci.26 | 67 | 8/28/2026 |
Loading failed