Copy code reference to clipboard
When you need to log or share the context of the current location, such as the name of the symbol under the caret or its XML-documentation ID, the path to the file or the VCS path, you can press Control+Alt+Shift+C and copy the desired reference from a popup:
Copy symbol name
When you invoke this command on any symbol (declaration or usage), it automatically copies its fully-qualified name to the clipboard. If you need the name or namespace only, you can choose those in the popup.
You may need the fully-qualified name of a symbol in different situations, for example, when you use reflection.
Copy XML-Doc ID
When you invoke this command within a namespace, type, or a member, you can choose XML-Doc ID from the popup to copy the XML-documentation ID of the enclosing entity. You can use this ID when referencing this entity in XML-doc comments of other symbols. For more information about the ID format, see Processing the XML File (C# Programming Guide).
For example, for the method MyMethod
declared as
the XML-doc ID will be M:MyNamespace.MyClass.MyMethod
Copy paths and external links
You can also copy the path to the current file and line in any format. By default, there are two formats:
Path to the current line from the solution root, for example MyProject\MyFile.cs:25, and
If the current file is in a Git repository with GitHub as remote, you can choose to copy the GitHub URl to the file from the popup. For example: https://github.com/user/repo/blob/id/MyProject/src/MyFile.cs#L25.
You can also make a selection before invoking this action to have the link with a highlighted selection right on GitHub.
To copy paths and links in a custom format, configure the URI patterns on the Alt+R, O).
page of ReSharper options (This way you can copy links to your code that will work with online code browsers such as JetBrains Upsource or Roslyn-based source browser.
This feature is supported in the following languages and technologies:
The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by language section.