.NET Tools
Essential productivity kit for .NET and game developers
ReSharper 2018.2 – Navigation updates
In the latest versions of both ReSharper and Rider, we’ve made several improvements related to navigation and search. Let’s have a look!
Local functions in File Structure and Go to containing declaration
It’s been a while since local functions were introduced in C# 7.0. As many developers are making use of them for various purposes, we have expanded support for them in ReSharper and made it easier to navigate to local functions.
For example in the File Structure tool window (Ctrl+Alt+F), local functions are now displayed as first-class citizens. We can navigate directly to a local function from this tool window: no more need to scroll trough code to find a specific local function.
Similarly, Go to containing declaration (Ctrl+[) now helps us to quickly navigate to the declaration of local function from any position within its body.
Local functions are also supported in other navigations such as Go to Next/Previous Member (Alt+Down / Alt+Up).
Smarter Search Everywhere for function signatures
Using ASP.NET and getting a “yellow screen of death” displaying an exception and stack trace? ReSharper comes with an excellent Stack Trace Explorer that helps to display and navigate stack traces copied from the clipboard.
However, sometimes it may be useful to search for “just one line”. Let’s say our stack trace contains a line:
at ConsoleApplication1.PeopleRepository.GetAll(String) in c:\code\ConsoleApplication1\ConsoleApplication1\PeopleRepository.cs:line 15
With ReSharper 2018.2, we can now copy ConsoleApplication1.PeopleRepository.GetAll(String)
and navigate directly to the correct method overload in our codebase, using Search Everywhere (Ctrl+T):
Note that Search Everywhere will be able to find both of these variants:
// Search Everywhere can find this variant: ConsoleApplication1.PeopleRepository.GetAll(String) // And this variant as well: ConsoleApplication1.PeopleRepository.GetAll(String) in c:\code\ConsoleApplication1\ConsoleApplication1\PeopleRepository.cs:line 15
Ignore files in search and navigation using file mask
Sometimes, it can be useful to exclude certain files and folders from ReSharper’s search and navigation. For example when doing web development, we may want to exclude the node_modules
folder in case we don’t see ourselves navigate to library files. Another scenario that could be useful for Windows Forms developers could be excluding all *.Designer.cs
files in our solution.
While it was already possible to exclude files and folders for search and navigation in ReSharper, we have now added wildcard support. So that second example now works, too! In the ReSharper settings under Environment | Search & Navigation under Elements to skip, we can specify files and folders that will be ignored by navigations:
Different wildcard formats are supported:
?
will match one character*
will match one or more characters**
will match files and folders recursively
Grab the latest ReSharper 2018.2 and give it a try! Or try out Rider 2018.2 – our standalone .NET IDE. We’d love to hear your feedback!