-
Download package Roslynator.CommandLine
-
Extract package (for example to
C:\\roslynator
) -
Open Command Line Prompt (cmd.exe)
-
Change directory to directory where roslynator.exe is located (for example
C:\\roslynator\\tools\\net461
) -
Execute following command:
roslynator fix SOLUTION
Roslynator will use analyzers and code fixes that are referenced as NuGet packages.
It will not use analyzers and code fixes that are part of Visual Studio extensions.
If you want to use these assemblies you have to use --analyzer-assemblies
option. For example:
roslynator fix SOLUTION --analyzer-assemblies ANALYZER_ASSEMBLY PATH_TO_DIRECTORY_WITH_ANALYZER_ASSEMBLIES
roslynator fix SOLUTION -p CodeAnalysisRuleSet=FULL_PATH_TO_RULE_SET
It is necessary to specify full path to rule set as each project has different working directory.