ReSharper 2020.2: Improved Code Analysis for C# 8, Code Cleanup on Save, and Revamped Unit Test Runner
Read this post in other languages:
Today we’re excited to give you ReSharper 2020.2! This major release introduces new inspections and quick-fixes for C# 8, most notably for nullable reference types, a much-awaited Code Cleanup on Save, a revamped Unit Test Runner, and various accessibility improvements.
Since the ReSharper license now covers both ReSharper and ReSharper C++, support for C++/CLI – a bridge between the languages – is getting a lot of updates and improved interoperability between C++/CLI and C#.
Read through the major updates of all the JetBrains .NET tools and extensions:
Also, visit our What’s New page for the full release notes.
C# 8 support has been improved with a number of new inspections and quick-fixes, most notably for nullable reference types. For instance, code analysis now takes into account JetBrains.Annotations attributes (both
CanBeNull) for API declared in code where nullable reference types are disabled (
Also, nullability code analysis is now aware of more cases and can trace incorrect nullability through deconstruction and the
foreach cycle. It also provides a corresponding quick-fix.
Code Cleanup on Save
Finally, you can set up ReSharper to launch Code Cleanup automatically on saving a file! We’ve also added more granular scopes to run Code Cleanup for recently modified or recently opened files.
Revamped Unit Test runner
We’ve remade our Unit Test runner from scratch for both .NET Framework and .NET Core, which allows us to use the same runner for both runtimes that run out of the Visual Studio process. This has helped us solve quite a lot of problems with discovering, running, and debugging unit tests, and gives us full control over unit test hierarchies for .NET Core tests. What’s more, the new test runner has built-in MSFakes support for the NUnit, xUnit, and MSTest v2 unit test frameworks.
In other news:
We have good news for UWP developers – support for compiled bindings with
x:Bindis finally here!
This release comes with improved support for screen readers like JAWS, NVDA, and Microsoft Narrator.
Type and project dependency diagrams have been updated. The yFiles engine, which is used to draw the graph, has been updated to the latest version. This, in addition to our optimizations, means the resulting graph is drawn much faster. Also, you can export the graphs to new file formats, GraphML and XPS.
Navigating to usages of types from external assemblies in the code is now much easier. ReSharper can navigate directly from Go to Type search results to Find Usages.
New Peek actions have been added to show the result of some common ReSharper actions in a Peek Definition view.
- We have updated our offline and online installers to cover all products under the dotUltimate license, which includes ReSharper, ReSharper C++, JetBrains Rider, dotCover, dotTrace, dotMemory, and dotPeek.
Improved Unreal Engine features
ReSharper C++ 2020.2 introduces support for the Unreal Engine project model, which brings smarter auto-import for include directives and support for different solution configurations. To match the Unreal Engine coding standard, we’ve also included several updates to inspection severities and code generation actions.
Better C++/CLI support
We’ve updated C++/CLI support to improve interoperability with C# code, and we’ve added a set of code inspections for the sealed, gcnew, and safe_cast usages. Upgraded search and navigation features now work on imported CLR entities and allow you to look for derived symbols in C# code.
See the ReSharper C++ 2020.2 blog post for more details.
Command Line Tools 2020.2
- ReSharper command line tools now run .NET Core on Windows, Linux, and macOS, and you can install them as .NET Core Global Tools.
- dotTrace, dotCover, and dotMemory command-line tools for Linux (Debian and Ubuntu) can perform analysis on ARM64 systems.
- In the dotCover console runner, the
--reportype=SummaryXmlparameter lets you create a new Summary report type, which includes data on how many classes, methods, and statements are covered in total. Now, the runner can generate reports of several types at once.
- The dotTrace console profiler lets you control the profiling session (take snapshots, detach from the profiled process, and so on) by sending commands to stdin or to a file.
- The dotMemory command-line profiler is now also available on Linux and macOS, in addition to Windows.
Both standalone dotTrace and dotTrace in Rider can profile the native part of Mono/Unity applications on Windows. Start a session with the ‘Enable native profiling’ option selected, and you’ll see both native and managed call stacks in the performance snapshots.
- Improved NuGet support: NuGet v3 package feeds are now supported in Open from NuGet, Open from NuGet packages cache, and Open NuGet packages.config.
- The new release brings support for the most recent version of C#, including the following language features:
- Expression-bodied members
- Default parameters and named arguments
See the full list of fixes completed in the 2020.2 release cycle on YouTrack.
Visit our What’s New in ReSharper page for the full list of improvements. Let us know what you think of this release and please share your feedback here in the comments, in our issue tracker, or on Twitter!
You can use any of these alternative ways to get ReSharper 2020.2:
- Download and install from www.jetbrains.com.
- Update right inside ReSharper: ReSharper | Help | Check for updates.
- Use our Toolbox App.