This functionality relies on the AI Assistant, which requires a separate license.
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:
AI completion suggestions appear as gray text. You can press Tab to accept a suggestion or continue typing to ignore it.
note
Note that there may be some unresolved symbol references in the generated code because of missing project references or using directives. In most cases, these are easy to fix: press AltEnter on a highlighted reference and choose Import missing references in file.
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 Alt0/.
Alt0/ 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.