Freedom251 › Code Refactoring Tools
Roslynator

What Roslynator is
Roslynator is a set of code analysis tools for C# built on Roslyn. Its IDE extensions offer refactorings and fixes for compiler diagnostics, while analyzers are distributed separately through NuGet packages. The project lists extensions for Visual Studio 2026, Visual Studio 2022, VS Code, and Open VSX. VS Code users need legacy OmniSharp with dotnet.server.useOmnisharp set to true; the extension does not work with C# Dev Kit. A command-line tool is available through dotnet tool install -g roslynator.dotnet.cli, and the CLI is integrated with MegaLinter for CI. EditorConfig settings can configure analyzers, refactorings, and compiler-fix behavior. The project also provides a framework for testing analyzers, refactorings, and code fixes. Roslynator is free and open source under Apache License 2.0. Its security support covers version 5.x, CLI 0.x, and the Visual Studio 2026 and VS Code extensions; versions below 5.0 and Visual Studio 2022 extensions are out of support.
Who it suits
Roslynator suits developers working with C# in Roslyn-based environments who need analysis, refactoring, or compiler-diagnostic fixes. It also provides tools for Visual Basic and a framework for testing code-analysis components.
What it does well
- Free and open source under Apache License 2.0
- IDE refactorings and compiler-diagnostic fixes
- CLI integrates with MegaLinter for CI
- EditorConfig can configure analyzers and fixes
What to know first
- Analyzers are separate NuGet packages
- VS Code requires legacy OmniSharp
- VS Code extension does not work with C# Dev Kit
- Visual Studio 2022 extensions are out of security support
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Free of charge | Roslynator tools and extensions; donations welcome | Free |
As github.com lists them, read 3 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the Roslynator GitHub website.
- Choose a listed extension for Visual Studio, VS Code, or Open VSX.
- For VS Code, use legacy OmniSharp and set `dotnet.server.useOmnisharp` to `true`.
- Install analyzers separately through NuGet if needed.
- Install the CLI with `dotnet tool install -g roslynator.dotnet.cli` if needed.
Roslynator is a free toolkit for C# and Visual Basic work in Roslyn-based environments. It is a strong fit for developers who want refactorings and diagnostic fixes in an editor, plus separate analysis or command-line tools. Its main caveat is that editor support is uneven: VS Code requires legacy OmniSharp and does not work with C# Dev Kit.
Overview
Roslynator is a collection rather than a single editor extension: it combines IDE refactorings and fixes, separately distributed NuGet analyzers, a command-line tool, a testing framework, and .NET client libraries that extend the Roslyn API. That breadth suits teams that want to use analysis at several points in a C# workflow. The separation matters, though: installing an IDE extension does not provide the analyzers, and the client libraries do not include analyzers or refactorings.
The project supports C# and Visual Basic, project-level and batch refactoring, and AST-based analysis. It is desktop software deployed self-hosted, with no AI assistance. Repository files use the Apache License 2.0.
Key features
- Editor refactorings and fixes: Extensions provide refactorings and fixes for compiler diagnostics. EditorConfig settings can configure these alongside analyzers, giving teams control over which changes and diagnostics fit their codebase.
- NuGet analyzers: Analyzers are delivered separately from the IDE extensions. This gives users a distinct package to add, but requires them to account for that extra setup rather than expecting the editor extension to cover analysis on its own.
- CLI and CI: Install the command-line tool with dotnet tool install -g roslynator.dotnet.cli. Its integration in MegaLinter provides a route into CI for teams already using that open-source linter aggregator.
- Testing and client libraries: The testing framework supports unit tests for analyzers, refactorings, and code fixes, making Roslynator relevant to developers building analysis tools as well as applying them. The .NET client libraries extend Roslyn, but are not a substitute for the analyzer or refactoring components.
Pricing
Roslynator is free of charge: free. The free offering covers Roslynator tools and extensions; donations are welcome. There is no free trial because the project is free, and no paid tier or seat limit is stated. Its open-source repository files are licensed under Apache License 2.0.
Platforms
Extensions are available for Visual Studio 2026, Visual Studio 2022, VS Code, and Open VSX. The VS Code extension requires legacy OmniSharp with dotnet.server.useOmnisharp set to true; it will not work with C# Dev Kit. That makes Roslynator a poor fit for developers committed to the newer VS Code setup. The CLI and self-hosted desktop deployment offer options beyond editor use, while the stated platform support includes Linux, macOS, and Windows.
Who it's for
Choose Roslynator if you work in a Roslyn-based C# or Visual Basic environment and want free refactoring and compiler-diagnostic fixes, configurable analysis, or tools for developing and testing analyzers. It is less suitable if you need analyzers bundled into an IDE extension or depend on VS Code's C# Dev Kit.
Pros and cons
- Pro: Free tools span editor, command-line, CI, and analyzer-testing workflows, so Roslynator can serve both code authors and tooling developers.
- Pro: EditorConfig configuration can tune analyzers, refactorings, and compiler diagnostic fixes to a project.
- Con: Analyzers require separate NuGet packages, so the IDE extensions alone do not provide the complete analysis toolset.
- Con: VS Code requires legacy OmniSharp and is incompatible with C# Dev Kit, restricting its usefulness for some editor setups.
- Con: Security support covers version 5.x, CLI 0.x, and the Visual Studio 2026 and VS Code extensions; versions below 5.0 and Visual Studio 2022 extensions are out of support.
For suspected vulnerabilities, the project asks users to report them through GitHub issues and says it will release a patch as soon as possible after confirmation.
Alternatives
ast-grep is another free option if you want a tool available across API, extension, desktop, and web platforms; its pricing is also free.
CodeRush is worth considering if you want a free plan with the same features and updates across free and paid subscriptions, and commercial use permitted across versions.
ReSharper may suit users who want a free non-commercial option for C# in VS Code and compatible editors, or a paid plan at 389.00 USD per.
Coccinelle is a free Linux and macOS alternative.
CodART is another free choice for API, Linux, self-hosted, and web deployments, though SciTools Understand requires a separate professional license.
OpenRewrite is a fit if you want an Apache-licensed recipe framework that runs one repository at a time.
Sourcery offers a free Open Source plan for public repositories with AI reviews, PR summaries and diagrams, one-click fixes, and custom review rules.
Spoon is a free and open-source option with no paid plans or usage limits stated.
Browse more Code Refactoring Tools, or see Reverse Proxy Software and Fuzz Testing Software for those categories.
Verdict
Roslynator is a sound choice for Roslyn-based developers who want free refactoring and diagnostic fixes with optional analyzers, CLI use, and testing tools. Its range and configuration are the main reasons to choose it; look elsewhere if you need analyzers bundled with the editor extension or VS Code support without legacy OmniSharp.
Verdict
Roslynator offers IDE, command-line, and testing tools for code analysis and refactoring, with analyzers distributed separately. Check the editor requirements and supported security versions before choosing an extension.
Questions
How much does Roslynator cost?
Roslynator is free of charge. Donations are welcome.
Is Roslynator open source?
Yes. The repository states its files are licensed under Apache License 2.0.
Which editors does it support?
The project lists extensions for Visual Studio 2026, Visual Studio 2022, VS Code, and Open VSX.
Does the VS Code extension work with C# Dev Kit?
No. It requires legacy OmniSharp with `dotnet.server.useOmnisharp` set to `true`.
Are analyzers included in the IDE extensions?
No. Analyzers are provided separately through NuGet packages.
Which versions receive security support?
The policy covers version 5.x, CLI 0.x, and the Visual Studio 2026 and VS Code extensions. Versions below 5.0 and Visual Studio 2022 extensions are out of support.
Facts from Roslynator's own pages
- Analyzers
- Analyzers are not included in the IDE extensions and are provided through NuGet packages. · github.com, 3 Oct 2026
- Audience
- The tools are for C# code analysis, refactoring, and compiler diagnostic fixes in Roslyn-based development environments. · github.com, 3 Oct 2026
- CI integration
- The Roslynator CLI is integrated in MegaLinter, an open-source linter aggregator for CI. · github.com, 3 Oct 2026
- CLI
- The command-line tool installs with dotnet tool install -g roslynator.dotnet.cli. · josefpihrt.github.io, 3 Oct 2026
- Client libraries
- Its .NET client libraries extend the Roslyn API and do not include analyzers or refactorings. · github.com, 3 Oct 2026
- Configuration
- EditorConfig settings can configure analyzers, refactorings, and compiler diagnostic fixes. · josefpihrt.github.io, 3 Oct 2026
- Editor support
- The project lists extensions for Visual Studio 2026, Visual Studio 2022, VS Code, and Open VSX. · github.com, 3 Oct 2026
- IDE features
- Its IDE extensions provide refactorings and fixes for compiler diagnostics. · github.com, 3 Oct 2026
- License
- The repository states that its files are licensed under Apache License 2.0. · github.com, 3 Oct 2026
- Purpose
- Roslynator is a set of code analysis tools for C#, powered by Roslyn. · github.com, 3 Oct 2026
- Security support
- The security policy supports version 5.x, CLI 0.x, and the Visual Studio 2026 and VS Code extensions; versions below 5.0 and Visual Studio 2022 extensions are out of support. · github.com, 3 Oct 2026
- Testing
- The project provides a testing framework for unit testing analyzers, refactorings, and code fixes. · github.com, 3 Oct 2026
- VS Code requirement
- The VS Code extension requires legacy OmniSharp with dotnet.server.useOmnisharp set to true; it does not work with C# Dev Kit. · marketplace.visualstudio.com, 3 Oct 2026
- Vulnerability reporting
- The project asks users to report suspected vulnerabilities through GitHub issues and says it will release a patch as soon as possible once confirmed. · github.com, 3 Oct 2026
Where Roslynator stands on Freedom251
- Code Refactoring Tools#11 of 22