Creating Your First Plugin
This documentation section will help you get started with developing ReSharper and Rider plugins. You can use either JetBrains Rider or Microsoft Visual Studio (with or without ReSharper) as your IDE (it is highly recommended to use the latest available version). Please refer to the Rider Web Help or ReSharper Web Help to become more familiar with the products.
Creating ReSharper and Rider Plugins
Creating new ReSharper and Rider plugin projects is performed using the dedicated
dotnet new template. The generator creates all the necessary project files based on a few template inputs.
Create ReSharper & Rider Plugins
Launch the New Project wizard via the action and provide the following information:
Download the plugin template from the GitHub Release section.
Install the plugin template by calling:
dotnet new --install JetBrains.ReSharper.SamplePlugin.*.nupkg
Unpack the template with your preferred plugin name:
dotnet new resharper-rider-plugin --name MyPlugin
Components of the Template-Generated Plugin
When extracting the template using
MyPlugin as a name, it will create the following directory content:
The gradlew and gradlew.bat files to bootstrap running Gradle on Windows, macOS, and Linux. These will also automatically install the required Amazon Corretto 11 SDK into the build/gradle-jvm directory.
The build.gradle file to build and deploy the plugin for ReSharper and Rider.
The buildPlugin.ps1 and publishPlugin.ps1 files to build and deploy only the ReSharper plugin.
The gradle.properties, settings.ps1, plugin.xml, and Plugin.props files, containing information about plugin metadata (id, description, authors), dependency versions (ReSharper/ Rider SDK), and paths to solution and project files.
The Run/debug configurations for Rider/IntelliJ IDEA (.run directory) and the runVisualStudio.ps1 for PowerShell (
--resharper-onlytemplate extraction) to launch the plugin in an experimental instance of Rider or Visual Studio with ReSharper.
The src/dotnet directory with basic project files for ReSharper and Rider including a test project. The Directory.Build.props defines all common NuGet references for both.
The README.md and CHANGELOG.md files for documentation about the plugin. The first section of the CHANGELOG.md is automatically included in the plugin metadata. The README.md has predefined Shields.IO badges with
RESHARPER_PLUGIN_IDas placeholders that can be updated after the first deployment.
Running ReSharper and Rider Plugins
A plugin generated from the template can be run through one of the Run/debug configurations or from the command-line on Windows, macOS, and Linux systems.
Running from the Command-Line
On Windows systems, you can run the plugin in Rider or Visual Studio with ReSharper.
For macOS/Linux, you can run the plugin in Rider:
Running from Run Configurations
The included run configurations are shortcuts for the aforementioned command-line invocations. Choose one of the following configurations in Rider and click Run or Debug:
Rider (Unix)– Launches Rider on Unix-systems (macOS/Linux). Automatically compiles the frontend part using IntelliJ SDK.
Rider (Windows)– Launches Rider on Windows. Automatically compiles the frontend part using IntelliJ SDK.
VisualStudio– Launches Visual Studio with ReSharper.
If your plugin has a frontend part, you will see a unified
Rider configuration in IntelliJ IDEA that works cross-platform.
Publishing ReSharper and Rider Plugins
./publishPlugin.ps1 -Version <Version> -ApiKey <ApiKey> [-Configuration <Debug|Release>]
./gradlew -PPluginVersion="<Version>" -PPublishToken="<Token>" [-PBuildConfiguration=<Debug|Release>]