Use this command to navigate to the declaration of a symbol from any symbol usage. You can invoke this command from the Solution Explorer, Structure window, and other tool windows.
To navigate in the opposite direction (symbol usages) you can use the Go to Usages of Symbol command.
tip
You can also navigate to the declaration of a type of a variable or return type of a method. For more information, refer to Go to Type Declaration.
Navigate to a declaration of a symbol
Place the caret at a symbol in the editor or select the symbol in the Structure tool window.
Choose Navigate | Go to Declaration in the main menu, press F12, or click the symbol while holding the Ctrl key.
If the command returns a single result, JetBrains Rider navigates directly there. In case of multiple results, they will be listed in a drop-down where you can do one of the following:
Click the desired item to open it in the editor.
Select the desired item by pressing Up and Down and then press Enter to open it in the editor.
To view and analyze the list of matched items in the Find window, click Open in Find Tool Window, press Shift+Enter or + on the numeric keypad .
tip
By default, Go To Declaration works with Ctrl + left-click and with the middle button click.
tip
If you want to view the declaration of symbol without leaving your editing position, use Quick DefinitionAltF12
If the item you navigate to belongs to the current solution, JetBrains Rider opens the corresponding file in the editor and places the caret at the symbol declaration. If it is in referenced libraries, JetBrains Rider navigates according to the settings defined on the Tools | External Symbols page of JetBrains Rider settings CtrlAlt0S.
tip
This command is also available in the Navigate To menu Alt0`.
Invoke this command on declarations
As Go to Declaration (including its Ctrl-click access) is one of the most frequently used commands, JetBrains Rider streamlines your navigation experience letting you use this command in navigation scenarios related to usages of the declared symbol, so you can invoke Go to Declaration even if your caret is already at a symbol declaration to study symbol usages.
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.