# What's New in v21.2 ## Visual Studio 2022 Support CodeRush now installs and runs in **Visual Studio 2022**. You can use one of the following ways to add the CodeRush extension to Visual Studio 2022: - **Visual Studio Marketplace**. Download the **"CodeRush for VS 2022"** extension from the Visual Studio **Manage Extensions** window and run the [VSIX installer](https://docs.devexpress.com/CodeRushForRoslyn/401982/getting-started/installation/install-from-visual-studio-marketplace) to install CodeRush. - **Download Manager**. If you already have a CodeRush subscription, you can download a registered version using the [DevExpress Download Manager](https://www.devexpress.com/ClientCenter/DownloadManager/) and install with the [.exe installer](https://docs.devexpress.com/CodeRushForRoslyn/402109/getting-started/installation/install-from-download-manager#run-the-exe-installer). [Blog Post](https://community.devexpress.com/blogs/markmiller/archive/2021/08/16/coderush-for-visual-studio-2022-preview-is-now-available.aspx) ## Performance Enhancements This release brings the following performance enhancements to CodeRush: ### Improved Startup Performance We have improved startup performance by optimizing our internal services. We also decreased the time to open CodeRush windows and visual elements. ### Improved Typing Performance Typing performance is faster in the following scenarios: editing documents, working with files and using Rich Comments. We've reduced the time required to expand code templates (the first time), and to show the "Paste Image" context menu. We’ve also improved performance when CodeRush applies code cleanup on saving a document or when CodeRush checks the availability of the Code Cleanup action on the toolbar. ### Optimized Memory Use We've reduced memory consumption in the "Jump to Symbol" feature and the XAML engine used in refactorings, navigation, code analysis, and other CodeRush features for projects containing XAML files. ### Optimized Tool Windows The Code Coverage and References tool windows now load faster when run the first time. We've also decreased the member graph build time. ### Optimized Debug Visualizer The Debug Visualizer is now faster when stepping over, into, or out of code blocks. [Blog Post](https://community.devexpress.com/blogs/markmiller/archive/2021/07/20/in-pursuit-optimum-performance.aspx) ## Code Places - Reorder Members with Drag & Drop The **File Places** tab of the Code Places window now supports drag & drop to quickly reorder members for the opened file. ![](https://i.imgur.com/hnZgdXI.gif) [Documentation](https://docs.devexpress.com/CodeRushForRoslyn/400622/navigation-and-search-tools/code-places) ## Unit Testing ### Test Runner The Unit Test Runner now shows white spaces and line breaks in test run results. ![](https://i.imgur.com/ATR8mgp.png) [Documentation](https://docs.devexpress.com/CodeRushForRoslyn/401723/configuration-options/unit-testing/test-runner#show-white-spaces-and-line-breaks-in-the-test-result) The Test Runner can also display "pretty-formatted" names for xUnit test cases in .NET Core projects. ![](https://i.imgur.com/aAowtra.png) To enable this functionality, check the "**Collect tests from assemblies when opening a solution and rebuilding projects**" option on the **Unit Testing** | **Test Runner** options page: ![](https://i.imgur.com/MdsyCqJ.png) [Documentation](https://docs.devexpress.com/CodeRushForRoslyn/115732/unit-testing-assistance#xunits-pretty-display-names-for-test-cases) ## Refactorings ### Move File to Folder The "Move File to Folder" moves a file to a folder matching the current namespace. If a corresponding folder does not exist in the solution, this refactoring will create one. ![](https://i.imgur.com/NJtwdqH.gif) [Documentation](https://docs.devexpress.com/CodeRushForRoslyn/403440/refactoring-assistance/move-file-to-folder) ### Move All Types to Files The "Move All Types to Files" refactoring allows you to quickly move all types (or only selected types) contained in one file into new separate files (one file per type). Each file will have the same name as the type it contains. ![](https://i.imgur.com/kLSERRA.gif) You can also run this refactoring from the **Solution Explorer**, targeting a selected project, folder, or folders containing source files with multiple types inside. ![](https://i.imgur.com/mVHAnxf.png) If you want to apply the "Move All Types to Files" refactoring during [code cleanup](https://docs.devexpress.com/CodeRushForRoslyn/115683/code-style-assistance/code-cleanup), enable the corresponding options for the **Move types to separate files** rule on the **Editor** | **C# (Visual Basic)** | **Code Cleanup** options page. ![](https://i.imgur.com/iy4S9ci.png) [Documentation](https://docs.devexpress.com/CodeRushForRoslyn/403390/refactoring-assistance/move-all-types-to-files) ## Organize Members You can now create rules for properties with backing fields to group and sort them with the following criteria: * Keep backing fields with their corresponding properties: ![](https://i.imgur.com/x8YG0UL.gif) * Group properties with backing fields by visibility: ![](https://i.imgur.com/fPRJ6IL.gif) [Documentation](https://docs.devexpress.com/CodeRushForRoslyn/403212/examples/organize-members/how-to-group-and-sort-properties-with-backing-fields) ## Rush Snippets Update for VS Code The latest **Rush Snippets** release introduces the following features: * New snippets for JavaScript projects ![](https://i.imgur.com/pWdDhHu.gif) * React Hooks **Rush Snippets** now supports snippets for the following hooks: useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useLayoutEffect, and useDebugValue. ![](https://i.imgur.com/h2BnAQV.gif) * Advanced imports generation With improved import generation, **Rush Snippets** adds any needed imports to the top of the file where they belong. ![](https://i.imgur.com/cY77YwY.gif) [Install](https://marketplace.visualstudio.com/items?itemName=DevExpress.rushsnippets) [Blog Post](https://community.devexpress.com/blogs/markmiller/archive/2021/08/16/rush-snippets-key-features-and-new-enhancements-javascript-support-advanced-imports-generation-and-more.aspx)