ReSharper command line tools
ReSharper Command Line Tools is a set of free cross-platform standalone tools that help you integrate automatic code quality procedures into your CI, version control, or any other server.
The Command Line Tools package includes the following tools:
CleanupCode, which instantly eliminates code style violations and ensures a uniform code base
Install and use ReSharper command line tools as .NET Core tools
If you have .NET Core 3.1.0 or later on your machine, you can install and use ReSharper command line tools as .NET Core global and local tools.
Install ReSharper command line tools
To install ReSharper command line tools as a global .NET Core tool in the default location, run the following command line:dotnet tool install -g JetBrains.ReSharper.GlobalTools
In a build script, you can install it as a local tool to keep the operating system clean from unnecessary modifications. Using a tool manifest file, you can execute the following locally:# One-time locally dotnet new tool-manifest dotnet tool install JetBrains.ReSharper.GlobalTools # In the build script dotnet tool restore
Without a tool manifest, you can use the
For custom installation, refer to the documentation of the dotnet tool install command. For example, you can install a desired version of the tools from the .nupkg file in your current directory:dotnet tool install -g --add-source . JetBrains.ReSharper.GlobalTools --version 2020.3.0-*
As ReSharper command line tools are shipped in a single package, they will share the same command after the successful installation:
jb. You can provide the specific tool as the first parameter:
Run ReSharper command line tools
To find code issues in a solution, runjb inspectcode YourSolution.sln -o=<PathToOutputFile>
For more information and available command-line parameters, see InspectCode Command-Line Tool.
To reformat code and fix code style in a solution, runjb cleanupcode YourSolution.sln
For more information and available command-line parameters, see CleanupCode Command-Line Tool.