Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 2.34 KB

README.md

File metadata and controls

67 lines (45 loc) · 2.34 KB

Roslynator Command Line Tool

Commands

Packages

Roslynator.DotNet.Cli  NuGet

  • .NET Core global tool
    • cross-platform
    • can be run directly from command line
  • It is recommended to use this tool.
  • Version 0.2.0 or higher requires .NET Core SDK 5.0

Run following command to install it:

dotnet tool install -g roslynator.dotnet.cli

Roslynator.CommandLine  NuGet

  • Stand-alone application that requires .NET Framework (Windows only).
  • It can be used for .NET Framework projects (old style csproj).
  • Download package and run Roslynator.exe.

Exit Code

Value Comment
0 Success*
1 Not a success**
2 Error occurred or execution canceled

* No diagnostic was found (analyze command ) or all diagnostics were fixed (fix command) etc.

** A diagnostic was found (analyze command) or not all diagnostics were fixed (fix command) etc.

Which MSBuild Instance to Use

If you are using version 0.1.5 or lower it may be necessary to specify MSBuild instance - a directory where MSBuild binaries are located.

Roslynator.CommandLine

You should specify MSBuild instance that is part of Visual Studio installation. It should be similar to C:/Program Files/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin

Roslynator.DotNet.Cli

You should specify MSBuild instance that is part of .NET Core SDK installation. It should be similar to C:/Program Files/dotnet/sdk/3.1.200

See Also