Adding Docker support to a project in Rider is now easier – you can generate the Dockerfile while creating a new project. Just select Docker Support on the New project dialog if you choose ASP.NET Core Web Application, Worker Service, or Console Application.
If you want to add a Dockerfile to an existing project, use Add | Docker Support in the context menu for a project in the Solution Explorer tool window.
Out-of-the-box, Rider can run Dockerfiles generated by Visual Studio. No additional changes are required from you in the Dockerfile to make it Rider-compatible.
Learn more: Generate Dockerfile for .NET Applications with Rider.
The Merge into pattern inspection can now deal with many more code patterns.
Fuse null checks with other checks into a single pattern check.
Rewrite checks from
conditional?.Access expressions to nested pattern
if statement nesting by merging the checks together.
Finally, you can merge patterns inside a simple
deconstruction pattern by expanding them to full forms.
We’ve added more support for C# 9.0 records.
The Extract interface and Extract superclass refactorings now work with record declarations, as do File Layout and the features that have to do with XML documentation.
We’ve come up with a set of new inspections and actions. Redundant explicit property declaration for properties in record declarations can be of help while migrating your code to use records with positional parameters and implicit property declarations. A corresponding quick-fix, Remove explicit property, is included.
There’s also something to keep things neat: the Redundant 'record' type declaration body inspection and the corresponding quick-fix will replace the empty record type declaration body with a semicolon.
Deconstruct()method, consider using the To explicit constructor context action.
We’re happy to introduce a new inspection, Inline temporary variable.
Sometimes you find yourself using the same value over and over under different names in your program. Can such code be made more transparent? Sure, and Rider is here to help. It can even help you find bugs if the temporary variable was supposed to be initialized to some other value or mutated later in code.
Named tuples have been with us since C# 7, but renaming the components remained a manual operation. We’ve put an end to it – you can call the refactoring now.
not patterns can help you make your type checks much easier
to read. Rider offers dropping the
!() syntax in favour of a
For C# 10.0 support, we’ve taken some first steps and taught Rider to work with the Constant interpolation strings feature.
Substring, if doing so simplifies the code.
There’s good news for developers who work with ASP.NET MVC, ASP.NET Web API, or Razor Pages! We’ve added a scaffolding mechanism for ASP.NET Core projects.
Rider supports scaffolding Areas, Controllers, Razor Pages, Views, and Identity, including generating boilerplate source code for full CRUD operations to use Entity Framework.
It is available on Windows, Linux, and macOS.
Rider uses dotnet aspnet-codegenerator under the hood.
Route templates are widely used in MVC applications to configure how HTTP requests are matched to the application’s executable endpoints. In the 2021.1 version, we’ve introduced support for route templates. Rider now provides code completion, structural navigation, inspections, and quick-fixes. It includes:
Learn more at What’s New in ReSharper.
The option to delete existing files in the folder before publishing is now available. It can prevent you from being stuck with obsolete data, for example, when moving files around. Be aware that Rider will completely clean up the target location if it’s enabled.
Inspecting your CSS code with Stylelint is now easier. You can fix problems with this linter in just a few clicks. Hover over a problem in your file or place the caret on it and press Alt+Enter, then select Stylelint: Fix current file.
Additionally, you can specify a path to the configuration file in Preferences / Settings | Languages & Frameworks | Style Sheets | Stylelint.
When working with style sheets, you can now check your selectors' specificity – just hover over a selector that you want to study. Alternatively, focus on a selector and press F1/Ctrl+Q to see this information in the Documentation popup.
We’ve added a new built-in browser preview that allows you to preview HTML files quickly. To open the preview, click on the icon with the Rider logo in the widget in the editor's top-right corner.
Now you can attach to a .NET process right from the Welcome Screen! No need to open a solution with the source code first. Select the Attach to process tab on the Welcome Screen, choose the .NET process you need from the list, and Rider will begin debugging it.
Rider now has interactive debugger hints! Hints in the editor not only show you what’s going on but also allow you to intervene in and interact with the debugger process through debugger hints. Click on the hint and select Set Value to enter interactive mode. You can input raw data or use other values with the help of autocompletion. Shortcuts are provided as well.
You can enable debugger hints with the Show values inline setting in Settings | Build, Execution, Deployment | Debugger | Data Views.
Rider 2021.1 builds on some of the many innovative features Rider already provides for Unity and tries to give you even more context about your Unity project. Where is Unity using your code in assets? What are the performance critical code paths called every frame from Update? How can you debug, test, and cover your code better?
Rider can show you where Unity is using your code inside scenes, assets, and prefabs, highlighting usages directly in the Unity Editor.
Rider 2021.1 extends this to support animation assets, showing usages of properties and methods as animation callbacks.
Rider gives you code completion and validation for Unity’s magic strings. It already supports tags, layer names, scenes and coroutines, and Rider 2021.1 adds support for animation state values.
Previous versions of Rider highlighted methods as performance critical, frequently called, or Burst compiled, but it was not always obvious why.
Rider 2021.1 adds menu items to show all the methods called in the hot path
back up to an
Update method, or trace the outgoing calls to finally
reach a known expensive Unity API.
For Burst compiled methods, Rider will show you the route through all called methods back to the start of the Burst context.
Rider already provides extended debugging support for Unity projects, showing you the Active Scene object, as well as adding child game objects and components to the debugger view.
Rider 2021.1 will help debug SerializedProperty instances as well. Irrelevant fields are hidden by default, showing only values that are relevant to the type of the property. You can easily see child properties and all of the serialised data.
Rider extended its Unity based unit testing support to include code coverage of play mode tests. Discover, run and debug, and show code coverage of Unity edit mode and play mode tests, all without leaving the code editor.
There are plenty of other minor changes and fixes, including more robust meta file handling, improved performance when adding log entries into the Unity tool window, and nicer grouping of Unity-related file templates.
Our Godot Support for Rider plugin was updated as well. It now supports running NUnit unit tests directly in the game process to help ensure everything works as expected. Follow the instructions in this pull request to make it work in your game today! Please share your feedback in the comments for the pull request.
Rider for Unreal Engine is still in the public preview stage and is scheduled for release as part of Rider later in 2021. You can evaluate the preview for free until the public release.
The Unreal Engine’s Cast for type-safe dynamic casting is now available as a postfix template in code completion. Rider also supports another Unreal Engine specific reflection macro – RIGVM_METHOD.
Initial support for Unreal Engine 5 with intuitive fixes based on feedback we received from the Epic Games team was introduced.
From the C++ side, Include and Type Hierarchies were added, as well as support for Google Test and some other C++ unit testing frameworks.
Learn more here.
In v2021.1, we added the Save to Shelf action that copies your changes to Shelf while keeping them in the local changes. You can access this action via shortcuts or typing ‘Save to Shelf’ in the Search Everywhere popup.
It is now possible to copy a file from another branch in the Compare with branch dialog. To do so, select the file you want to copy and click on the new down-arrow icon next to Show diff.
Rider now saves the Solution Explorer’s state between closing and opening the IDE, including opened nodes. You no longer need to expand the nodes manually every time you reopen a solution or restart the IDE.
When there are several vertically-split editor tabs open, you can now double-click on them to maximize the editor window for each one.
We’ve reworked the folder selection dialog on Windows. Now it will only show you folders, which you are able to select.
You can now access your recent projects on Windows by right-clicking the Rider icon on the taskbar or on the Start menu.
The new modal dialog UI in macOS Big Sur is now supported.
Toolbox manager for Windows Forms designer has had a complete redesign.
The left part of the window shows you the list with all controls libraries, either system or third-party, grouped by controls vendor. When you select a library in the list, you can select specific controls on the middle pane. Only they will be shown in the Toolbox to keep the list clean. The right pane shows you metadata for a selected control.
Do you have too many controls in a library, but you need only a specific one? No problem! The new search in the middle pane cuts down the list of controls and highlights the search substring in the results list.
Last but not least, there are new counters at the bottom that show how many components will be removed or added to the Toolbox on saving. You won’t feel lost with what will be done after clicking the Apply button.
Syntax highlighting comes to the Quick Documentation window to provide the same highlighting you see in the code editor. Also, Quick Documentation for a symbol is now shown on mouse hover.
Choosing a font that works perfectly for long hours of coding is crucial. The recently added typography settings make this choice a bit easier and more personalized. In v2021.1, you can fine-tune the weight of your main and bold font styles in Preferences / Settings | Editor | Fonts.
We’ve improved our XAML Preview tool, an essential feedback mechanism for WPF and XAML developers.
Rider now places the XAML Preview tool within the editor window itself, giving you the option to switch between many orientation and layout options. You can change the preview tool’s orientation to be vertically or horizontally separated from the editor.
The focused element will now be highlighted, so you get a little extra help when trying to find a specific UI element in an intricate UI design.
The tool now allows you to click through TabItem instances. The addition vastly improves the experience of building multi-tab user interfaces.
The XAML Preview tool will now respect design properties such as DesignHeight and DesignWidth when rendering previews.
Please note, the XAML Preview is only available on Windows for applications targeting the .NET Framework.
For more details, check out this blog post: XAML Preview Tool Improvements in Rider 2021.1.
We’ve added a couple of new settings:
For custom naming rules, we have updated the order in which they are applied – more specific ones now go first.
Finally, we’ve added a new Reindent only action for Format Selection. You can now tell Rider to only adjust the indents for the selected code instead of performing the whole reformatting process.
EditorConfig is becoming a popular tool in the .NET community, and we are continually improving how it works with Rider. Here’s the improvements we’ve made:
csharp_indent_case_contents_when_blockoption in EditorConfig.
We’ve added new Inline Variable refactoring for local
Rider can now calculate an allowed language level based on the project and compiler used in a build and suggest improvements to make your F# code more modern and up-to-date.
To Interpolated String, a new analyzer and quick fix, aims to convert a
printf-style format string to an F# 5 interpolated string.
Thanks again to
Saul for the nice implementation.
Redundant parentheses analysis and the corresponding quick fix will help you with parentheses in patterns, types, and simple expressions. We’re planning to cover more expression cases in future releases.
We’ve added a UI for editing grants when modifying objects.
The Modify user window, which you can invoke on a user in the database explorer with Ctrl+F6, now has a UI for adding grants to objects.
This is available for PostgreSQL, Redshift, Greenplum, MySQL, MariaDB, DB2, SQL Server, and Sybase.
System functions and procedures are no longer highlighted as errors when used unqualified. Navigation and completion now work for them as well.
We’ve implemented NuGet Smart Restore on a build. It performs a restore on a build action when heuristics detect that an external restore was performed. If you wish to turn it off, the setting is in Settings/Preferences | Build, Execution, Deployment | NuGet | Smart Restore on Build.
Rider now supports building in parallel on recent versions of Mono. Please enable it in Settings | Build, Execution, Deployment | Toolset and Build.
It is now possible to configure how Rider will treat external dependencies when searching for text. In the Find in Files dialog, select Scope and click the ‘…’ button. The Scopes window will open, and in it you can see whether External Dependencies are included or excluded from the scope. You can change it using the buttons on the right.
We now support the newline-delimited JSON Lines format used for working with structured data and logs. The IDE will recognize .jsonl, .jslines, .ldjson, and .ndjson file types.
Files in these formats contain several lines, and each new line is a JSON object separated by a newline character. Commas are not required at the beginning or end of lines, and there is no need to enclose the entirety of the file contents in square or curly braces.
Free 30-day trial available