ReSharper 2022.1.x

Released: Apr 19, 2022

Updates in 2022.1.x

2022.1.2

Updated Jun 3, 2022

Fixes

  • Fixed the Ctrl+. hotkey for Visual Studio’s Show smart tag action, which had been affected by the previous version of ReSharper.
  • Updated ReSharper’s initial event buffer size in Visual Studio 2022, which helped get rid of some small hangs when canceling the build process.

2022.1.1

Updated Apr 29, 2022

Fixes

  • Fixed the Stack Trace Explorer that had difficulty working with multitarget projects.
  • Fixed an error that emerged when the test method’s name is set to the same as the value of the [TestName] attribute.
  • Fixed the inconsistency between the states of the unit test session and tests generated with the [DynamicData] attribute.
  • Fixed the issue that led to the inherited [Category] not being shown in the Unit Test Explorer.

2022.1

Updated Apr 19, 2022

Features

  • C# support
    • Improve support for C# 10, particularly global usings. Added two new refactorings that are also available as context actions.
    • Extract Global Using can help you to introduce the concept of global usings in your project. You can invoke it on a regular using directive, and ReSharper will suggest extracting it to a designated GlobalUsings.cs file (if there’s no such file in your project yet, it will be created). The regular using that is no longer needed will be removed from the files in your project.
    • If you decide to refactor a global using into a regular using, Inline Global Using refactoring can help here, too. When called on a global using, it removes it from the GlobalUsings.cs and adds the corresponding using statement to the files in your project where required.
    • The global using feature is supported in Find Usages and in code analysis for extension methods.
  • Nullable reference types
    • Warnings for null checks on expressions that should never be null into two categories have been split. The first warning is for expressions that are never null because an NRT annotation says so. The second warning is for expressions where there's an actual runtime check for null.
    • Added a new setting for switching to runtime enforced not null warnings only mode. It is accessible from the configuration item group in the Alt+Enter menu for annotation-based warnings.
    • [MemberNotNull] and [MemberNotNullWhen] annotations are now supported in projects that don't use nullable reference types.
  • Endpoints
    • Endpoints support now works for Microsoft ASP.NET Core 6 minimal APIs and convention-based routing. It includes navigation, code analysis, and code completion.
  • Razor and Blazor
    • Added support for the new [EditorRequired] attribute from Microsoft .NET 6. The corresponding inspection and quick-fix are also available if you try to use a Blazor component without specifying the required parameters.
    • Added support for C# local functions inside Razor syntax.
    • Improved the Code Cleanup in .razor files with Blazor components. It no longer removes all @using declarations.
    • Added navigation through inheritance hierarchy to Razor code. The corresponding gutter marks are now shown for base and derived symbols. You can click them to navigate to the code.
  • Code Cleanup and Formatting
    • Reorganized all the items in the Alt+Enter menu related to Code Cleanup and Formatting.
    • The Format selection, Cleanup selection, and Apply syntax style have been combined into one Reformat and Cleanup item to provide a single entry point.
    • In addition to these changes, the syntax style settings are now available in the Configure code style and Autodetect code style settings actions. The Preview code style panel shows changes in syntax style as well.
  • Unreal Engine unit tests
    • The Unreal Engine testing framework is now supported. ReSharper C++ discovers Unreal Engine unit tests and adds the corresponding action indicators next to each test in the editor to run or debug the test or the whole test suite. In the Unit Test Sessions window, you can review the results of the tests, and rerun failed, all, or specific tests.
  • Even better C++ support
    • ReSharper C++ is now better at handling implicit constructor calls, allowing you to find usages and navigate to the called constructor in more cases, including the following:
      • Standard (make_unique/make_shared) and Unreal-specific (MakeShared/MakeUnique) smart pointer creation functions.
      • emplace-like container methods.
      • static_cast and c-style cast expressions.
    • This release also shows you an overloading warning when an emplace-like function is called with incorrect arguments.
  • Source generators
    • Increased the delay between requests when fetching source-generated documents from the compiler. The source generators are not run before the compiler and the total amount of CPU work is reduced.
  • ReSharper Command Line Tools
    • The InspectCode tools can now generate output files compatible with Static Analysis Results Interchange Format (SARIF).
    • Command line tools now support Alpine Linux.
  • Decompiler
    • The integrated decompiler now shows XML doc comments for platform assemblies, including assemblies whose names differ from the names of the XML documentation files, for example, System.Private.CoreLib. The path to the XML documentation is now displayed in the decompiled file’s header.
    • Turned off navigation retargeting in the Metadata view.
    • Added decoded / raw blob presentations in the properties for blob nodes.
    • The Assembly Explorer now supports forwarded types (the [TypeForwardedTo] attributes). The Locate in Metadata action also works for forwarded types, assembly and module references, and resources.
    • Improved the PDB navigation for types without sequence points, for example, interfaces and enums.
  • Other updates
    • Improved the Move type to file refactoring, which also includes a context action and quick-fix. Preprocessor directives are now moved along with the type in common cases.
    • Added the Metadata tree view into ReSharper (only for Visual Studio 2022). It allows you to browse all the items inside the assembly metadata and provides search, navigation to sources, and more.

Fixes

  • Razor and Blazor
    • Fixed the If To Switch and Invert If context actions in Razor code with references to Blazor components.
    • ReSharper now uses the correct naming style for Blazor injected properties.
    • The Comment with Line Comment action now comments only the part of the Razor code you’d expect it to.
  • Performance
    • Fixed a number of performance issues already and laid the groundwork for more. This includes dealing with performance snapshots from our customers, in-house profiling sessions, and gathering data to hopefully implementing automatic checks for performance degradations in the future.
  • Other updates
    • Fixed the “massive file system change” problem. It turned out to be an event buffer overflow. It caused ReSharper to review all files in the solution without any real cause, and that led to high CPU usage and, in some severe cases, UI freezes.
    • Fixed the issue that hampered ReSharper’s functionality in .sqlproj files in localized Visual Studio.
    • Addressed several long standing problems with “ReSharper shows red code on switching Git branches”.