ReSharper 2024.3 Help

Generate code with AI

In each new line of code that you are going to write, AI Assistant can generate suggestions ranging from a single line to multiple statements implementing some logic according to the surrounding context and symbol names. In the example below, AI Assistant suggests an implementation of a method based on its name and parameter:

ReSharper: AI code completion

AI completion suggestions appear as gray text. You can press Tab to accept a suggestion or continue typing to ignore it.

AI code completion is enabled by default, and if you also have IntelliCode or GitHub Copilot enabled in Visual Studio, ReSharper's AI completion will take priority over suggestions from those systems. By default, AI code completion suggestions also appear as soon as you move the caret to a new line.

You can disable ReSharper AI code completion by clearing the Enable AI code completion checkbox on the AI Assistant | General page of ReSharper options Alt+R, O. If you want to use ReSharper AI code completion on demand, clear only the Invoke automatically on new line checkbox on that page; you will still be able to generate AI completion suggestions by pressing Alt+/.

Alt+/ will only work if you have selected one of the default keyboard shortcut schemes. If you have not, select one of the schemes on the Environment | Keyboard | Shortcut Scheme page of ReSharper options Alt+R, O and click Apply Scheme.

You can also configure a custom shortcut AI code completion: open Visual Studio options (Tools | Options | Environment | Keyboard) and look for the ReSharper_CompleteWithAI.

Last modified: 11 February 2024