Setting up GitHub Copilot in JetBrains Rider for C# and .NET development requires specific configuration steps beyond the default installation. Many developers find that Copilot suggestions are slow, incomplete, or missing entirely for .NET code. This happens because Rider must connect to GitHub Copilot through a plugin, and the plugin relies on the correct authentication and indexing settings. This article explains how to install the GitHub Copilot plugin in Rider, authenticate your GitHub account, and configure Rider for optimal C# and .NET code completions.
Key Takeaways: GitHub Copilot Setup in Rider for C#
- JetBrains Marketplace > GitHub Copilot plugin: Install the official plugin from the Marketplace tab in Settings > Plugins.
- GitHub account > Settings > Copilot: Verify your active Copilot subscription before authentication in Rider.
- Rider > Tools > GitHub Copilot > Enable Completions: Toggle this on after authentication to receive inline suggestions.
How GitHub Copilot Works in Rider for C# and .NET
GitHub Copilot is an AI pair programmer that suggests code snippets and entire functions based on the current file context. In Rider, Copilot operates through a dedicated plugin that communicates with GitHub’s servers. The plugin analyzes your open C# files, .csproj project files, and any .NET framework references to generate relevant suggestions. Prerequisites include an active GitHub Copilot subscription either Individual, Business, or Enterprise and JetBrains Rider 2022.3 or later. The plugin works with .NET Framework 4.7.2+ and .NET 6.0+ projects, including ASP.NET Core, Blazor, and MAUI applications.
Steps to Install and Configure GitHub Copilot in Rider
Method 1: Installing the Plugin from JetBrains Marketplace
- Open Rider and access Settings
Press Ctrl+Alt+S to open the Settings dialog. Alternatively, go to File > Settings on Windows or Rider > Preferences on macOS. - Navigate to Plugins
In the left pane, select Plugins. Then click the Marketplace tab at the top of the Plugins window. - Search for GitHub Copilot
Type “GitHub Copilot” in the search box. The official plugin by GitHub appears first. Click Install next to the plugin entry. - Restart Rider
After installation completes, click the Restart IDE button. Rider restarts and loads the plugin.
Method 2: Authenticating with Your GitHub Account
- Open the GitHub Copilot tool window
After restart, go to Tools > GitHub Copilot > Show Copilot Status. A tool window opens in the bottom-right corner. - Click the Sign In button
In the tool window, click Sign In. Rider opens your default browser to GitHub’s authorization page. - Authorize the GitHub Copilot plugin
Sign in to your GitHub account if prompted. Click Authorize JetBrains Rider to grant the plugin access to your Copilot subscription. - Return to Rider
After authorization, a confirmation page appears. Return to Rider. The tool window now shows a green checkmark and your GitHub username.
Method 3: Enabling Completions for C# and .NET Files
- Open the Copilot settings
Go to Tools > GitHub Copilot > Enable Completions. Ensure this option is checked. If unchecked, Copilot will not provide suggestions. - Adjust suggestion behavior
Go to Settings > Tools > GitHub Copilot. Under Completions, set Suggestion delay to Fast for immediate suggestions or Medium for a slight delay. For .NET projects, Fast works best for large solution files. - Test with a C# file
Open any .cs file in your project. Type a method name like public void CalculateTotal and press Enter. Copilot suggests the method body in gray text. Press Tab to accept.
Common Setup Issues and How to Resolve Them
Copilot Does Not Show Any Suggestions in C# Files
If Copilot remains silent despite being installed and authenticated, check the file language. Rider must recognize the file as C#. Open the file and look at the bottom-right corner of the status bar. It should display “C#”. If it shows “Text” or another language, click it and select C# from the list. Also verify that the .cs file is part of a project that builds successfully. Copilot relies on the project’s compilation context to generate relevant code.
Copilot Shows Suggestions for Non-.NET Frameworks
Sometimes Copilot suggests JavaScript, Python, or other language snippets inside C# files. This happens when the plugin misinterprets the file context. To fix this, close all non-C# files in the editor. Copilot uses the entire open file set as context. Also ensure that the Rider solution contains only .NET projects. Mixed-language solutions can confuse the plugin.
Authentication Fails with “Invalid Token” Error
This error occurs when the Copilot subscription is inactive or the token has expired. Go to GitHub.com > Settings > Copilot and confirm your subscription status is Active. If the subscription is active, revoke the Rider authorization in GitHub Settings > Applications > Authorized OAuth Apps, then repeat the authentication steps in Rider.
GitHub Copilot Free vs GitHub Copilot Pro vs GitHub Copilot Business for Rider
| Item | Copilot Free | Copilot Pro | Copilot Business |
|---|---|---|---|
| Monthly cost | $0 | $10 per user | $19 per user |
| C# and .NET completions | Limited to 300 suggestions per month | Unlimited suggestions | Unlimited suggestions |
| IDE support | Rider only | Rider and all JetBrains IDEs | Rider and all JetBrains IDEs |
| Code review summaries | Not available | Available in pull requests | Available in pull requests |
| Excluded file types | None | None | Admin can block specific file types |
Now you can install the GitHub Copilot plugin in Rider, authenticate your account, and enable completions for C# and .NET projects. Start by opening a .cs file and typing a common pattern like a LINQ query or a constructor to see suggestions. For large solutions with many projects, consider increasing the memory limit for Rider in Help > Edit Custom VM Options to prevent performance slowdowns.