What’s New in Rider

Rider 2021.3 comes with official support for the .NET 6 SDK, including the Hot Reload feature. It brings a completely redesigned main toolbar and Debug tab, and a new Problems View tool window. Rider also supports more C# 10 features, like file-scoped namespaces and global using directives, to help you use the latest language capabilities more effectively.

It also has updates for Unity and F# support, Reformat and Cleanup on save, XAML Preview for the .NET 6, .NET 5, and .NET Core 3.x SDKs, and support for Apple silicon chips.

Download

Free 30-day trial

.NET 6 SDK support

Rider 2021.3 officially provides support for .NET 6 SDK, including:

  • Project templates.
  • The latest target frameworks.
  • The latest NuGet API.
  • Hot Reload.
  • Blazor WebAssembly debugging.
  • Creating/running/debugging projects targeting the new SDK.
  • ASP.NET scaffolding for .NET 6 projects.

Rider also offers early support for Xamarin iOS and Xamarin Android projects that are part of the .NET 6 SDK.

Hot Reload

Rider supports the .NET 6 Hot Reload feature! When you modify managed source code in your app while the app is running, Rider will ask you whether you want to apply this change to the running app without restarting it. Look out for the yellow Sources are modified notification bar at the top of the text editor. If you accept the change, your app will be updated on the fly and you can continue working with the updated app.

Hot reload is automatically enabled when using .NET Project and .NET Launch Settings Profile run configurations.

There is a new dedicated page for enabling and disabling the Hot Reload feature: Preferences/Settings | Build, Execution, Deployment | Hot Reload.

Limitations:

  • Debugging during a Hot Reload session is only available on Windows, where you can use Hot Reload together with the debugger and automatically apply changes on step and resume. Hot Reload works across platforms when not debugging.
  • Hot Reload does not support F# and VB.NET applications. Additionally, Hot Reload does not support changes made to the UI formats in frameworks like WPF, Windows Forms, and .NET MAUI. Blazor WebAssembly (WASM) is also not supported yet.
  • To display the changes you've made to Razor Pages, you need to reload the page in your browser. Automatic page reloading will be added in future releases.

Learn more: Hot Reload for .NET 6 in Rider 2021.3

UI/UX

Redesigned main toolbar

The old main toolbar had some problems that we wanted to eliminate. There were too many icons, most of which were hardly ever used. The VCS and navigation functionality was not discoverable. And most importantly, it was not possible to control multiple run configurations.

Rider 2021.3 comes with a completely redesigned main toolbar. With the new design, we've tried to deliver a clean yet functional toolbar to our users. It includes the following:

  • Back and Forward buttons, which are the basics of contextual navigation for Rider.
  • A VCS widget for accessing and operating all VCS-related features. This widget is now located closer to the Commit tool window.
  • A large Search Everywhere field that serves as the main entry point for the global search function.
  • A Solution Configuration widget for managing solution-related configurations.
  • A new Run/Debug widget that allows you to easily manage and control your run configurations.

However, since we don’t want to disrupt the flow of Rider users who are already comfortable using the old toolbar, the new one will be enabled by default only for new Rider installations. If you already have Rider installed but want to give the new toolbar a try, you can enable it anytime under View | Appearance | Toolbar instead of Toolbar Classic.

Problems View

Having all the potential problems for a solution in one place can be helpful, which is why we are happy to introduce the Problems View! The Problems View (the Problems tab in the Rider UI) is a tool window that aggregates all of the potential issues that exist in a solution, such as project loading errors, failed NuGet restore processes, inspections from an open file, and all the SWEA errors. The tool window consists of three tabs.

Current File

Here, you can find all of the errors, warnings, suggestions, and hints that Rider code analysis found in the file you are currently working with. It works the same as it does in our IntelliJ-based IDEs – the Inspection widget located at the top of the vertical scrollbar leads directly to this tab.

Toolset, Environment

This tab aggregates all the diagnostics and messages related to the solution load activities, NuGet restore processes, and so on. For each problem, it offers a proper description and a corresponding list of fixes, if any exist. Previously, you would have needed to open the Event Log tool window to find details for these kinds of diagnostic messages.

All Solution Files

This is the new home for the SWEA tool window. Here, you can see all the errors that Solution Wide Error Analysis found in the whole solution.

New Bookmarks tool window

We’ve introduced the new Bookmarks tool window that is destined to replace a similar instance – Favorites.

When you add a bookmark, by default Rider puts it in the node named after your project in the Bookmarks tool window. Every time you add a new bookmark, it will appear at the top of the list inside this node. You can also create new nodes and drag and drop items in them.

Debugger

New UI for the Debug tab

A new UI is coming to the Debug tab! We have a lot of changes to talk about.

By default, there are three tabs: Threads & Variables, Console, and Debug Output. Other tabs like Memory and Parallel Stacks are hidden, but you can show them via the Options Menu (the cog wheel icon on the far right).

We completely removed the left-hand toolbar and moved the icons that were located there to either the top toolbar or the context menu. To keep the top toolbar as compact as possible, we reordered the icon set and left only the most important actions visible. The rest of the icons were moved to the More dropdown menu (the vertical dots icon). The Hide Frames from Libraries icon and the Hide/Show Threads toggle have been moved to the context menu in the Threads view.

The More dropdown menu has a new Settings submenu. Here, you can find a shortlist of the most common settings related to the debugger without having to search for them by going to the Settings/Preferences dialog and drilling down into the Build, Execution, Deployment | Debugger page.

Updates to the Immediate window

There are two layouts: maximized and minimized. In the minimized layout, the Variables view displays the execution result only in the $result variable. In the maximized layout, in addition to the $result variable, you can see the history of the previously executed lines as well as their results. You can toggle between the layouts using the Expand/Collapse icon.

Add Watch has been moved from the Variables view to the Immediate window toolbar, and it now has a shortcut, Ctrl+Shift+Enter.

The new Stop on Breakpoints option forces the evaluating process to stop at the breakpoints when executing an expression. Disabling this option will allow the evaluating process to ignore the breakpoints.

To make evaluating an object with lots of properties more convenient, we’ve added an Evaluate icon here that opens the Evaluate window with this object already evaluated. It’s much easier to look through the object’s properties as a tree in that window.

Debugging for UWP apps

There is good news for UWP developers: you can start your UWP project with the debugger attached right away. You no longer need to run the project first and then manually attach the debugger to the running process.

Support for Windows Docker containers

You can now debug both .NET (Core) and .NET Framework apps in local Windows Docker containers. Previously, the debugger could work only with .NET Core apps in Linux Docker containers.

Other updates

When you create a standard delegate (System.Func or System.Action), you can easily navigate to a method or a lambda expression that the delegate will wrap. Check out the Navigate link for the delegate's node in the Variables list.

When you create an event handler (delegate) using a lambda expression, the new visualizer allows you to investigate the subscribers and captured objects more closely.

The event handler now has a Subscribers node with a Captured variables subnode. To quickly navigate to where an event was subscribed to, we’ve added a new Navigate link for each subscriber.

Code analysis

C# 10

Rider continues to add more C# 10 features. Today, we are happy to add support for file-scoped namespaces, global usings, the CallerArgumentExpression attribute, the “interpolated string handlers” concept, and C# 10 lambdas.

Let’s start with file-scoped namespaces. In addition to supporting the new syntax itself, we’ve added a new Syntax style option that allows you to select your desired style (Settings/Preferences | Editor | Code Style | C# | Syntax Style | Code body | Namespaces). When you choose a style, Rider will show you inspections for code that has to be changed to follow the style, and it will suggest the appropriate quick-fixes for you. You can propagate the fixes through the project or even through the whole solution in one click.

There are now two context actions that allow you to return your code to the previous syntax style: Convert to file-scoped namespace and Convert to block-scoped namespace.

Learn more: File-Scoped Namespaces

Now let’s take a quick look at global usings. Rider code analysis is aware of usings marked with the global keyword, and it uses them to correctly resolve symbols in all the code files in the project. Rider will also notify you if a global using has been put in the wrong place in a file.

Rider will highlight global usings that have no usages in the project as unused, and it will offer a quick-fix to remove the statement.

Rider brings rich support for the CallerArgumentExpression attribute, including code completion and code inspections to help you use it properly.

Learn more: Caller Argument Expressions

C# 10 introduced the new concept of "interpolated string handlers". For end users, this means that string interpolation expressions generally work faster in .NET 6, and the new handlers also make it possible to use Span<char> values in interpolation holes. For library authors, this feature allows them to control whether string interpolation expressions are converted to strings. Rider 2021.3 recognizes the "interpolated string handlers" pattern in library code and can now safely suggest using string interpolation expressions in more places.

Rider helps you get the best performance out of record structs by suggesting that you mark them as readonly. To avoid cluttering type declarations with modifiers unnecessarily, this inspection is only shown when the record type has non-mutating instance members and there are no mutations via setters in the solution (requires enabled solution-wide analysis).

C# 10 lets you simplify the pattern matching syntax a bit by allowing dotted access instead of object pattern nesting.

Rider offers the corresponding inspection with a quick-fix, as well as a context action to undo the quick-fix.

And last but not least:

  • We've improved support for C# 10 lambdas: neither red code nor false positive errors are expected in .NET 6 Minimal API projects. As a bonus, Rider also helps you use the correct syntax and add parentheses where they’re expected by the compiler.
  • Rider now supports Program as a valid generated class name for code with top-level statements.
  • Initial support for static abstract members in interfaces is now available. Code analysis considers this construction as valid, which means you should no longer have to deal with red code. The Generate missing members feature is aware of static abstract members and handles them correctly. This release also includes inheritance gutter marks and the ability to navigate to base/derived symbols.

Nullable Reference Types

It is not unusual for people to copy pieces of code from other resources, like stackoverflow.com. Nowadays, with nullable reference types available in C#, some code samples already include the NRT syntax. But what if you don’t have NRT enabled in your solution? Rider has two new quick-fixes to help you get rid of this syntax after pasting such code into your project: Replace with JetBrains.Annotations attributes and Remove nullable annotations without ‘#nullable’ context.

From time to time, there may be nullability mismatches between type arguments and their nullability constraints. There are now quick-fixes for such cases, including ones that:

  • Remove nullable annotations from type arguments.
  • Remove notnull constraints from type arguments.
  • Allow nullable values in type parameters.
  • Disallow nullable values in type parameters used as type arguments.

A bulk quick-fix is available for correcting annotations on parameters with nullable default values in a file, project, or whole solution.

There is also a new bulk quick-fix that makes a parameter nullable if it's checked for null within a method.

C# Code Analysis

We’ve added a couple of new quick-fixes and a context action for static local/anonymous functions with closures:

  • The Allow closures quick-fix removes static modifiers from a local or an anonymous function if it contains closures.
  • The Pass closure as a parameter quick-fix lifts closures in static local functions to parameters.
  • The Pass closure as a parameter context action lifts closures in non-static local functions to parameters.

There is a new inspection, Simplify string interpolation, with a corresponding quick-fix that replaces .PadLeft() and .PadRight() method calls with alignment expressions inside interpolated string placeholders.

In addition to adding the new C# 10 record struct, we have also improved our support for regular structs. Many developers still use classes with object initializers for their DTOs. Now you can quickly transform all these usages to constructors with parameters. This can be done either from the record declaration itself or from any object initializer. Note that also DTOs that define a constructor with property assignments can be converted.

For some time already, Rider has warned you about inconsistent locks on fields. In this version, we’re adding a complementary inspection that also takes the order of several locked resources into account, informing you about possible deadlock cycles.

Rider now checks the plausibility of integral arithmetic expressions for additional integer types, including byte, sbyte, short, ushort, uint, long, ulong, and enum. This helps you avoid unreachable code branches.

Code analysis performance

We've reduced the time it takes for quick-fixes and context actions to be implemented when they are invoked for a folder, project, or solution.

If Solution-Wide Error Analysis (SWEA) is enabled with Monitor warnings, Rider now uses SWEA results to simply skip the files without corresponding issues, greatly reducing the amount of time spent finding issues to fix.

We also have good news for those who don’t run SWEA on their solutions! Rider now utilizes all available CPU cores to run code analysis in parallel. This reduces the overall time it takes to execute scope quick-fixes and context actions.

 

We’ve significantly improved the performance of the daemon for files that contain huge methods, such as the following:

  • Methods with large or nested conditional expressions, tuple expressions, or switch expressions.
  • Methods with lots of type checks when nullable reference types are disabled.
  • Methods with a lot of indexer accesses when nullable reference types are enabled.
  • Methods with a huge number of closures when nullable reference types are enabled.

SQL Language Injections

We’ve improved the support for SQL language injections. We now support a lot of common cases where you write SQL code right inside C# code.

SQL query strings are correctly resolved for string.Format methods, string interpolations, and simple string concatenations.

Errors no longer occur when SQLParameter variables for parameters inside SQL query strings are used with the Microsoft SQL Server dialect or the Dapper library.

Game zone

Unity

This release brings major updates to Rider’s support for Assembly Definition Files. You can use Ctrl+Click to navigate to a reference; find usages of assembly definitions across the whole project, even in referenced packages; rename assembly definitions; and get completion when adding new references.

Rider will also work with GUID based references, displaying a helpful hint with the target assembly definition’s name, as well as Alt+Enter actions to convert between named and GUID-based references.

Rider will now highlight unmet “define constraints” in Assembly Definition Files. This makes it easy to see why an assembly has been excluded. You even get completion for define symbols!

Setting up version defines has also gotten easier, with completion for package names and an inlay hint for the currently installed version. Rider will also highlight the symbol if the condition isn’t met.

Rider will now show source files from referenced Unity packages in a special context that provides information about what symbols were defined when the packages were compiled. This means that source files will be shown with the correct preprocessor branches highlighted.

Unity’s [Tooltip] attribute provides text that the Inspector can show when editing fields. Rider will also show this text as part of the Quick Documentation pop-up wherever you’re using a serialized field. There is also a new context action for creating the tooltip from XML documentation and vice versa.

Rider’s support for debugging on iOS devices via USB has been updated to work with Apple silicon, and this release adds support for Linux, too.

The asset index now looks in referenced packages, which means Rider can find usages of code in prefabs based on assets in packages.

The meta file tracking has been completely rewritten to handle more use cases. It should work seamlessly as you add, remove, rename, move, or refactor files in the Unity Explorer tool window.

This release also provides the usual assortment of fixes, such as updating the asset index when the file is being updated by certain kinds of external apps, opening files from Unity on Apple silicon, and updating Burst analysis to match changes in the Burst compiler. We’ve also improved Rider’s performance when searching for installed Unity versions and updating the Unity log viewer tool window.

Unreal Engine Early Preview

Unreal Engine tests

If you add tests to your game with the Unreal Engine testing framework, Rider can now launch tests for you and display their results in the Unit Test tool window. In this tool window you can review the results of the tests and rerun any that you want – specific tests, failed ones, or all of them. You can also group tests by the flags passed to them.

Learn more

Rider for Unreal Engine is progressing on its way from public preview to final release. For now, it’s still a free preview as a separate Rider build that’s available upon submission of a form.

Frameworks

WPF

The XAML Preview now works for applications that target the .NET 6, .NET 5, and .NET Core 3.x SDKs. You can preview the results of any change you make in XAML code directly in Rider.

Xamarin

  • In the Plist editor, we've implemented support for standard Xcode schemes. They help Rider provide friendly names for keys, value validation according to key type, and a list of possible keys when you add a new one to the plist. These schemes work on both macOS and Windows.
  • You can now download Android components as NuGet packages directly from the editor.
  • Support for AndroidX libraries is available for projects that support them.
  • We've improved the Android editor layout.

Code cleanup, formatting, and code styles

Reformat and Cleanup on Save

We've introduced the Reformat and Cleanup on Save setting. This feature allows you to have your code reformatted and tidied up whenever you explicitly invoke Save or Save All in the IDE. All the implicit triggers of saving, such as building, switching to another tab, and committing, will not cause the code to be reformatted. Instead, Rider will add the modified document to an internal list of files to be cleaned up and reformatted on the next explicit save. We hope this feature will help you keep your code nice and neat and save you the trouble of having to worry about it.

To enable and adjust this setting, go to Preferences/Settings | Tools | Actions on Save. Here you can select the cleanup profile that will be used. The list of the available profiles is inherited from the Preferences/Settings | Editor | Code Cleanup page. You can also specify whether the action should be applied to the whole file or just to the changed lines.

Also, the Reformat and Cleanup on Save feature respects the Do not format setting. To specify the files and directories that should be excluded from formatting, use the Preferences/Settings | Editor | Code Style | Formatter tab.

Other improvements

The Reformat and Cleanup feature works for multiple selected files and directories in the Solution Explorer tool window.

We've added new options to the formatter:

  • An option to indent lambda or property pattern braces inside statement conditions, such as inside if(), and while().
  • An option to align statement conditions inside the parentheses in if(), foreach(), and so on. It’s turned ON by default.
  • Options to wrap, chop, align, and outdent binary patterns, for example, x is Foo or Bar or Baz.

Starting with the .NET 5 SDK, you can configure the Visual Studio analyzer options with global AnalyzerConfig files. Rider 2021.3 can read the code style information from these global AnalyzerConfig files and use it to adjust the Rider rules accordingly.

Web development

New inspection for updating dependencies

Rider 2021.3 allows you to update your npm packages to the latest version right from the editor! Open your package.json file, place the caret on the package version you want to update, then press Alt+Enter and select Update ‘package name’ to the latest version. A quick-fix will also be shown when you hover over the package version. More details on the reasons behind this inspection can be found in this blog post.

Improved code completion in HTML

We’ve improved the way code completion works in HTML. Whenever you type a tag name or an abbreviation in the editor, or invoke code completion, Rider will show you relevant suggestions right away. Previously, it would only show them if you typed < first. Additionally, code completion for character entity references should now work better.

NuGet support

Rider can generate Binding Redirects for NuGet packages in .NET Framework projects. If Binding Redirects are needed in your project, Rider will add them to the App.config or Web.config file.

Binding Redirects are generated when a NuGet package is installed or updated. However, you can ask Rider to generate the Binding Redirects manually anytime via Tools | Generate Binding Redirects, located in the project’s context menu inside the Solution Explorer tool window.

There is a new property, Auto-Generate Binding Redirects, on the Applications tab for the project’s Properties page. It asks MSBuild to generate Binding Redirects while the project is being built if there are no redirects in the App.config file.

In addition to adding support for Binding Redirects, we’ve implemented a small UX improvement. You can now uninstall NuGet packages right from the Solution Explorer tool window.

Support for Apple silicon

Starting from this release, Rider natively runs on Mac computers with Apple silicon processors. Rider 2021.3 uses the following runtimes:

  • The Apple silicon-compatible JetBrains Runtime for the frontend.
  • The .NET6 RTM for the backend.

No more x64 to ARM64 translation! Rider is now super fast on Apple chips!

F# support

The biggest news is that Rider now officially supports F# 6! In this release, you will also find a lot of quality updates for code completion, refactorings, and navigation, along with various other improvements for F# language support.

The Introduce Variable refactoring has received some powerful updates. It now suggests you deconstruct tuples and single-case union types when needed, and it also suggests using computation types in computation expressions. Additionally, it recommends the use and use! keywords when applicable, and we’ve improved the placement of added binding.

This release contains a number of updates for code completion, including a better suggestion order and initial context-based keyword filtering (some keywords no longer show up when they are not applicable). Using F# functions recursively is now easier, as you don’t have to go back and manually add rec to the containing function.

There’s another notable update for code completion. When completing union case patterns, Rider will suggest that you use pattern matching for its fields.

New icons in Find Usages results will help you distinguish invocations, partial applications, patterns, and other usage types.

Rider now allows you to properly extend your selection inside interpolated strings. Special thanks to Andrew Rublyov for this contribution! The selection behavior for _ and various bracket types has also been improved.

We’ve implemented a number of small quick-fixes, refactorings, and other improvements in F# support. Please take a look at the full release notes for more information.

Plugins

dotCover
dotUltimate

There is a new Code Vision metric, Covering tests. This metric is displayed if Rider has the coverage information for the project, and if the method (or property, indexer, or event) is covered by at least one test.

It can be enabled or disabled from the Settings/Preferences | Editor | Code Vision page.

You can now start unit tests from a pop-up window that appears when you click on the coverage line on the left-hand side of the code editor.

dotTrace
dotUltimate

The dotTrace plugin lets you collect data on asynchronous calls on macOS and Linux. To get this data, use the Timeline profiling mode. The Call Tree shows async calls including awaits and continuations.

The dotTrace plugin can profile child processes of applications on macOS and Linux in the Timeline profiling mode. This support is available only for .NET 5+ applications.

Navigation and Find Usages

New gutter marks

We’ve added a few more gutter marks to help you quickly navigate through the inheritance structure of a class, interface, or struct. The new ↑O and ↑I icons show that a code entity inherits or implements another class or interface, respectively. If this code entity’s inheritance is complex, selecting an icon will display a menu with all of its ancestors above it, up to the top of the inheritance hierarchy. If a class implements or inherits an interface and a class simultaneously, Rider shows an ↑IO icon in the gutter.

Additionally, in this release we’ve enabled the gutter mark for class members by default. Rider will add the ↓O icon in the left gutter next to a class member if the class member is overridden in derived classes. Clicking on the icon will:

  • Navigate you to a member in a derived class that overrides this member.
  • Show you a menu with a list of class members from other classes that override this member.

Find Usages for user-defined implicit conversion operators

Now you can call Find Usages for user-defined implicit conversion operators! The implementation of this feature is based on the mechanism used for type conversion hints.

It allows you to find out whether user-defined implicit conversion operators are used at all, and then navigate to blocks of code with conversions.

Please be aware that this algorithm is not fast, and it can take quite some time to calculate and display its findings.

Database support

Data editor aggregates

We’ve added the ability to display an Aggregate view for a range of cells. This is a long-awaited feature that will help you manage your data and spare you from having to write additional queries! This makes the data editor more powerful and easier to use, bringing it a step closer to Excel and Google Spreadsheets.

Select the cell range you want to see the view for, then right-click and select Show Aggregate View.

Mapping the DDL data source and the real one

This release is a logical continuation of the previous one, which introduced the ability to generate a DDL data source based on a real one. Now, this workflow is fully supported. You can:

Just as a reminder, a DDL data source is a virtual data source whose schema is based on a set of SQL scripts. Storing these files in the Version Control System is a way to keep your database under the VCS.

There is a new tab in the data configuration properties, DDL mappings, where you can define which real data source is mapped to each DDL data source.

New database diff window

The new Database Diff window is available from the context menu. It has a better UI and clearly shows in the right-hand pane what result you’ll get after you perform the synchronization.

The legend in the right-hand pane shows what the colors mean for your potential result:

  • Green and italic: object will be created.
  • Grey: object will be deleted.
  • Blue: object will be changed.

The Script preview tab shows the result script, which can be either opened in a new console or run from this dialog. The result of this script is applying changes to make the database on the right (target) a copy of the database on the left (source).

Besides the Script preview tab, there are two more tabs on the bottom pane: Object Properties Diff and DDL Diff. They display the difference between the particular versions of the object in the origin and in the target databases.

Others

Project Properties

This release brings several new settings to the Project Properties dialog:

  • You can customize the application icon in the Resources section on the Application page.
  • There is a new Build Events page for specifying commands to run before and after building.
  • The Inspections page has several new project properties related to code analysis: Localizable, Localizable inspector, and Solution-Wide inspections.
  • You can configure reference paths for a project on the Reference Paths page.
  • There is a new property, Auto-Generate Binding Redirects, on the Applications tab. Check out the NuGet Support section above to learn more about Binding Redirects.

Solution Properties

The table in the Solution Properties dialog has a new Dependencies column for specifying the build dependencies for each project. Some of the projects are disabled from selection to prevent circular dependencies.

Run configurations

Starting from the 2021.3, Rider imports all .pubxml files from Properties/PublishProfiles when a project is loaded and converts them into run configurations. Whenever you add a new .pubxml file, a new run configuration is generated automatically. You no longer need to create these run configurations manually!

There is an explicit runtime selector for specifying the runtime to run the application on. The list depends on the operating system you use, but the whole list contains: .NET/.NET Core, .NET Framework, and Mono.

Support for the EditorBrowsable attribute in the code completion

You can now adjust the code completion list to filter items in accordance with the EditorBrowsable attribute. Just select the desired behavior on the Preferences | Editor | General | Code Completion page under Filter members by EditorBrowsable attribute.

Change font size in all the tabs

As requested, we’ve made it possible to change the font size in all open tabs simultaneously with + mouse wheel on macOS or Ctrl + mouse wheel on Windows and Linux. To enable this feature, go to Preferences/ Settings | Editor | General, choose Change font size with Command + mouse wheel in, and select All editors. If you select Active editor, the shortcut will change the font size only in the file where you are currently working.

Download

Free 30-day trial