Rider 2023.1

Améliore la prise en charge de C#, notamment avec l'ajout d'un ensemble d’inspections pour optimiser l’utilisation de différents types de collections.
Avril 6, 2023
Nouvelle Version

Fonctionnalités

Key updates

  • Support for Unity’s DOTS (GameDev) - Following Unity's lead in moving from object-oriented to data-oriented design, Rider has introduced support for Data Oriented Tech Stack (DOTS) - a paradigm-shifting, CPU-friendly approach to building games.
  • Reducing the number of lookups in collections (C# support) - Added inspections and corresponding quick-fixes to optimize your work with collections by reducing the number of lookups. For example, Rider will now suggest removing redundant Contains and ContainsKey checks or using TryAdd and TryGetValue methods instead.
  • VCS widget for Perforce (Version Control) - Rider's integration with Perforce has received a major upgrade with the addition of Perforce to the Version Control Systems (VCS) widget. The VCS widget for Perforce provides quick access to essential actions such as Commit, Revert, and Update Project. It also indicates the current workspace and displays the status of your connection.
  • Visualizers for string variables (Debugger) - During a debugging session, you can now see the values visualized for HTML, XML, JSON, JWT, or URL-encoding string variables. Just click on the View link next to a string in the Threads & Variables tab of the Debug tool window. Alternatively, click on the View link that appears when you hover over a variable in the Editor.

C# support

  • Reducing the number of lookups in collections - Introduced a set of inspections with corresponding quick-fixes to optimize and speed up your work with different types of collections by reducing the number of lookups in collections:
    • To remove a Contains(item) check before adding the item into HashSet or other collections implementing the ISet interface.
    • To remove a ContainsKey(key) check before adding the item into Dictionary or other collections implementing the IDictionary interface.
    • To use TryAdd(key, value) for Dictionary collections or collections inherited from Dictionary when possible.
    • To use TryGetValue(key, out value) for IDictionary collections when possible.
  • Syntax style for null checking pattern - Added a new Syntax style setting to help you enforce one consistent style of not null checks inside the patterns. It consists of two options: empty recursive pattern syntax { } and negated pattern not null, where the latter is the default one.
    • Using the not null pattern has a disadvantage as it doesn't allow for variable names to be introduced for the checked value like the recursive pattern { LastName: { } lastName } can. The Add pattern variable context action has been added over the not null pattern to look for expressions accessing the same value (since you are introducing a variable name) and replace all of them with the newly introduced name to consolidate all of the accesses to the same value.
  • ArgumentNullException.ThrowIfNull style of null checks - Microsoft .NET 6.0 SDK introduced a new API for null checking - ArgumentNullException.ThrowIfNull. The code analysis engine has recognized this checking approach since that time, but there was no option to use this API as a default style of null checks produced by Rider. In this release an ArgumentNullException.ThrowIfNull pattern has been added to Settings/Preferences | Editor | Code Style | C# | Null checking for Rider.
  • Extract common property pattern - If you use property pattern matching heavily, you can now use the new inspection with a quick-fix to extract common elements from several property patterns when they come together in the code flow. The code generated by the Extract common property pattern quick-fix helps you reduce code repetition by moving common property patterns to a higher-level pattern.
  • Remove empty regions - C# developers often rely on the #region directive and code folding in the IDE to structure their code. Refactoring may leave some #region's empty, which can make the code look misleading when collapsed. With this new code inspection, you'll be able to identify empty #region’s in their collapsed state and clean up the code with a corresponding quick-fix.
  • Replace span.SequenceEqual(“str”) - Code analysis now has a code inspection that will suggest replacing span.SequenceEqual("stringLiteral") with span is "stringLiteral" - a cleaner and more convenient C# syntax solution than calling a function.
  • Insert a return type specification for lambdas - Lambda expressions in C# can have implicitly-typed parameters and inferred return types. However, explicit types can be added to clarify code in complex overload resolution scenarios. Starting from C# 11, it's also possible to add a return type specification for lambda expressions. To accomplish this, an Insert return type specification context action has been introduced in this release. The action can be applied to all scopes, including method, class, file, project, or to the entire solution, to accomplish this.
  • Pattern is redundant inspection - C# or/and/not patterns are useful for compact value checks, but can be less recognizable than traditional expressions, such as ||/&&/!. They may also create hard-to-find bugs if parentheses are missed. To help with this a new code analysis has been introduced that warns you about "dead" checks inside complex patterns.
  • Convert to list pattern context action - Improved support of C# 11 list patterns. With the new Convert to list pattern context action you can now turn collection length checks into a list pattern syntax. It works in any context where a check of a collection length can be done.

Game Development

  • Unity
    • DOTS support - Data-Oriented Tech Stack (DOTS) is a major architectural change for Unity. It stores component data in contiguous vectors, which systems can access and modify in a more CPU-efficient manner. This leads to improved performance, especially with larger, more ambitious projects. With this release, support has been introduced for Unity DOTS to bolster Rider's reputation as the most innovative IDE for game development. With this release, you can take advantage of the following new features:
      • New file templates.
      • Code Vision for DOTS types.
      • Auto-generation of authoring components to "baker" mapping code.
      • Inspections and quick fixes to help you write and update codebases to work in the new DOTS style.
    • Debugging on Android devices via USB - While it's been possible to debug Android games via WiFi, sometimes it's better just to use a cable. With this release Rider now supports debugging Android games via USB. Use the Attach to Unity Process dialog to see which projects are running on connected devices, and start debugging.
    • Temporary run configurations for attached players - With this release Rider will automatically create a temporary run configuration when debugging a player via the Attach to Unity Process dialog. This makes it easier to start another debugging session. You can save the run configuration to make it permanent, and share it with your team. This works with all supported players, including desktop, mobile devices, consoles, and USB devices (Apple iOS or Android).
    • Documentation - Rider already gives you online documentation for the .NET Base Class Libraries and core Unity API. However, with this release, it also gives you quick access to online documentation for Unity registry packages, including DOTS. You can view links to the documentation by either pressing F1 or consulting the Quick Documentation popup that appears when you hover over a symbol. Like the rest of the product, Unity support in Rider is fully localized, and this extends to Unity's API documentation and online help, wherever the translated documentation is available.
    • UI Toolkit friendly file templates - Starting with Unity 2022.2, the UI Toolkit is the recommended way to write UI extensions for the Unity Editor. To get you started, 3 new customizable file templates based on the UI Toolkit have been added: creating editor windows, property drawers, or custom Inspector editors. They are only available in Unity 2022.2 or later, and the IMGUI versions are still available.
    • Other improvements - Improved the accuracy of detecting serialized fields in your code, including complex scenarios using derived types and the [SerializeReference] attribute. Support for finding usages of C# code in Unity animations, and highlighting your methods as event handlers has also been improved. A frequently requested update to the formatting engine to place [Header] attributes on a separate line has also been implemented.
  • Unreal Engine
    • Support for Unreal Engine 5.2 - Epic Games has merged UnrealHeaderTool (UHT) into UnrealBuildTool (UBT) in Unreal Engine 5.1 and 5.2. Rider is now ready for these changes, and the UHT integration in Rider will work for the new Unreal Engine versions. Rider now also supports recent updates to the Blueprints file format, which will be included in Unreal Engine 5.2.
    • New UE class context action - Reworked the Unreal Class… context action which now offers a range of parent classes to choose from, as well as the option to specify whether the class is public or private. Overall, the dialog now looks and functions more in line with its Unreal Engine counterpart.
    • Blueprint Error Parsing - If a Blueprint file fails to be parsed by Rider, Rider will now display the parsing errors in a separate Blueprints tab in the Problems View window. This allows you to locate the problematic file in the native file system explorer. Each problem contains a short description of the kind of error that was detected.
    • Parsing Clang compilation messages - Rider can now parse messages generated by the Clang compiler when building Unreal Engine games on Apple macOS and Linux. All Clang warnings and errors in the Build Output tool window are parsed correctly, including links to files. Double-clicking on the link navigates you to the exact place in the code where the warning or error stems from.
    • Macro substitution previews - When hovering over a macro, you can now see its expansion preview in the tooltip, with full syntax highlighting and proper code formatting. You can still use the Substitute macro call context action to expand it right in the editor, but the instant preview makes working with macros easier.
    • UInterface live template - Rider now offers a built-in UInterface live template for Unreal Engine solutions. Similar to the existing UCLASS, USTRUCT, and UENUM live templates, UInterface lets you quickly add a new interface class that follows the Unreal Engine conventions, saving you the time and effort of creating it manually.
    • Shader mapping - You can now specify mappings for virtual and physical shader directories. If you have RiderLink installed in the game or engine project, you can also load shader mappings information from Unreal Engine.
  • Godot (Plugin)
    • The latest version of the Godot plugin for Rider comes with the following updates and fixes:
      • res:// completion has been improved to increase its usability and visibility. For certain known API calls, i.e. GD.LoadPackedScene, completion for string literals will be immediately available, even before the res:// prefix is typed.
      • Godot 4 relies on the Microsoft .NET 6 runtime instead of Mono, so several fixes were required to accommodate the shift. When you're debugging a Godot application and a breakpoint is hit, a Current Scene will automatically be created inside the Immediate Window. Furthermore, any Godot.Node inside the Immediate Window now has an additional Children group, which can be used to reveal its children and their children, recursively.

Code Editor

  • Option to specify the placement of pasted content - There's now a setting that allows you to control the placement of the pasted content.
  • Option to show whitespaces only in selected code - There's a new Selection checkbox in Settings/Preferences | Editor | General | Appearance | Show Whitespaces that allows you to configure this setting so that Rider shows whitespaces as small dots only when you select code.
  • Color and brush previews - The code editor inside Rider will now render color and brush previews for the values and references inside Avalonia XAML (.axaml) and C# files, just like it does for WPF applications.
  • Option to hide type conversion hints - Implemented a way for Rider to hide type conversion hints for selected operators.
  • No spell checks for hashes and special values - Updated the Typo inspection so that it no longer checks the spelling of hashes and special values and doesn't report them as misspelled. This update covers the following values:
    • Md5, Sha1, and Sha256 hex values.
    • Sha384 and Sha512 base64-encoded integrity values with the shaNNN- prefix.
    • JWT tokens.
  • Parameter name hints for xUnit attributes - As it already does with NUnit, Rider can now display parameter name hints for the attributes InlineData and InlineAutoData in xUnit tests.

Web development

  • Imports on code completion for Angular - When you're working with global and exported symbols in the Angular template, the IDE will now automatically add an import for them into your component on code completion or when you use a quick-fix.
  • Support for TypeScript in Vue template expressions - This release includes support for TypeScript in Vue template expressions. The Vue template expressions now sync with lang="ts" when added to script tags. As a result, Rider can better evaluate TypeScript, providing preferences and relevant refactorings matching what's inside the script tag. You may have noticed before that there were differences between settings and refactorings for pure .js and .ts files. Now the lang attributes will match.
  • Automatic conversion of strings to template literals - Rider will now transform your single- or double-quoted strings into template literals automatically whenever you type ${. This works for raw strings as well as for JSX properties.

UX/UI Improvements

  • Full IDE zoom - It's now possible to zoom into and out of Rider, increasing or decreasing the size of all UI elements at once.
  • New Remember size for each tool window setting - Introduced a new layout option that allows you to unify the width of the side tool windows or retain the ability to freely adjust their sizes as you customize your layout.
  • ML-powered search for classes in Search Everywhere enabled by default - To provide you with more relevant and accurate search results, efforts to integrate machine-learning ranking into the Search Everywhere (Double Shift) functionality has continued. The sorting algorithm in the Classes tab is now also powered by machine learning by default, along with the results in the Actions and Files tabs.
  • Changes to the New UI (Beta)
    • Vertical split for tool windows - Introduced the option to split the tool window area so that you can conveniently arrange these windows.
    • Compact Mode - To improve the user experience with Rider's new UI on smaller screens, Compact Mode has been introduced, which provides a more consolidated look and feel due to the reduced heights for toolbars and tool window headers, scaled-down spacings and paddings, and smaller icons and buttons.
    • Project tabs on Apple macOS - Implemented project tabs for macOS users. When you have several projects open, you can now easily switch between them using project tabs displayed under the main toolbar.
    • Show Hidden Tabs - Added the Show Hidden Tabs feature to the new UI. Next to the open tabs, you now have a drop-down showing the complete list of open tabs. Previously, they may have been hidden.
    • Redesigned Run widget - Redesigned the Run widget in the main window header using calmer colors, so that its appearance is subtler and easier on the eyes.

Version Control tools

  • Improved code review workflow for GitHub - For this release the process of reviewing code inside the IDE has been fine-tuned. Research shows that users typically switch between GitHub and their IDE for cases when they require code browsing. This workflow has been improved by reworking the Pull Request tool window.
    • The window now has a dedicated tab for each pull request, displaying only essential information to help users focus on the task at hand.
    • A button has also been added for easy execution of the most important action for the pull request's current state.
  • Auto-completion in the Create New Branch popup - Implemented auto-completion in the Create New Branch popup. Once you start typing a name for your new branch, the IDE will suggest relevant prefixes based on the names of existing local branches.
  • Improved Branches popup - Improved the usability of the Branches popup. For instance, navigating between branches is now easier, as they are grouped and stored in expandable lists.

Database tools

  • Database Schema Compare - Schema Compare is an essential tool for database development and maintenance. It lets users compare two databases to quickly identify the differences between them, ensure there are no discrepancies, and keep the data up to date. This release introduces Schema Compare for connected databases, Microsoft SQL Server database projects, and .dacpac files.
    • A dedicated editor window has been created where you can view and edit Schema Compare (.scmp) files.
    • The Problems View window will now include the issues identified as a result of database comparison and the ones spotted by database model validation.
    • Important: Rider’s Schema Compare implementation is based on SQL Server Data Tools and therefore requires you to have Microsoft Visual Studio (version 2017 or newer) installed on your computer.

Docker

  • Fast mode running - Fast mode is now available to run Docker projects in Rider. Previously, you could only use it for debugging. It is also possible to use Fast mode with a wider range of Dockerfiles. Fast mode has been made even faster by pulling the Docker images and inspecting them during solution startup.
  • Auto-generated run configurations - Rider can now generate Docker Compose run configurations from .dcproj project files automatically upon opening a solution. This version of the IDE is also able to generate Dockerfile run configurations whenever there's a DockerfileFile project property specified or a Docker profile included in the launchSettings.json file. Additional customization can be achieved by specifying httpPort, sslPort, publishAllPorts, and useSSL properties in the launch settings profile.
  • Sharing generated SSL certificates - Whenever you deploy an application to Docker in Fast mode, you need to share the generated HTTPS development certificates between the host and the container. This step has been automated by adding a Share generated SSL certificate option for Docker run configurations. It is only possible to share trusted certificates on Microsoft Windows and Apple macOS, which means you need to manually trust the certificate on Linux.
  • Docker Compose - You can now add Docker Compose to your project to easily handle multiple containers at once. To do so, call up the context menu for a project and select Add | Docker Compose File to generate:
    • A Dockerfile for the project, if it's missing.
    • A docker-compose.yml file in the Solution Items solution folder above all of the projects in the tree.
    • A couple of run configurations to run either Dockerfile or docker-compose.yml.
  • Merged logs from all Docker Compose containers - The Dashboard tab of the Docker Compose node now pulls together logs from every Docker Compose container and displays them all in one place, updated in real time.
  • Support for Microsoft Azure Container Registry - You can now easily connect to Azure Container Registry. Go to Settings/Preferences | Build, Execution, Deployment | Docker | Docker Registry and set it up by selecting the Docker V2 option in the Registry input field.

Run/Debug

  • Run configuration - Sometimes you may want to run your application on a runtime that is installed in a custom folder. For this case, an Add Custom Runtime option has been introduced for the Runtime setting on the Run/Debug Configurations page. Paths to the default runtime versions have also been added in the Runtime dropdown list. This release also provides support for the DebugRoslynComponent command from the launchSettings.json file to help you debug Roslyn components with ease.
  • Reattach to Process action - You can now easily reattach Rider's debugger to the last process it was attached to by simply going to Run | Reattach to Process... in the main menu or by using the keyboard shortcut Ctrl+Alt+Shift+F5. This new action becomes active after the first debugging session.
  • Debugging WASM startup code - Rider can now debug startup code for WebAssembly (WASM) .NET applications. Previously, the WASM debugger could only attach after app initialization was done for most projects, because it required some time to perform port calculation, connection initialization, etc. The delay made it impossible to debug startup-time code. Now, Rider waits for the page target initialization, connects the debugger, and only then does it start the actual app loading. That makes it possible to catch breakpoints set at the early stages of the app's initialization logic.
  • Closing browser tabs at the end of debugging - When you start a debugging session for a Microsoft ASP.NET Core application in Rider, it triggers the IDE to open a new browser window or a tab for it. Until now, running several debugging sessions would leave you with multiple open tabs that you would then have to close manually. Now, whenever you debug an ASP.NET Core application with a JavaScript debugger enabled, Rider will close the corresponding browser tab the moment you stop the process.

F# support

  • Code completion - Introduced new postfix templates 'match', 'for', and 'with' to help you with writing required boilerplate code. When starting a new match expression, there's a suggestion to generate all cases for union, enum, bool and tuple values.
  • Regular expressions language injections - Added support for regular expressions in string literals for F#. When passing string parameters annotated with [RegexPatternAttribute] or [StringSyntax(StringSyntaxAttribute.Regex)], or if there is a comment //language=regex next to a string literal, Rider will now process strings as regular expressions, highlight the syntax and errors, and offer auto-completion.
  • Quick fixes - Added a new quick fix which generates missing pattern branches in a match expression.

Plugins

  • Localization (Beta) - This release introduces the first stage of localization into Chinese, Korean, and Japanese. You will get a partially localized UI, code inspections, an Alt+Enter menu, tool windows, and notifications, including those for Unity and Unreal Engine support.
  • Trigger Continuous Testing action (dotUltimate) - Introduced a Trigger Continuous Testing action, as well as the option to set up a shortcut for it. The action makes it possible to trigger continuous testing directly, whereas previously, you could only do this indirectly by building or saving your project.
  • Astro support - Added Astro support with a new plugin available to use in Rider. The plugin provides basic functionality such as syntax highlighting, code completion with automatic imports, refactorings, navigation, intentions, code folding, Emmet support, and correct formatting.

Other Features

  • Structure view - This release comes packed with improvements and fixes for code navigation:
    • Rider now shows inherited members in the Structure view tool window.
    • Rider's ability to display the class members of decompiled code in the Structure view has been restored.
    • Rider will now use IntelliJ IDEA's Structure view popup when the Go to File Member command is initiated. This will enable the IDE to show the structure of a file and allow it to show symbols from compiled base types.
    • Grouping has also been implemented inside the popup, so you can tell where each item is located at a glance.
  • Code cleanup - Introduced a new task type for code cleanup in this release - Reformat inactive preprocessor branches in file. The task enables you to reformat inactive preprocessor branches. It can only be applied to the entire file at once and works only with C# sources. This task cannot reformat code hidden behind a preprocessor directive #if that is always false. The two most obvious examples of this limitation are '#if false ... #endif' and '#define A #if !A ... #endif' constructs.
  • Text filters for unit test trees - Text search filters applied to unit test trees inside the Unit Tests and Unit Test Coverage tool windows, are now taken into account when running tests using the toolbar's Run buttons. Only the tests that satisfy the search criteria will remain listed and run.
  • Rename refactoring - Improved the way Rider handles renaming files in a project. From this version of Rider and onwards, whenever you rename a file inside your solution, a dialog will appear with the option to rename all relevant symbols (classes, interfaces, etc.) to match the change.
Reduce the number of lookups in collections

Rider

Un IDE multiplateforme de premier plan pour les développeurs .NET et du domaine du jeu.

Rider est également disponible en :

Vous avez une question ?

Discutez en direct avec l'un de nos spécialiste des licences JetBrains .