Rider 2021.3

新しい[問題ビュー]ツールウィンドウと共に.NET 6 SDKサポートを追加
12月 10, 2021
新バージョン

機能

  • Microsoft .NET 6 SDK support
    • This release 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 now 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.
      • Limitations:
        • Debugging during a Hot Reload session is only available on Microsoft 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.
  • UI/UX
    • Redesigned main toolbar - This release comes with a completely redesigned main toolbar. The new design, delivers a clean yet functional toolbar to 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.
      • So as to not 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 JetBrains 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 - You can find all of the errors, warnings, suggestions, and hints that Rider code analysis found in the file you are currently working with in the Current File tab. It works the same as it does in the 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 - Added 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 - 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).
      • The left-hand toolbar has been completely removed and the icons that were located there have been moved to either the top toolbar or the context menu. To keep the top toolbar as compact as possible, the icon set has been reordered and left only the most important actions visible. The rest of the icons have been 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 now 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, an Evaluate icon has been added 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 - You can now 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 Microsoft .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 now easily navigate to a method or a lambda expression that the delegate will wrap.
      • 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, a new Navigate link has been added for each subscriber.
  • Code analysis
    • C# 10
      • File-scoped namespaces - In addition to supporting the new syntax itself, a new Syntax style option has been added that allows you to select your desired style. 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.
      • Global usings - Rider code analysis is now 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.
      • Added rich support for the CallerArgumentExpression attribute - This includes code completion and code inspections to help you use it properly.
      • Interpolated string handlers - 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. This release recognizes the "interpolated string handlers" pattern in library code and can now safely suggest using string interpolation expressions in more places.
      • Marking record structs as readonly - 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).
      • Simplifying pattern matching syntax - 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.
      • 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.
      • Program as a valid generated class name - 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. If you don’t have NRT enabled in your solution Rider now 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 now 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:
      • 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.
      • Added 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, support for regular structs has been improved. 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.
      • Rider already warned you about inconsistent locks on fields. In this version, a complementary inspection has been added 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 - 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.
      • 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.
      • 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 - Improved the support for SQL language injections.
      • A lot of common cases where you write SQL code right inside C# code are now supported.
      • 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 now 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 Apple iOS devices via USB has been updated to work with Apple silicon, and this release adds support for Linux as well.
      • 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.
      • 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.
  • 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, support for standard Xcode schemes has been added. 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 Apple 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.
      • Improved the Android editor layout.
  • Code cleanup, formatting, and code styles
    • Reformat and Cleanup on Save - 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.
      • 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.
      • 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 now works for multiple selected files and directories in the Solution Explorer tool window. New options have been added 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 is 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 Microsoft Visual Studio analyzer options with global AnalyzerConfig files.
      • With this release Rider 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 - This release 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.
    • Improved code completion in HTML - 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 now show you relevant suggestions right away. Previously, it would only show them if you typed < first. Code completion for character entity references should now work better as well.
  • 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.
    • Added 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 Apple Mac computers with silicon processors. Rider 2021.3 uses the following runtimes:
    • The Apple silicon-compatible JetBrains Runtime for the frontend.
    • The .NET 6 RTM for the backend.
    • No more x64 to ARM64 translation. Rider is now super fast on Apple chips.
  • F# support - Rider now officially supports F# 6.
    • 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 the placement of added binding has been improved.
    • 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.
    • Updated code completion - When completing union case patterns, Rider will now suggest that you use pattern matching for its fields.
    • Added new icons in Find Usages results which will help you distinguish invocations, partial applications, patterns and other usage types.
    • Rider now allows you to properly extend your selection inside interpolated strings.
    • The selection behavior for _ and various bracket types has also been improved.
    • Added a number of small quick-fixes, refactorings and other improvements in F# support.
  • Navigation and Find Usages
    • New gutter marks - 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 the gutter mark has been enabled 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 - You can now 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 - Added the ability to display an Aggregate view for a range of cells. This feature 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 Microsoft 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. This workflow is now fully supported. You can:
      • Generate a DDL data source from a real one.
      • Use the DDL data source to map the real one.
      • Compare and synchronize them in both directions.
      • 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.
    • 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 this release, 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 - Added the ability 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.
Problems View

Rider

Windows、Mac、Linuxのアプリケーションを.NET、ASP.NET、.NET Core、Xamarin、Unityで開発

Riderは、次の製品にも含まれています。

ご質問がありますか?

今すぐ JetBrains ライセンススペシャリストとライブ チャット