We are finalizing basic support for the latest C# 11 features:
We’ve added basic support for
UTF-8 literals. The code analysis now suggests
u8 suffix for a literal instead of the
System.Text.Encoding.UTF8.GetBytes() method or a byte array with proper
UTF8 symbols. There is also a set of compiler warnings and errors for
Basic support for file-local types includes understanding of the new
file accessibility modifier for types, and compiler warnings and
errors with corresponding quick-fixes, like Move class to outer scope when
file modifier is specified for a nested class. There is also a useful
context action to convert a general type to a file one.
ReSharper can now convert regular and verbatim strings into their raw counterparts. This also means that numerous existing features for strings are now available for raw strings.
In this release, we’ve introduced suggestions to use the new C# 11 list pattern syntax (instead of conventional collection length checks with subsequent indexer access expression) to check the corresponding items of the collection.
Starting from C# 11, you can use
virtual modifiers for
static members in interfaces and use such members in generic code with type
parameters constrained by this interface. ReSharper has been updated to handle
static members the same way ordinary polymorphic members are handled:
overridekeyword also include interface members, so now you can easily implement abstract or virtual static members.
ReSharper now recognizes the cumbersome code pattern that C# developers have to
write to perform an unsigned right shift for signed data types and suggests using
the unsigned right shift (
>>>) operator in C# 11 instead.
If you parse Spans of characters you probably use the
MemoryExtensions.SequenceEqual method a lot. C# 11 introduces a
shorthand for this kind of check. You can now simply pattern-match Spans
of characters against string literals with
ReSharper now suggests using
instead of lots of
Starting from C#11, you are allowed to declare
ref fields inside
structs. ReSharper supports this new syntax rule, provides all compiler errors and
warnings, shows a
ref keyword in the code completion, and allows such fields
to be initialized in a constructor.
ReSharper is also aware of a new scoped keyword which you can use on by-
ref struct arguments and local variables. The support includes correct
parsing of the new syntax, the
scoped keyword in code completion, and
preservation of the
scoped keyword when generating method overrides. It also
verifies the compatibility of
scoped modifiers and offers quick fixes for
scoped parameters on overrides, interface implementations, and
C# 11 and .NET 7 also introduced changes in the language's
ref safety rules.
The changes govern what operations are available for by-
variables in order to provide
ref safety in managed code with the introduction
ref fields. ReSharper is aware of the changes and will help you find the
parts of your project that need to be updated and annotated with the new
keyword to accommodate the changes when migrating to C# 11 or .NET 7.
With the 2022.3 release, we are introducing a couple of changes to the support for language injections:
Language injections now work inside C# 11 raw string literals.
There is a new gutter mark icon to notify users about implicit namespace imports in C# and Razor files.
By hitting Alt+Enter on the corresponding line, you can
observe the full list of implicit imports and information about the source file
where the corresponding global using directives are located. If you select a
particular imported namespace, ReSharper can navigate you to where it's declared,
including navigation to
<Using Include="Some.NameSpace" /> tags in the
.csproj project file.
ReSharper also presents global imports from
_Imports.razor and allows
navigation to corresponding import definitions.
With the addition of
UInt128 numeric types in .NET 7,
we've updated our code completion format specifier suggestions.
We’ve also added missing support for
types from .NET 6, as well as the
Half half-precision floating point numeric
type introduced in .NET 5.
Sometimes after refactoring, your pattern-matching expressions may turn into trivial recursive patterns. At this point it may not be worthwhile to use the recursive pattern syntax at all, so ReSharper now offers the action of rewriting patterns into simpler expressions while preserving the original pattern-matching semantics.
Sometimes when you type after an invocation, you see hardly any meaningful
suggestions. This can happen if the invocation resulted in no value being
produced when the
void-returning method was invoked. Usually it takes a few
IDE actions to realize that (going back and navigating to the method declaration,
or hovering the mouse over the invocation). In this release we’ve introduced the
void hint item over this type of
void-returning invocation to give you
immediate feedback about the type resulting from the invocation. Accepting this
void item will add a semicolon after the invocation if the semicolon is missing.
Code highlights and squiggles in ReSharper 2022.3 received an overhaul. Due to a difference in internal logic, ReSharper used to come into conflict with Microsoft Roslyn’s code style analyzers, causing it to display overlapping highlighting, draw the same highlight in different spots, or double the squiggles. The differences in logic behind the majority of such instances have now been resolved, and for the rare outlier cases, there are errors with clear suggestions on how to resolve the conflict.
Whenever you’re using open-source NuGet packages in your solutions, there’s a risk
of opening your project up to security vulnerabilities. While there are outside
tools NuGet provides to screen for such threats, it’s infinitely more convenient
to have a tool like that right in your IDE to catch any vulnerabilities during
design time. That’s why we're introducing vulnerable dependency detection in
ReSharper. Starting with this release, any affected dependencies will be
ReSharper can be integrated into Microsoft Visual Studio on ARM-powered devices. We’re providing initial support for all basic development workflows except spell-checking with ReSpeller.
The installer has been updated to include support for both x64 and ARM64. The correct version will automatically be installed in accordance with the processor architecture of your machine.
dotPeek, dotMemory, dotTrace, and dotCover, as well as ReSharper command-line tools, now support Windows ARM64.
Embedded decompiler in ReSharper 2022.3 comes with support for:
static virtualmembers in interfaces;
The IL Viewer tool window is now able to decompile code into different levels of C# language constructs. There are two C# levels available: high-level, with certain syntax constructs simplified using the latest language features, and low-level, for cases when you want to know how these syntax constructs are desugared.
ReSharper now allows you to save and import type and project dependency diagrams in the GraphML format, preserving the ability to use the diagram as a code map and to navigate through dependencies quickly.
Dynamic Program Analysis (DPA) has new inspections that let you find various issues related to database usage, namely:
The new inspections are available for all applications that use Entity Framework Core and a .NET data provider for SQL Server.
ReSharper C++ 2022.3 adds experimental support for C++20 modules. We've updated the language engine and many of the ReSharper C++ features to work with the new compilation model, supporting both named modules and header units.
ReSharper C++ 2022.3 provides seamless integration with clang-format. You can now switch between ReSharper’s own formatting engine and the built-in or a custom clang-format binary for formatting files. ReSharper C++ runs clang-format in a separate process, ensuring full compatibility with the industry-standard formatter, as well as better performance and a more extensive range of formatting options.
Free 30-day trial available