Repository navigation
Releases
Releases · dotnet/roslynator
v5.0.1
Fixed
- Set Visual Studio extension
InstallationTargetto API version[17.14,)so Marketplace publish succeeds (VsixPub0029; API 18.0 is experimental). Installable on Visual Studio 2022 17.14+ and Visual Studio 2026 (VS 2026 extension compatibility). - [CLI] Reference the compiled output of referenced projects that cannot be loaded into the workspace (for example F# projects), so their types are no longer reported as missing (
CS0103/CS0246) during analysis (PR) - [CLI] Fix loading of analyzers that reference
System.Compositionon the .NET 10 SDK (PR) - Fix code fix for RCS1233 to add parentheses when the new
&&/||expression is an operand of an operator with higher precedence (e.g.a && b | cis now fixed toa && (b || c)) (PR)
v5.0.0
Added
- Add
roslyn5.0NuGet package flavor (analyzers/dotnet/roslyn5.0/cs) (PR)
Breaking
- Enable nullable annotations on
Roslynator.CommonandRoslynator.Workspaces.Common(#1817)- Source-breaking for projects that compile against this surface with nullable reference types enabled.
- [Testing Framework] Lower Roslyn dependency of testing packages to 3.8.0 so that the Roslyn version is determined by the consumer's own
Microsoft.CodeAnalysis.*reference instead of being forced to a fixed version (PR)Roslynator.Testing.Common,Roslynator.Testing.CSharp,Roslynator.Testing.CSharp.XunitandRoslynator.Testing.CSharp.MSTestnow depend onMicrosoft.CodeAnalysis.*>= 3.8.0(previously>= 4.14.0).Roslynator.Testing.Commonno longer depends onRoslynator.Core.- Action required: a test project that previously relied on the testing framework to pull in Roslyn 4.14.0 should now add its own reference, e.g.
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />. The chosen version raises the maximum C# language version the parser can accept; test sources still parse atCSharpParseOptions.Defaultunless you set parse options /LanguageVersion(for exampleLanguageVersion.Latest). - Action required: a test project that used
Roslynator.Coretypes via the old transitive dependency must now add an explicitRoslynator.Corepackage reference.
Changed
- Bump Roslyn to 5.0.0 (PR)
- CLI targets Roslyn 5.0.0
- Solution build and tests use Roslyn 5.0.0 by default (the testing packages floor at 3.8.0; see Breaking)
- Replace Visual Studio 2022 extension with Roslynator 2026 for Visual Studio 2026 (
[18.0,19.0)) (PR)- Extension ships refactorings and compiler diagnostic code fixes; analyzers via NuGet
- Roslynator 2022 remains available as the last 4.x VSIX
- Visual Studio Code extension ships refactorings and compiler diagnostic code fixes only (PR)
- Analyzers require Roslynator NuGet packages
- Requires OmniSharp with Roslyn 5.x (C# extension 1.39.15+; set
dotnet.server.useOmnisharptotrue)
Removed
- Remove leftover implementations of obsolete analyzers (XML descriptors remain). Enable the successor rules instead: RCS0014 → RCS0061, RCS0022 → RCS0021, RCS0038 → RCS0015, RCS0043 → RCS0020, RCS0047 → RCS0053, RCS1008/RCS1009/RCS1010/RCS1012/RCS1176/RCS1177 → RCS1264, RCS1035 → RCS1260, RCS1036 → RCS0063, RCS1038/RCS1040/RCS1041/RCS1066/RCS1072/RCS1091/RCS1106 → RCS1259, RCS1063/RCS1064/RCS1065 → RCS1252, RCS1100/RCS1101 → RCS1253, RCS1237 → RCS1254.
- Remove
SyntaxInverter(Roslynator.CSharp.Workspaces). UseSyntaxLogicalInverter. - Remove unused obsolete
DiagnosticCategoriesconstants and make the typeinternal. - Remove unused
ROS0001/ROS0002diagnostic IDs. - Remove obsolete constructors/properties from the testing package (
DiagnosticTestData,CompilerDiagnosticFixTestData,RefactoringTestData). - Remove legacy config keys
roslynator.max_line_length,roslynator.prefix_field_identifier_with_underscore, androslynator_suppress_unity_script_methods. Useroslynator_max_line_length,roslynator_prefix_field_identifier_with_underscore, androslynator_unity_code_analysis.enabled. - [CLI] Remove obsolete command
generate-doc-root. Usegenerate-doc --root-file-pathinstead. - Remove bundled analyzers from Visual Studio extension (PR)
- Use Roslynator.Analyzers NuGet package for diagnostics
- Remove bundled analyzers from Visual Studio Code extension (PR)
- Use Roslynator NuGet packages for diagnostics
- Remove
AnalyzersOptionsPagefrom Visual Studio extension (PR) - Drop support for Visual Studio 2022 VSIX (PR)
- Pin last 4.x release (Roslynator 2022) or use NuGet packages on Visual Studio 2022
Fixed
v4.16.1
Fixed
- Fix analyzer RCS1060 to not report a file that contains only multiple partial declarations of the same type (PR)
- Fix analyzer RCS1231 to not suggest
inforref structparameters (#1725) (PR) - Fix analyzer RCS1260 false positive for
omit_when_single_lineon multi-line object/collection initializers (#1439) (PR) - Fix analyzer RCS0036 to report blank lines between single-line declarations in records (PR)
- Fix analyzer RCS1046 to report
async voidmethods withoutAsyncsuffix (PR) - Fix analyzer RCS1265 to not report catch clauses with a
whenfilter (PR) - Fix analyzer RCS0034 for types with a primary constructor and multiple constraint clauses (PR)
- Fix analyzer RCS1231 to not report
CancellationTokenin sync methods returningTask(PR) - [CLI] Fix GitLab output format to use relative paths, forward slashes, and 1-based line numbers (PR)
- [CLI] Fix
generate-docto omit internal interfaces from type declarations and the Implements section (PR)
v4.16.0
Added
- [CLI] Suppress error code from Roslynator when it detects issues in code but runs successfully (PR by @mdrybak)
Fixed
- Fix analyzer RCS1118 to not report local variable passed as 'in' argument (PR by @NoahStolk)
- Fix analyzer RCS1074 (PR by @cbersch)
- Fix enum contained flags check for partial matches in RCS1258 (PR by @ovska)
- Fix analyzer RCS1146 (PR)
- Fix analyzer RCS1194 (PR)
- Fix analyzer RCS1060 to ignore classes marked with
filemodifier (PR by @cbersch) - Fix analyzer RCS1231 (PR by @cbersch)
- Fix analyzer RCS1246 for conditional access expressions ([PR](#1772 by @krajek))
- [CLI] Fix
fixcommand ignoring--include/--excludefile filter (PR by @hashiiiii) - [CLI] Fix loading of projects and solutions on .NET 10 SDK (PR)
v4.15.0
Added
- Add option
roslynator_null_conditional_operator.avoid_negative_boolean_comparison(PR)- Do not suggest to use null-conditional operator when result would be
... != true/false - Applicable for RCS1146
- Do not suggest to use null-conditional operator when result would be
Fixed
- Fix analyzer RCS1172 (PR)
- [CLI] Fix
loccommand (PR) - Exclude ref-field backed properties from RCS1085 (PR by @ovska)
- [CLI] Fix
rename-symbolscope option not being applied correctly (PR by @andrtmschkw) - [CLI] Fix
rename-symbolsupport for top-level statement (PR by @andrtmschkw)
Changed
- Migrate to .NET 10 (including command-line tool) (PR)
v4.14.1
Added
- [CLI] Add support for
slnxfiles (PR by @darthtrevino)- Bump Roslyn to 4.14.0
- Drop support for .NET 7 SDK
Fixed
- Fix analyzer RCS1246 (PR)
- Fix analyzer RCS1248 (PR)
- Fix analyzer RCS1203 (PR)
- Fix analyzer RCS1043 (PR)
- Fix analyzer RCS1213 (PR)
- Add unity method
OnRectTransformDimensionsChange
- Add unity method
- Fix analyzer RCS1253 (PR)
- Fix refactoring Check expression for null (PR)
Changed
v4.14.0
v4.13.1
Added
- Support custom path of a test file (PR)
- It's possible to specify a directory path and/or a file name of a test file.
- Applies to testing library (Roslynator.Testing.*).