What's New in v20.2.4

Naming Conventions

EditorConfig Support

You can now configure naming conventions in CodeRush using the Visual Studio's naming styles options and corresponding settings in the EditorConfig file.

For example, the following EditorConfig defines a naming convention for classes and structures. This convention specifies all public classes and structs be capitalized and include a required “Name” suffix.

EditorConfig Support - CodeRush | DevExpress

After making this example change, CodeRush features such as Name Anonymous Type will use the specified naming conventions:

EditorConfig Support - CodeRush | DevExpress

Blazor Support

Declare Providers

CodeRush declaration providers are now available from @code sections in .razor files. You can use them to declare local variables, methods, parameters, fields, properties, and constants. Type is intelligently inferred from the surrounding code.

For example, you can run Declare Constant to create a constant of the corresponding type:

Declare Providers - Blazor Support, CodeRush | DevExpress

The red target picker marker allows you to choose the place where the created constant can be inserted.

You can configure which code providers use the target picker on the Editor | All Languages | Code Actions | Target Picker options page.

Target Picker Options - CodeRush | DevExpress

Resolved Issues

  • T941086 – Blazor - Event names are removed when the “Smart Duplicate Line” feature is applied
  • T949974 – Code Cleanup - The "Convert to string interpolation" rule throws an exception when the code contains a concatenation of interpolated strings
  • T949987 – Code Coverage - Node filtering does not work
  • T941407 – Debug Visualizer - Navigation from the Call Stack window is broken
  • T948582 – Formatting - Default settings of wrapping parameters conflict with the SA1116 and SA1117 StyleCop rules
  • T947961 – Formatting - The blank lines option is incorrectly processed for auto-implemented properties with the initializer
  • T949144 – General - An error is thrown when a light-bulb menu is opened in a multi-target project if the caret is placed on an undeclared identifier
  • T907131 – General - Some assemblies are not loaded from native images in Visual Studio 2017
  • T947644 – Organize Members - Properties with expression-bodied accessors are wrongly treated as auto-implemented properties
  • T946090 – Performance - A delay occurs on applying refactoring or Code Cleanup if a large number of assemblies is loaded
  • T944093 – Settings - A combo box crops text on the Organize Members options page
  • T938633 – Setup Wizard - The "Disable Markers" option is always selected on the Markers wizard page

What's New in v20.2.3

Blazor Support

Refactorings - Declare Event Handler

This release introduces the "Declare Event Handler (Razor code block)" and "Declare Event Handler (Razor code behind)" refactorings. These refactorings generate an event handler in the @code block of a .razor file and in a Razor code-behind file (razor.cs) for the selected method reference. The following screencasts show these refactorings in action:

  • Declare Event Handler (Razor code block)

    Declare Event Handler (Razor code block) - CodeRush | DevExpress

  • Declare Event Handler (Razor code behind)

    Declare Event Handler (Razor code block) - CodeRush | DevExpress

Organize Members Enhancements

You can now create rules to group members by:

  • Member type name (property/field type, method return type, etc.)
  • Member name

You can use Contains, StartsWith, and Equals string operations and RegEx expressions to group members. The screencast below shows event handler grouping:

Organize Members Enhancements - CodeRush | DevExpress

Organize Members also allows you to sort members by their type name.

Organize Members Enhancements - CodeRush | DevExpress

Navigation

Jump to Window

The Jump to window now clearly indicates entries found in the active file/type.

Jump to Window - CodeRush | DevExpress

Resolved Issues

  • T934252 – Code Providers - The "Add to Interface" provider processes the "default" value of a parameter as the "null" value

What's New in v20.1.8

Blazor Support

Extract Razor Component

This release introduces the "Extract Razor Component" code provider. This code provider allows you to extract a selected HTML markup into a new Razor component file (Component.razor). You can then reuse and share the Razor component in all your projects.

To use this code provider, just select the desired HTML markup you want to extract, invoke the Code Actions menu, and choose "Extract Razor Component". CodeRush creates the Component.razor file containing the extracted HTML markup and places this file in the Components project folder. After extraction is complete, you can modify the suggested component name.

Extract Razor Component - CodeRush | DevExpress

This code provider also adds new Blazor usings to the _Imports.razor file. If you prefer to add Blazor usings to the original .razor file you extracted from, disable the "Generate new Blazor usings in the _Imports.razor file" option on the Editor | C# | Programming Style CodeRush options page.

Extract Razor Component - Options - CodeRush | DevExpress

Note: The "Extract Razor Component" code provider is unable to extract code from the @code section and it will not extract code dependencies for HTML markup variables and events (for example, @onclick). You may need to add corresponding dependencies to the component's @code section after extraction to resolve any dependencies.

XAML Support

Element Spacing Formatting Options

We now support Visual Studio's Element Spacing formatting options. These settings allow you to control the arrangement of elements and text lines in your XAML document. You can override these settings, for example, to apply the "Place empty lines between elements in text content" option.

XAML Support - CodeRush | DevExpress

Unit Test Runner

Filtering Enhancements

The Test Runner now maintains grouping in the tests tree when filtering.

Unit Test Runner - CodeRush | DevExpress

Resolved Issues

  • T925052 – Code Cleanup - Some lines are moved to the right by one indent when Code Cleanup is executed
  • T928558 – Test Runner - Categories are wrongly recognized for MSTest .Net Core tests

What's New in v20.1.7

Code Templates

Blazor Support

New Blazor templates are here to help you create Blazor apps faster.

For example, typing bht followed by pressing Tab (or Space, depending on your settings) will create a Blazor component with an HTTP call.

Blazor Support - CodeRush | DevExpress

Components

TemplateDescription
bch Creates a child component with a parameter.
bcmp Creates a blank component.
bht Creates a component with an HTTP call.
cv Creates a <CascadingValue> component.
dav Creates a <DataAnnotationsValidator> component.
en Creates an <EditForm> component.

Input

TemplateDescription
icb Creates an <InputCheckbox> component.
idt Creates an <InputDate> component.
in Creates an <InputNumber> component.
it Creates an <InputText> component.
ita Creates an <InputTextArea> component.
isel Creates an <InputSelect> component.

Blazor Directives

TemplateDescription
ba Creates an @attribute directive.
bc Creates a Blazor @code block.
bf Creates a Blazor @functions block.
bh Creates an @inherits directive.
bj Creates an @inject directive.
bjc Creates an @inject IConfiguration configuration directive.
bjh Creates an @inject HttpClient Http directive.
bl Creates a @layout directive.
bm Creates a @model directive.
bp Creates a @page "/" directive.

Conditionals & Control Statements

TemplateDescription
do, dw Creates a @do (do/while) control statement.
fe Creates a @foreach control statement.
for, fri, frj Creates @for control statement.
if Creates an @if conditional.
ife, ifl Creates an @if @else conditional.
sw Creates a @switch conditional.
tc Creates a @try/catch block.
tcf Creates a @try/catch/finally block.
tf Creates a @try/finally block.
u Creates a @using statement.
wh, while Creates a @while control statement.

Lifecycle Methods

TemplateDescription
oar Creates an OnAfterRenderAsync override.
oar, Creates an OnAfterRender synchronous override.
oi Creates an OnInitializedAsync override.
oi, Creates an OnInitialized synchronous override.
onch Creates an OnChangeAsync override.
onch, Creates an OnChange synchronous override.
ops Creates an OnParametersSetAsync override.
ops, Creates an OnParametersSet synchronous override.
sr Creates a ShouldRender override.

Note: A comma at the end of a lifecycle method override template generates a synchronous version of the event.

HTML Support

We have also ported templates for HTML from CodeRush Classic. You can use these templates, for example, to create an HTML table:

HTML Support - CodeRush | DevExpress

For a complete list of ported templates, choose the HTML language and expand the "Raw HTML" folder on the "Editor | All Languages | Templates" options page.

CodeRush | DevExpress

Resolved Issues

  • T921366 – IntelliRush breaks auto-formatting on tag completion for XAML in Visual Studio 2019
  • T924268 – Performance – CodeRush causes typing slowdowns after opening a solution
  • T919754 – Refactoring - The "Use String.Format" refactoring is not available for the code that contains a variable’s value or the result of an expression
  • T919254 – Spell Checker - The Spell Checker throws System.NullReferenceException in Visual Basic
  • T919007 – Test Runner – The Test Runner used with code coverage should ignore assemblies with the [ExcludeFromCodeCoverage] attribute

What's New in v20.1.6

Changes in CodeRush Menu Position Customization for Visual Studio 2019

Visual Studio 2019 16.4 and up now allows you to specify where CodeRush menus should be placed, and so the older CodeRush option (on the Quick Setup options page) has been removed, which also gives you a slight performance boost on startup (saving about 1600ms on a typical dev machine).

By default, the CodeRush menu is placed in Visual Studio Extensions menu.

CodeRush Menu | DevExpress

If you want to reposition the CodeRush menu back to the top level of the Visual Studio menu bar (recommended for most devs who use CodeRush for a higher efficiency coding experience), follow these steps:

  • Open Visual Studio 2019
  • Select Extensions -> Customize Menu...
  • Uncheck the CodeRush entry in Extensions Menu tab
  • Restart Visual Studio

Extensions Menu - CodeRush | DevExpress

Blazor Support

The following CodeRush features are now available in @code sections inside .razor files:

'Smart Dot' and 'Smart Semicolon' are disabled by default. You can enable these features on the Editor | C# | Smart Keys options page.

Options Dialog - CodeRush | DevExpress

Refactorings

We have added the 'Move to Code Behind' refactoring. This refactoring moves code located in a razor page's @code section to a code-behind file (.razor.cs). If a code-behind file does not exist, this refactoring will create one. This refactoring also brings leading comments, attributes, and any necessary references to the code-behind file.

To use this refactoring, just place the caret in code within a @code section, press Ctrl+. or Ctrl+~ to invoke the Code Actions menu, select "Move to Code Behind" and press Enter.

Move to Code Behind - CodeRush | DevExpress

Code Style Enhancements

You can now configure code style in CodeRush using the following Visual Studio's options and corresponding settings located in the EditorConfig file:

  • 'this.' and 'Me.' preferences;
  • predefined type preferences;
  • 'var' preferences;
  • use expression body.

Code Style Enhancements - CodeRush | DevExpress

You can also run code cleanup to apply these settings to your code.

The previously redundant Local Declaration style; Use this/Me qualifier; Use Expression Bodies, and Built-in Type Names code style settings have been removed and no longer exist on the Editor | C# (Visual Basic) | Programming Style page of the CodeRush options dialog.

Resolved Issues

  • T890796 – General - CodeRush causes the System.NullReferenceException in the Visual Studio’s Extract Method refactoring
  • T903177 – Refactoring - The "Sync Namespace with Folder Structure" command is unavailable in a multiple-target framework project
  • T917662 – Unit Testing - Test debugging stops working with .NET Core 3.1.400-preview-015203 installed

What's New in v20.1.5

Unit Testing - Run Settings File Support

You can now exclude the following members, files, and assemblies from Code Coverage analysis using a .runsettings file:

  • Source files matching a specified path/name pattern.
  • Signed assemblies matching a specified public key token.
  • Members with a specified matching attribute.
  • Assemblies having a specified AssemblyCompany attribute value.

Run Settings File Support - CodeRush | DevExpress

For more information on the run settings file, see Customizing Code Coverage Analysis on Microsoft's website.

Blazor Support

Blazor developers get improved template and refactoring support in this release.

Code Templates

CodeRush now declares dependent namespaces when corresponding C# templates are expanded in .razor files. For example, the 'nsb' template (to create new StringBuilder instances) automatically adds the necessary '@using System.Text' namespace reference at the top of the .razor file.

Code Templates - CodeRush | DevExpress

Refactorings

  • Remove Type Quallifier is now available from the @code sections in .razor files.

    Remove Type Quallifier - CodeRush | DevExpress

  • Make Explicit now properly declares any needed namespace references when changing implicit variable declarations to variables that are explicitly-declared.

    Make Explicit - CodeRush | DevExpress

Resolved Issues

T895178 – Code Templates - The 'ms' template is expanded inside a variable declaration

What's New in v20.1.4

Unit Testing

In this release the CodeRush Test Runner gains the ability to show and run tests for all target frameworks in multi-framework projects. You can run tests for all target frameworks or for only tests in a selected framework.

Unit Testing - CodeRush | DevExpress

Code Formatting

CodeRush lets you configure line breaks around and within simple statements (statements that consist of a single line of code that ends in a semicolon, for example, method calls, return statements, throw statements, etc.) and empty code blocks.

Code Formatting - CodeRush | DevExpress

Code Style

We have added new Code Style options for expression bodies in methods, constructors, operators, properties, and other members.

Code Style - CodeRush | DevExpress

These code style settings are used by Declaration Providers, Declare Menu, Templates, and other features that generate new members from scratch.

You can also use the "Apply expression body styles" code cleanup rule to apply this new code style.

Code Style - CodeRush | DevExpress

ExecuteRefactoring Command

The new ExecuteRefactoring command allows you to quickly run a specified refactoring without the UI overhead of invoking the Code Actions menu. To bind a refactoring to a new shortcut, bring up the IDE | Shortcuts options page, create a new shortcut, select the ExecuteRefactoring command, and specify the name of the refactoring you want to invoke in the 'Parameters' text box. With the shortcut bound, you can invoke this refactoring instantly by pressing the shortcut when the caret or selection is over the code you want to change.

ExecuteRefactoring Command - CodeRush | DevExpress

You can find names of supported refactorings on the Editor | Language | Code Actions | Code Actions Catalog options page.

ExecuteRefactoring Command - CodeRush | DevExpress

The screencast below shows the "Ctrl+Shift+3" shortcut invoking Extract String to Resource.

ExecuteRefactoring Command - CodeRush | DevExpress

Resolved Issues

  • T893013 – Clipboard History stops working when the "Discover Tests from Assembly" option of Test Runner is enabled
  • T892197 – Code Cleanup - An error occurred when saving a Visual Basic file
  • T883411 – Code Places - Impossible to change font family and font size when the "Auto hide Code Places" option is enabled in the options page
  • T885388 – Debug Visualizer incorrectly displays lambda expressions
  • T892437 – Debug Visualizer - An error occurred while parsing stack trace in Visual Basic
  • T886841 – IntelliRush - Committing a selected item by pressing "Enter" inserts a redundant line break in Visual Studio 16.5.0 Preview 5.0
  • T893563 – Code Cleanup with Convert to string interpolation fails
  • T890704 – Unit Testing - Test icons for newly added test methods are lost after building a project

What's New in v20.1.3

Duplicate Code Detection

Now you can detect structurally similar blocks of С# code, in a solution or an active project, making it easier to identify improve the quality of your code bases.

To find duplicate code in a C# solution, open the solution, from the Visual Studio main menu select CodeRush | Windows | Duplicate Code, and then click Refresh in the Duplicate Code tool window to run duplicate code analysis.

Duplicate Code Detection - CodeRush | DevExpress

To restrict code analysis to the active project, toggle the 'Limit analysis to the active project' and click Refresh.

Duplicate Code Detection - CodeRush | DevExpress

When duplicate code analysis is complete, CodeRush shows found code blocks in the cluster list and highlights duplicate code in the code preview.

Duplicate Code Detection - CodeRush | DevExpress

To open the highlighted code in the Visual Studio editor, double-click it in the code preview.

Duplicate Code Detection - CodeRush | DevExpress

Duplicate code analysis results can be imported/exported to XML.

Duplicate Code Detection - CodeRush | DevExpress

You can configure the search engine's granularity level on the Editor | C# | Code Analysis | Duplicate Code page in the CodeRush Options dialog. The granularity setting lets you balance performance and memory usage against the quality and size of the result set.

Duplicate Code Detection - CodeRush | DevExpress

When the granularity is small, duplicate code analysis can find smaller blocks of duplicated code, but may take a long time and use a significant amount of memory during analysis.

When the granularity is large, the engine will use less memory and will collect results faster, but may not find smaller blocks of duplicated code.

Unit Testing

Run Settings File Support

With this release, you can exclude specific functions from Code Coverage analysis using a *.runsettings file.

Run Settings File Support - CodeRush | DevExpress

For more information on the run settings file, see the Customizing Code Coverage Analysis article on Microsoft's web site.

Test Discovery Enhancements

The CodeRush Unit Test Runner can now discover tests in source code and assemblies when you open a solution. This background discovery process aborts when tests are run or when the code is built. Once a project is built successfully, the Unit Test Runner will discover tests located inside these project assemblies.

Blazor Support

Code Templates

You can now expand C# templates inside @code sections in .razor files. For example, you can type in 'ps' and press Tab (or Space, depending on your settings) to create a property of type string.

Code Templates - Blazor Support, CodeRush | DevExpress

Performance Enhancements

This release includes faster performance and lower memory use in the code formatting and unused code analysis engines.

Resolved Issues

  • T874178 – Code Analysis - The 'Type can be moved to a separate file' diagnostic produces false positives for partial types
  • T872946 – Code Providers - The 'Add to Interface' provider links different methods to one renaming group if the previous rename operation is not confirmed
  • T871663 – Formatting - A single line comment in C# switch statements is duplicated and wrapped if it is initially positioned at the end of a code line
  • T871655 – Formatting - Incorrect indentation inside case statements after the wrapping rule is applied
  • T875390 – Spell Checker - The Spell Checker does not work with interpolated strings in Visual Basic

What's New in v19.2.9

Blazor Support

Refactorings and Code Providers

You can now apply refactorings and code providers from @code sections in .razor files.

Refactorings and Code Providers for Blazor - CodeRush | DevExpress

The following refactorings and code providers are all available for .razor:

  • Add/Remove Block Delimiters
  • Add Else Statement
  • Collapse/Expand Local Function
  • Collapse/Expand Method / Property
  • Collapse Accessors
  • Combine/Split Conditionals
  • Compress/Expand Assignment
  • Compress to/Expand Null Coalescing Operation
  • Conditional to Switch/Switch to Conditional
  • Convert to Initializer/Decompose Initializer
  • Convert to Math.Pow call
  • Convert to String Interpolation
  • Convert to System Type/Built -in Type
  • Convert to Tuple
  • Discard Variable
  • Exit Method Contract
  • Expand Ternary Expression
  • Flatten Conditional
  • ForEach to For/For to ForEach
  • ForEach to Linq
  • Introduce Format Item
  • Introduce Using Statement
  • Line Up Arguments/Parameters
  • Make Implicit/Explicit
  • Move Declaration Near Reference
  • Move Initialization To Declaration
  • Remove All Redundant Block Delimiters
  • Remove Redundant Assignment
  • Remove Redundant Delegate Creation
  • Remove Unused Member
  • Remove Unused Parameter
  • Remove Variable
  • Reverse Boolean
  • Reverse Conditional
  • Split Initialization from Declaration
  • Split Initialization from Declaration Near First Reference
  • Split String
  • Throw Exceptions Contract
  • Use Environment.NewLine
  • Use Expression Body
  • Use nameof
  • Use String Builder
  • Use String.Compare
  • Use String.Format
  • Use String.IsNullOrEmpty

Note: These refactorings are unable to update references in closed .razor files, so make sure all files that may be impacted by a particular refactoring are open in Visual Studio before applying it.

Navigation

You can now use the following navigation features in Blazor code:

  • Tab to Next Reference to highlight all references and quickly navigate among them.

    Tab to Next Reference for Blazor - CodeRush | DevExpress

  • The References window to find references to a selected type or identifier.

    References for Blazor - CodeRush | DevExpress

  • The Jump to window to quickly find and jump to a location of interest.

    Jump to for Blazor - CodeRush | DevExpress

We plan to add support for additional Blazor features, and as always, we welcome your feedback. You can contact us at any time through our Support Center.

Performance Monitoring

This release introduces the Performance Monitor - a diagnostics tool built into CodeRush which continuously analyzes CodeRush performance and records any issues, if found, into a log file.

If you experience any delays in Visual Studio with CodeRush loaded, you start performance logging by clicking the CodeRush | Windows | Performance Monitor menu item, and then clicking Start in the Performance Monitor window that appears. After you reproduce the performance issue, click Stop in the Performance Monitor.

Performance Monitor - CodeRush | DevExpress

The Performance Monitor will open the log file when analysis is complete. You can send this log file to our Support Center and we will put our devs to work analyzing the cause of the performance issue you're experiencing.

You can configure Performance Monitor settings on the IDE | Diagnostic | Performance Monitor options page.

Performance Monitor Options - CodeRush | DevExpress

Resolved Issues

  • T736485 – Formatting - Code formatting does not take into account settings overridden by an .editorconfig file
  • T867822 – Code Cleanup produces uncompilable code
  • T864868 – Performance - The "Pull Member Up" provider slows down
  • T862088 – Refactorings - The "Import Missing Namespaces" refactoring initiates a dead lock
  • T861360 – Rich Comments - The font size in Rich comments is changed after Visual Studio restarts
  • T867974 – Test Runner - The progress bar displays values greater than 100% when a project contains tests for multiple test frameworks
  • T854110 – Test Runner - The Test Runner does not provide the capability to remove a test from a session

What's New in v19.2.8

Refactorings and Code Providers

This release includes a useful new refactoring, Promote to Generic Parameter. This refactoring takes a class reference inside a method block, turns that into a generic type parameter to the method, and updates all calling code as you would expect. This can save a lot of time and keystrokes when you want to turn a normal method into a generic one.

To use this refactoring, just place the caret on a class reference in a method, press Ctrl+. or Ctrl+~ to invoke the Code Actions menu, and select "Promote to Generic Parameter".

Refactorings and Code Providers

HTML Support

Color Swatches and the CodeRush Color Picker are now available in HTML:

HTML Support - CodeRush, DevExpress

RepeatLastRefactoring Command

The new RepeatLastRefactoring command invokes the last refactoring executed in the session without bringing up the Code Actions menu. If you've just started a new Visual Studio session, this command will show the Code Actions menu. To execute this command, first bind it to a new shortcut on the IDE | Shortcuts options page, and then press this shortcut when the caret or selection is on active code you want to refactor.

RepeatLastRefactoring Command - CodeRush, DevExpress

Resolved Issues

  • T858740 – Code Templates – Type-casting templates should not be expanded in a variable declaration
  • T854088 – Formatting – The attribute indentation is lost
  • T857652 – Test Runner – The class links do not work in the Details tab
  • T854109 – Test Runner – Session modifications are lost when Visual Studio crashes

What's New in v19.2.7

Smart Dot

This release introduces Smart Dot to help you write function call chains faster with fewer keystrokes.

When the caret is in a parameterless function call and you want to access a member of the return value, you can now type the dot within parentheses (instead of moving the caret out and to the right). CodeRush will place the dot to the right of the closing parentheses allowing you to call another method in a call chain.

Smart Dot - CodeRush | DevExpress

If you have a complete method call and want to call another method in a call chain on the same line, you can type the dot at the end of the line (right after the final semicolon). CodeRush will place the dot and the caret to the left of the semicolon making easier to create method call chains.

Smart Dot - CodeRush | DevExpress

This feature is available for C#, Visual Basic, JavaScript, and TypeScript.

You can turn enable this feature (it is disabled by default) on the new Editor | {Language} | Smart Keys options page.

Smart Dot Options - CodeRush | DevExpress

Blazor Support

The following features are now available in Blazor code:

Resolved Issues

  • T852234 – Code Actions - The "Add copyright header" code action does not remove existing regions
  • T848932 – Code Cleanup adds unnecessary parentheses even if the corresponding provider is set
  • T847351 – Code Cleanup does not work in ASP.NET code behind
  • T852281 – Code Cleanup - "Cleanup On Save" triggers the "changed externally" message in Visual Studio for files that were not changed
  • T849206 – Naming Assistant overlaps IntelliSense for member declarations in Visual Studio 2019
  • T848737 – Rich Comments – URL without the (http://www) prefix is incorrectly processed on an image click
  • T851078 – Test Runner - The test output font in the "Details" tab should be monospaced

What's New in v19.2.6

Resolved Issues

  • T846931 – IntelliRush - The "Ctrl + Space" shortcut does not work if IntelliRush is enabled
  • T846616 – Settings - The "Unused Code Analysis" option page is not available
  • T843694 – Templates - Typescript - The "t?TsType?" template is expanded inside comments

What's New in v19.2.5

Unused Code Analysis

Unused Type, Unused Member, Unused Parameter, and Empty Event Handler diagnostics can now detect unused code in types, members, and method parameters, determined by a specified member/type accessibility.

In the CodeRush Options dialog, open the Editor | C# (Visual Basic) | Code Analysis | Unused Code Analysis options page and set the accessibility level (private, protected, private protected, protected internal, internal or public) for types, members, and methods containing parameters that you want to analyze.

Unused Code Analysis - CodeRush, DevExpress

XAML Support

You can now run the Move Type to Namespace refactoring in XAML code.

Move Type to Namespace - XAML Support, CodeRush | DevExpress

Resolved Issues

  • T835000 – Code Actions - Code actions are not available in XAML with Visual Studio 16.4 Preview 6
  • T836442 – Code Analysis - False positives of CRR0034 and CRR0035 for test methods
  • T838339 – Code Cleanup - The "Use expression bodies" cleanup rule incorrectly formats an expression body
  • T835241 – Formatting - XML Comment is indented incorrectly when it is placed after the region
  • T833452 – IntelliRush - IntelliRush does not insert the item selected with the mouse in code
  • T836559 – Refactoring - The "Reorder Parameters" refactoring does not work in Visual Studio 16.4 Preview 6
  • T837325 – Shortcuts - Some shortcuts work outside of the text editor context
  • T838293 – Test Runner does not recognize tests with the WpfTheory attribute
  • T831252 – Training window - Inconsistency in the shortcut description for the "Show unit test runner" command

What's New in v19.2.4

New XAML Features

  • The Remove Redundant Type Qualifier refactoring allows you to remove redundant type qualifiers when the target type is already defined, for example, on a style setter. This can improve code readability.

    Remove Redundant Type Qualifier - CodeRush, DevExpress

     

  • Move Type to Namespace and Rename Namespace to Match Folder Structure code actions now support changes in XAML code.

    Move Type to Namespace and Rename Namespace to Match Folder Structure - CodeRush, DevExpress

     

Code Analysis

New Diagnostics

New diagnostics help you find misspelled words in:

  • XML documentation comments
  • Comments
  • Strings
  • Verbatim strings
  • Identifiers (public, internal, protected internal, protected, private, and local)

New Diagnostics - CodeRush, DevExpress

Organize Members Enhancements

You can now create the following rules to group and sort corresponding members:

  • Event handlers

    Organize Members Enhancements - CodeRush, DevExpress

     

  • Interface implementations (for implicit and explicit interface implementations)

    If you want to wrap sorted interface implementations in dynamic regions, specify the {InterfaceName} built-in variable in the region name and enable the Wrap distinct groups in regions option.

    Organize Members Enhancements - CodeRush, DevExpress

Miscellaneous

  • We have improved the Implement ISerializable code provider. It now supports the NonSerialized attribute, creates the virtual GetObjectData method and adds Throw ArgumentNullException Contract in both the serialization constructor and ISerializable.GetObjectData method.

    NonSerialized attribute - CodeRush, DevExpress

     

  • The Training Window can now display templates with comments in the templates section if characters typed in the editor correspond to existing CodeRush templates.

    Training Window - CodeRush, DevExpress

     

  • We have improved the code preview appearance for the Selection Expand/Reduce feature. You can see this preview in the code editor if a portion of the selected code falls outside the screen boundaries.

    Selection Expand/Reduce - CodeRush, DevExpress

     

  • You can now use the Code Actions Menu to run the format document action. Press Ctrl+. or Ctrl+~ to invoke this menu, select "Format Document" and press Enter.

    Code Actions Menu - CodeRush, DevExpress

     

  • You can now use the Enable link in the Test Runner window to activate the test runner.

    Enable Test Runner - CodeRush, DevExpress

Resolved Issues

  • T817521 – Shortcuts – The "Num-(minus)" key does not work
  • T824083 – Test Runner – The Test Runner fails after updating Microsoft.NET.Test.Sdk from 16.2.0 to 16.3.0
  • T827845 – Test Runner – The Test Runner does not copy deployment items
  • T828210 – Unit Testing – The Code Coverage tool hangs indefinitely

What's New in v19.2.3

Refactorings

Create Partial Class Part

We have added the "Declare Partial Class Part" refactoring. This refactoring creates a class part in a new file, declaring the classes as partial.

To use this refactoring, just place the caret on a class or partial class, press Ctrl+. or Ctrl+~ to invoke the Code Actions Menu, select "Declare Partial Class Part" from the menu and press Enter.

Create Partial Class Part

Import Missing Namespaces

This release introduces the "Import Missing Namespaces" refactoring, which adds using directives for any types missing namespace references in the selection or active code element (based on caret position).

Note: This refactoring is only available in Visual Studio 2019.

Import Missing Namespaces

Code Places Enhancements

Sort Code Places

Staring with this release, CodeRush allows you to sort code places with the following criteria:

  • As Is (sorts members by the order in which they appear in the file)
  • By Name (sorts members alphabetically)
  • By Kind, then Name (sorts members by kind and then alphabetically)
  • By Accessibility, by Kind, then Name (sorts members by accessibility, kind, and then alphabetically)
  • By Kind, by Accessibility, then Name (sorts members by kind, accessibility, and then alphabetically).

You can configure code places sorting using the "Sort Code Places" option on the "Navigation | Code Places" options page.

Sort Code Places

Navigate to Member Body

Jump to member bodies by holding down the Alt key while clicking entries in the code places list.

Navigate to Member Body - CodeRush, DevExpress

Code Formatting

This release introduces new options for Spacing, Blank lines, and Other options pages.

Spacing

The "Single-line comments should begin with a single space" option allows you to add or remove a space before single-line comments.

Code Formatting - Spacing

Blank Lines

The "Blank lines before" option allows you to configure the number of blank lines appearing before a single-line comment.

Code Formatting - Blank Lines

Indent Options

The following options allow you to align comments and directives with their surrounded/following content:

  • Indent comments started at the first column
  • Indent region directives started at the first column
  • Indent conditional compilation directives started at the first column
  • Indent other directives started at the first column

Code Formatting - Indent Options, CodeRush | DevExpress

XML Documentation Comments Options

  • Wrap comments at column
    This option wraps comment long lines exceeding the specified column width.

  • Content Indent
    You can specify the indentation of content within XML tags.

You can now easily add or remove a single space in documentation lines and within tags with the following:

  • Documentation lines should begin with a single space
  • Add a space before self-closing tag
  • Add a space after opening tag and before closing tag

We have also added options to place tags on separate lines:

  • Place summary tags on separate lines
  • Place all tags on separate lines

XML Documentation Comments Options - CodeRush, DevExpress

Code Cleanup

Improved Options Page

We have completely redesigned the Code Cleanup options page. Providers now are grouped by categories. You can quickly find a required code provider specifying its name in the search field.

We have added the following options for each code action:

  • Apply in Action - allows you to select which code cleanup actions will be executed when you explicitly call code cleanup.
  • Apply on Save - allows you to select which code cleanup actions will be applied before files are saved.

Improved Code Cleanup Options Page - CodeRush, DevExpress

Organize Members Enhancements

  • We have added the "Explicit interface implementations" rule to the Default rule set.

    Organize Members - CodeRush, DevExpress

  • Static constructors and explicitly-implemented interface members are now sorted correctly in the StyleCop scheme.

  • Member rules are now applied based on the "Rule priority" option value, followed by rule order.

    Organize Members - CodeRush, DevExpress

  • Ability to wrap sorted groups in dynamic regions with built-in variables using the "Wrap distinct groups in regions" option.

    Organize Members Enhancements

Miscellaneous

Smart Duplicate Line/Selection Enhancement

CodeRush now underlines code which has been automatically changed by SDL and SDS based on previous edits or after numbers were automatically incremented. You can now use Ctrl+Z to undo these automatic changes (and get the original line/selection without the automatic replacements). If you want CodeRush to stop replacing a particular text string with another in a code file, right-click the text and select the new "Stop replacing X with Y in this file" context menu item.

Smart Duplicate Line/Selection Enhancement

AddAssemblyReference Text Command

We have ported the AddAssemblyReference text command from CodeRush Classic. This command adds a reference for the specified assembly to the active project when CodeRush expands a template. You can insert the AddAssemblyReference text command into the template expansion on the Editor | All Languages | Templates options page.

AddAssemblyReference Text Command

Resolved Issues

  • T818144 – Code Cleanup – Code cleanup expands auto properties when the "collapse property accessors" rule is set
  • T758588 – Code Cleanup – Region directives are not properly indented when applying code cleanup
  • T816679 – Code Cleanup – The "Make properties auto-implemented" code cleanup incorrectly works with WinForms Designer Files
  • T820912 – Decompiler – The decompilation process freezes at 69%
  • T818145 – Formatting – A region line and the element at the next line are indented incorrectly after code cleanup
  • T815645 – Static Code Analysis – "Unused type" analyzer false positive in the Visual Basic module
  • T814948 – Templates – The "Tab to Next Reference" navigation blocks a template expansion in JavaScript files in some cases
  • T816746 – Test Runner – Test fixture categories are not recognized for xUnit tests
  • T824083 – Test Runner – The Test Runner fails after updating Microsoft.NET.Test.Sdk from 16.2.0 to 16.3.0

What's New in v19.1.9

This update includes bug fixes and performance improvements.

Resolved Issues

  • T814395 – Formatting – Attributes in variables are indented incorrectly
  • T811308 – Formatting – The "Wrapping parameters" option doesn't work if a parameter has an attribute
  • T814632 – Naming Assistant – An incorrect IntelliSense item is inserted into the source code if the Naming Assistant is turned on
  • T812655 – Refactorings – The "Extract String to Resource" refactoring generates the lower case for a class name
  • T811636 – Templates – The new template folder is not shown at the top of a folder list after reopening the templates options
  • T811928 – Templates – Templates import mistakenly processes underlines in the file name
  • T814997 – Test Runner – The Test Runner does not run tests on the second attempt

What's New in v19.1.8

This update includes bug fixes and performance improvements.

Resolved Issues

  • T802253 – Code Analysis – Multiple code analysis messages are created for items in razor files
  • T808214 – Code Analysis – The CRR0050 diagnostic is incorrectly named in the Code Issues catalog for Visual Basic
  • T802340 – Code Cleanup – Attributes are kept in the same line if the Format Document rule is enabled
  • T804274 – Code Cleanup – Code cleanup produces incorrect code when "Apply visibility style" and "Format document" rules are enabled
  • T758588 – Code Cleanup – Region directives are not properly indented when applying code cleanup
  • T805349 – Code Places – Plus/Minus icons are inconsistent with the expand all/collapse all actions
  • T804883 – Formatting – Formatting incorrectly shifts braces in the Object initializer expression
  • T747922 – General – IntelliSense does not pick proper completions for typed text
  • T806425 – Navigation – The "Jump to symbol" navigation does not work after installing Visual Studio 16.3.0 Preview 2
  • T758358 – Performance – Slowdowns occur after the latest Visual Studio update
  • T804409 – Refactorings – The Boolean to Enum refactoring does not update call sites from other files
  • T809129 – Static Code Analysis – The "Unused local variable" issue should not be shown for catch variables in Visual Basic
  • T803744 – Templates – A template does not include Generic types in the class substitution
  • T410568 – Test Runner – The Test Runner used with code coverage requires an admin password
  • T809326 – Refactorings – The convert to string interpolation refactoring does not work correctly when the statement already uses interpolation

What's New in v19.1.7

Diagnostics

This release gets the following code analysis diagnostics:

  • Unused local variable - identifies local variables which are never used in your code and can be safely deleted.

    Unused Local Variable - CodeRush, DevExpress
  • Local variable can be replaced with discard - identifies unused or assigned only variables which can be replaced with a discard.

    >Local variable can be replaced with discard - CodeRush, DevExpress
  • Redundant field initialization - identifies redundant field initialization values which can be safely removed.

    Redundant field initialization - CodeRush, DevExpress
  • The type can be moved to a separate file - identifies types whose name differ from the file name. These types can be moved to a separate file (with the same name as the type) to improve code readability and discoverability.

    The type can be moved to a separate file - CodeRush, DevExpress
  • The type name does not correspond to the file name - this issue appears in the Code Issues window if a type name does not match the name of the file that contains it.

    The type name does not correspond to the file name - CodeRush, DevExpress
  • Environment.NewLine can be used - identifies "\r\n" string values, which can be converted to Environment.NewLine calls.

    Environment.NewLine - CodeRush, DevExpress
  • String.Compare can be used - identifies string comparison expressions which can be replaced with a String.Compare call.

    String.Compare - CodeRush, DevExpress
  • String.IsNullOrEmpty can be used - identifies expressions that test a string for null (or "Nothing" in Visual Basic) or an empty value, which can be replaced with a String.IsNullOrEmpty call.

    String.IsNullOrEmpty - CodeRush, DevExpress
  • String interpolation can be used - identifies composed string expressions which can be converted to interpolated strings.

    String Interpolation - CodeRush, DevExpress

Refactorings

We have new refactorings to help you remove unused variables from your code:

  • Remove Variable

    Remove Variable Refactoring - CodeRush, DevExpress
  • Remove Variable with its Initializer

    Remove Variable with its Initializer Refactoring - CodeRush, DevExpress
  • Remove Discard Variable

    Remove Discard Variable Refactoring - CodeRush, DevExpress

    We have also added the Discard Variable refactoring that replaces unused or assigned-only variables with discard:

    Remove Discard Variable Refactoring - CodeRush, DevExpress

Code Cleanups

New Cleanup Rules

You can use the Code Cleanup feature with the Remove unused variables rule to remove unused variables across multiple files at once.

Cleanup Rules - CodeRush, DevExpress

The Replace unused variables with discard code cleanup rule replaces unused or assigned only variables with discard.

Cleanup Rules - CodeRush, DevExpress

To apply these code cleanup refactorings, make sure the corresponding rules are enabled in the Editor | Language | Code Cleanup options page.

Code Cleanup Options - CodeRush, DevExpress

Run Code Cleanup for Folder

You can now run Code Cleanup for a selected folder (or folders) in the Solution Explorer. Simply right-click the folder you want to clean and select CodeRush Cleanup.

CodeRush Cleanup - DevExpress

The progress window shows what files CodeRush is cleaning:

CodeRush Cleanup Progress - DevExpress

If code cleanup is cancelled while it is still in progress, all code remains unchanged.

Code Places Enhancements

Favorite Code Places

You can favorite code places and access them instantly in the Favorites tab. Favorite places are saved between sessions.

Favorite Code Places - CodeRush, DevExpress

To favorite a code place, right-click a desired member in the 'File Places' tab, select 'Add to Favorites' -> 'Add to new group' in the invoked context menu, enter a group name in the New Favorites Group dialog and press Enter.

CodeRush marks the favorite code place with a star and adds the code place to the newly-created group in the Favorites tab.

Favorites Group - CodeRush, DevExpress

You can also add code places to different favorites groups. Right-click a code place in the 'File Places' tab, and select the desired group in the 'Add to Favorites' sub menu.

Favorites Group - CodeRush, DevExpress

Collapse/Expand Code Places

The new Collapse All/Expand All buttons in the 'Code Places' window let you quickly collapse or expand all the code places and the corresponding members in the code editor.

Collapse/Expand Code Places - CodeRush, DevExpress

Selection Expand/Reduce Enhancement

When using the Selection Expand/Reduce feature you can see a code preview in the code editor if a portion of the selected code falls outside the screen boundaries.

Selection Expand/Reduce Enhancement - CodeRush, DevExpress

To enable this new code preview, go to the 'Editor | All Languages | Selection' options page and enable the "Show code preview hints when selection changes" option.

Options Selection - CodeRush, DevExpress

Resolved Issues

  • T759564 – Bookmarks – Bookmarks are not saved after changing the project properties
  • T753492 – Code Cleanup – Code cleanup incorrectly generates an explicit type name for the List<string> type
  • T758588 – Code Cleanup – Region directives are not properly indented when applying code cleanup
  • T756057 – Code Coverage – The Code Coverage window does not display the hierarchical tree of classes
  • T751963 – Navigation – "Jump to File" does not navigate to the correct recent item
  • T758358 – Performance – Slowdowns occur after the Visual Studio latest update
  • T756649 – Refactoring – The "Convert To Function" refactoring does not work for a local function

What's New in v19.1.6

This update includes bug fixes and performance improvements.

Resolved Issues

  • T749362 – Code Cleanup – "Cleanup on Save" removes necessary namespace references when ORMDataModel generates template classes
  • T753143 – Code Cleanup – The "Add Copyright header" cleanup applied on save changes the existing copyright header
  • T754408 – Code Cleanup – The "Apply Code Cleanup when saving a document" option should ignore designer generated files
  • T753489 – Code Providers – The "Declare Provider encountered an error and has been disabled" notification appears after opening a Xamarin application
  • T751048 – Formatting – Arithmetic operations are incorrectly wrapped in the throw statement
  • T749922 – Formatting – The "Wrap if long or multiline" option does not work for a class
  • T750286 – IntelliRush – IntelliRush does not show information about class members with the latest update of Visual Studio 2019
  • T751963 – Navigation – "Jump to File" does not navigate to the correct recent item
  • T752813 – Performance – The Code Places feature increases memory use
  • T744162 – Performance – Rich Comments cause slowdowns on text edit
  • T753437 – Performance – Slowdowns occur when a format statement is applied after typing ";"
  • T753930 – Refactorings – The "Decompose Parameter" refactoring throws an error when it is invoked in non-compilable code
  • T751407 – Refactorings – The Make Explicit refactoring declares a simple type name instead of the full one in Visual Basic
  • T749874 – Region Painting – An additional extension's region text overlaps the CodeRush region
  • T752606 – Spell Checker – The Spell Checker calculates spans incorrectly for the verbatim string if tabs are used for indentation
  • T747275 – Templates – A template cannot be saved to a nested folder in the "Create Template From Selection" dialog
  • T750705 – Templates – The ForEach command is applied only once
  • T732938 – Unit Testing – Code Coverage does not support MSTests in Visual Studio 2019
  • T748912 – Unit Testing – Parameterized test fixtures set as ignored are not reported correctly

What's New in v19.1.5

New Refactoring - Inline Lambda

This release introduces Inline Lambda refactoring. This refactoring сreates a lambda expression and inlines the referenced delegate.

To use this refactoring, just place the caret on a method reference within a delegate creation statement, press Ctrl+. or Ctrl+ to invoke the Code Actions Menu, select Inline Lambda from the menu and press Enter.

New Refactoring - Inline Lambda

CodeRush Menu - Now Top-level in Visual Studio 2019

The CodeRush menu now is positioned at the top level of the Visual Studio menu bar.

CodeRush Menu - Now Top-level in Visual Studio 2019

If you want to move the CodeRush menu position down into the Visual Studio 2019 Extensions menu (which makes CodeRush harder to use - not recommended), enable the "Nest the CodeRush menu inside the Visual Studio Extensions menu (restart required)" option.

CodeRush Menu - Quick Setup Options

Code Places Enhancements

TypeScript / JavaScript Support (Beta)

Code Places now works in JavaScript and TypeScript code.

TypeScript / JavaScript Support

Note: TypeScript / JavaScript support for Code Places is currently in beta.

Improved Performance for Large Files

We have significantly improved Code Places performance for large files (files with more than 3000 lines of code) in the following scenarios:

  • Opening/closing documents
  • Moving the caret through documents
  • Switching between documents

NGEN Notification in Feature Advisor

Starting with this release, you can see the "Improve Performance with NGEN" notification appearing in the Feature Advisor. In previous versions, NGEN notifications were shown in a message near the top of the IDE.

NGEN Notification in Feature Advisor

You can use the IDE/NGEN Options settings to configure your preferred NGEN performance-enhancing behavior.

NGEN Notification in Feature Advisor

Resolved Issues

  • T746250 – Code Actions – The "Add Contract - Throw Exceptions Contract" code action generates incorrect code in Visual Basic
  • T743951 – Code Cleanup – Code Cleanup does not work with an unused local constant declared in a private sub in Visual Basic
  • T736400 – Code Places – Code Places slows down on the load of large files
  • T747090 – Formatting – Comments appeared after the invalid code part are duplicated on the save operation
  • T742824 – Rich Comments – Сomments in Python looks oversized
  • T705609 – Settings – The Organize Members configuration can't be saved
  • T742681 – Test Runner does not use an xunit´s TestFrameworkAttribute
  • T745917 – Test Runner incorrectly runs tests with custom xunit attributes
  • T746846 – Unit Testing – Code Coverage does not work for MSTest v1 under Visual Studio 2019

What's New in v19.1.4

Visual Studio 2019 version 16.1 Support

CodeRush now installs and runs in Visual Studio 2019 version 16.1 (as well as in 16.2 Preview).

Resolved Issues

  • T741770 – CodeRush 19.1.3 does not install in VisualStudio Community 2019 preview
  • T743709 – Navigation - Find All References - No references found in a WPF project

What's New in v19.1.3

Visual Studio 2019 Support

  • You can now run MSTests with coverage.
  • IntelliRush, Naming Assistant and String Format Assistant now work as expected in Visual Studio 2019.

Name Anonymous Type

The Name Anonymous Type refactoring gets a port from CodeRush Classic. This refactoring replaces the anonymous type with a newly-declared type.

Just place the caret on an anonymous type, press Ctrl+. or Ctrl+~ to invoke the Code Actions Menu, select Name Anonymous Type from the menu and press Enter.

Name Anonymous Type - CodeRush, DevExpress

You can configure the Name Anonymous Type refactoring in the Editor | C# (Visual Basic) | Code Actions | Name Anonymous Type Settings options page.

Name Anonymous Type - CodeRush, DevExpress

New Diagnostics, Refactorings, and Code Cleanups

In this release, we have added the following code analysis diagnostics:

  • Unused Type
  • Unused Parameter

These diagnostics identify types and parameters that are never used in your code (and can be deleted).

New Diagnostics, Refactorings, and Code Cleanups - CodeRush, DevExpress

You can use the Remove Unused Type and Remove Unused Parameter refactorings to quickly remove the corresponding unused types or parameters.

The following screencast shows Remove Unused Type in action:

New Diagnostics, Refactorings, and Code Cleanups - CodeRush, DevExpress

If you want to remove unused types and parameters across multiple files at once, you can use the Code Cleanup feature with Remove unused types, Remove unused private types, and Remove unused parameters rules enabled.

New Diagnostics, Refactorings, and Code Cleanups - CodeRush, DevExpress

Resolved Issues

  • T729773 – Code Places – The Code Places window incorrectly displays the structure of an opened file when the region contains an attribute
  • T734061 – Formatting – A redundant empty line is inserted after a local function if this function contains an if/else branch
  • T735870 – Formatting – Incorrect indentation for an await statement with the specified "Chained Method Calls" option
  • T728540 – Formatting – The "Add whitespace before closing /> for empty elements" option has no effect in XAML
  • T732935 – Formatting – The "Chained Method Calls" formatting option works incorrectly
  • T728015 – IntelliRush – IntelliRush does now allow inserting a lambda expression after a user types "=>" in Visual Studio 2019
  • T737630 – IntelliRush – IntelliRush incorrectly expands the highlighted items when the VB.NET "With" statement is used in Visual Studio 2019
  • T729971 – IntelliRush – IntelliRush incorrectly completes the end tag in XML document comments in Visual Studio 2019
  • T729124 – Naming Assistant – The Naming Assistant does not provide intellisense items in Visual Studio 2019
  • T728989 – Performance – The "Gathering Suggestions" dialog opens slow when renaming properties with custom attributes
  • T729475 – Performance – Visual Studio shows the NGen dialog on each start
  • T732666 – Refactoring – The "Break Apart Parameters" refactoring does not work for ternary expressions in Visual Basic
  • T731365 – Refactoring – The "Convert to Auto-implemented Property" refactoring creates incorrect code with the deprecated OnPropertyChanged method call in the property setter
  • T738340 – Settings – The Smart Semicolon feature cannot be enabled in the Setup Wizard
  • T726804 – Show Color – Color picker does not remember "Sort by" settings
  • T735734 – Spell Checker – Spell Checker incorrectly processes escape sequences in a string literal
  • T729960 – String Format Assistant – String Format Assistant does not work when pressing Ctrl+Space in Visual Studio 2019
  • T730478 – String Format Assistant – String Format Assistant is broken in the Blue Visual Studio theme
  • T729119 – String Format Assistant – String Format Assistant does not support filtering on typing
  • T736181 – String Format Assistant – The String Format Assistant window opens when writing interpolated text in incorrect context