ReSharper Platform SDK Help

Creating A Plugin

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 File | New | Project... action and provide the following information:

  1. Download the plugin template from the GitHub Release page.

  2. Install the plugin template by calling:

dotnet new --install JetBrains.ReSharper.SamplePlugin.*.nupkg

  1. Unpack the template with your preferred plugin name:

dotnet new resharper-rider-plugin --name MyPlugin

    Template-Generated Files

    When extracting the template, for instance with --name MyPlugin, it will create the following directory content:

    MyPlugin ├── .github │ └── wrapper │ ├── CI.yml │ └── Deploy.yml ├── .run │ ├── rdgen (Unix).run.xml │ ├── rdgen (Windows).run.xml │ ├── rdgen.run.xml │ ├── Rider (Unix).run.xml │ ├── Rider (Windows).run.xml │ ├── Rider - Frontend (Unix).run.xml │ ├── Rider - Frontend (Windows).run.xml │ ├── Rider.run.xml │ └── VisualStudio.run.xml ├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── protocol │ ├── src/main/kotlin/model/rider │ └── build.gradle ├── src │ ├── dotnet │ │ ├── ReSharperPlugin.MyPlugin │ │ │ ├── IMyPluginZone.cs │ │ │ ├── ReSharperPlugin.MyPlugin.csproj │ │ │ └── ReSharperPlugin.MyPlugin.Rider.csproj │ │ ├── ReSharperPlugin.MyPlugin.Tests │ │ │ ├── ReSharperPlugin.MyPlugin.Tests.csproj │ │ │ ├── TestEnvironment.cs │ │ │ └── test │ │ │ └── data │ │ │ └── nuget.config │ │ ├── Directory.Build.props │ │ └── Plugin.props │ └── rider/main │ ├── kotlin/com/jetbrains/rider/plugins/myplugin │ └── resources │ └── META-INF │ └── plugin.xml ├── tools │ ├── nuget.exe │ └── vswhere.exe ├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── README.md ├── ReSharperPlugin.MyPlugin.sln ├── build.gradle ├── buildPlugin.ps1 ├── gradle.properties ├── gradlew ├── gradlew.bat ├── publishPlugin.ps1 ├── runVisualStudio.ps1 ├── settings.gradle └── settings.ps1
    • 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-only template 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 RIDER_PLUGIN_ID and RESHARPER_PLUGIN_ID as placeholders that can be updated after the first deployment.

    • The .github/workflow directory (requires --github-actions during template extraction) with predefined workflows for a continuous build (including Build and Test) and a deployment build.

    Last modified: 20 April 2023