CodeRush - What's New in Older Versions

What's New in v19.2.10

Resolved Issues

  • T893013 – Clipboard History does not work if the "Discover Tests from Assembly" option is enabled in the Test Runner
  • T875734 – Code Cleanup - An exception is thrown if code contains the VB.NET 'Handles' clause
  • T876391Code Coverage fails with the InvalidProgramException exception in a specific case with catch statements and when clauses
  • T921657 – Code Places - The Code Places window is not visible after installing the Visual Studio 16.7.0 update
  • T872946 – Code Providers - The "Add to Interface" provider links different methods into one group if the previous rename operation is not confirmed
  • T885388 – Debug Visualizer incorrectly displays lambda expressions
  • T871663 – Formatting - A single line comment is duplicated and wrapped in C# switch statements 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
  • T886841 – IntelliRush - Visual Studio 16.5.0 Preview 5 - Committing a selected item by pressing the "Enter" key adds a redundant blank line
  • T875700 – Refactorings - "Conditional to Switch" does not remove redundant parentheses
  • T876762 – Refactorings - "Convert to Property with Backing Field" generates code with a compilation error
  • T875699 – Refactorings - "Switch to Conditional" does not add necessary parentheses
  • T891960 – Refactorings - The "Reorder Parameters" refactoring throws an exception on check availability in Visual Studio 16.7 Preview
  • T876585 – Selection - Code preview hint is shown if it is disabled in the "selection expand/reduce" option
  • T875390 – Spell Checker - Spell Checker does not work with interpolated strings in Visual Basic
  • T874180 – Static Code Analysis - The "Variable is assigned twice in succession" diagnostic - False positive for discards

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

What's New in v18.2.9

Visual Studio 2019 Support

CodeRush now installs and runs in Visual Studio 2019.

Unit Test Builder

This release gets a port of the Unit Test Builder from CodeRush Classic, which helps you generate test cases for members of interest as you step through code.

The Unit Test Builder supports NUnit, XUnit and VSTest frameworks.

To generate a new test case as you are stepping through a debug session, place the caret on the method you want to test, invoke the Code Actions menu (with Ctrl+. or Ctrl+~), select the "Generate Test In" menu item and select the target location for the new test. Tests can be added to existing test classes or to a new test fixture.

After your debug session ends, CodeRush will generate unit test stubs for all the tests created, complete with calls to the methods the feature was invoked from. You can add assertions and/or modify the initialization as needed.

Unit Test Builder - CodeRush, DevExpress

New Refactorings and Code Providers

We have added the Initialize code provider. This provider initializes the variable or the field under the caret with the default type value.

New Refactorings and Code Providers - CodeRush, DevExpress

Just place the caret on a variable or the field, press Ctrl+. or Ctrl+~ to invoke the 'Code Actions' Menu, select 'Initialize' from the menu and press Enter.

New Refactorings and Code Providers - CodeRush, DevExpress

This code provider is available in C# and Visual Basic.

TypeScript Support - Navigation Providers

The following navigation providers are now available in TypeScript code:

  • Base Types
  • Derived Types
  • Members
  • Instantiations
  • Implementations
TypeScript Support - Navigation Providers, CodeRush | DevExpress

LaTeX Formulas Support (Beta)

This release introduces beta support for LaTeX formulas in comments.

LaTeX Formulas Support - CodeRush | DevExpress

You can view and edit fully-formatted mathematical formulas in source code comments (in C#, Visual Basic, JavaScript, TypeScript, HTML, XAML, CSS, and F# code).

You can also change a formula's foreground color, background color and size.

LaTeX Formulas Support - CodeRush | DevExpress

LaTeX support is currently in beta, and supports a subset of the LaTeX formula commands.

We have also added templates to make LaTeX formula creation easier.

TemplateDescriptionExpansion Example
/fLaTeX formula in C#.// <formula >
'fLaTeX formula in VB.' <formula >
!fLaTeX formula in XAML.<!-- <formula > -->
\.Centered dot\cdot
\..Three centered dots\cdots
\8Infinity\infty
\bBraces{}
\bcaBig Cap\bigcap_{lower}^{upper}
\bcuBig Cup\bigcup_{lower}^{upper}
\cpCo-product\coprod_{lower}^{upper}
\fFraction\frac{numerator}{denominator}
\lLimit\lim_{x\to\infty}
\lrLeft & Right Parens\left( \right)
\nrnth Root\sqrt[root]{value}
\oCircle symbol\circ
\oiContour integral\oint
\pProduct\prod_{lower}^{upper}
\sSum\sum_{lower}^{upper}
\sqSquare Root\sqrt{value}
\vVector\vec{numerator}

These templates make it easy to create formatted formulas inside code comments from scratch.

LaTeX Formulas Support - CodeRush | DevExpress

New CodeRush templates also include support for Greek letters in LaTeX formulas. To get a Greek letter in a formula, just enter a "." followed by the letter (or letter abbreviation) you want. For example, to reference the Greek pi symbol, use ".p". To get an uppercase Greek letter, use an uppercase letter after the dot. For example, to get an uppercase Delta symbol, use ".D". For a complete list of supported Greek symbols, see the Comments\LaTeX\Greek Symbols folder on the CodeRush Templates options page.

LaTeX Formulas Support - CodeRush | DevExpress

The LaTeX Formulas Support feature ships disabled by default. You can enable LaTeX formula support on the Rich Comments options page.

LaTeX Formulas Support - CodeRush | DevExpress

Code Places Enhancements

  • Left-Right Dock Option

    We have added the 'Dock Options' to the 'Navigation | Code Places' options page. You can now dock the Code Places panel to the right/left margin.

    Left-Right Dock Option - CodeRush | DevExpress
  • Single-Click Navigation

    You can now jump to the desired type member in the code places list with a single click. Just set the 'Navigate to the member' option to 'Single click' on the 'Navigation | Code Places' options page.

    Single-Click Navigation - CodeRush | DevExpress

Known Issues

  • T728015 – IntelliRush does now allow inserting a lambda expression after a user types "=>" in Visual Studio 2019
  • T729124 – Naming Assistant does not provide any intellisense items in Visual Studio 2019
  • T729119 – String Format Assistant does not support filtering during typing

Resolved Issues

  • T726495 – Code Formatting – The local function with the lambda expression is formatted incorrectly
  • T726351 – Code Places – The Code Places panels shown for multiple source control diff views does not leave much space to view the code
  • T721690 – Code Places – The Options page is missing under the Navigation option node
  • T726916 – General - Visual Studio 2019 RC3 - InvalidOperationException with NodeJs in the log file
  • T719550 – General – NGen does not work in Visual Studio 2019 Preview
  • T722858 – Markers – CodeRush drops markers even if the "Enable markers" option is disabled
  • T722534 – Naming Assistant – The Naming Assistant works incorrectly in Visual Studio 2019 Preview
  • T720387 – Navigation – "Jump to Symbol" causes the access denied exceptions when Quick Nav filters are changed during filtering
  • T724618 – Refactoring – The "Add to interface" refactoring destroys methods in the existing class
  • T723733 – Refactoring – The "Convert to Constant" refactoring works incorrectly when it is applied to a read-only field
  • T725570 – Rich Comments – Rich comments do not work in C++
  • T723559 – Settings – The Code Cleanup options page does now show code changes in before cleanup and after cleanup previews
  • T724259 – Settings – The "Locals" filter is not available on IntelliRush menu
  • T724119 – Smart Semicolon – A semicolon goes in an incorrect place in a certain scenario in JavaScript/TypeScript code
  • T722629 – Static Code Analysis – CRRSP01: False positive in certain circumstances with words following a new line char
  • T724175 – Static Code Analysis – The "Possible NullReferenceException" code issue gives false reports
  • T725542 – Static Code Analysis – "Possible NullReferenceException" false positive for fields with value types
  • T728539 – Templates – Typing "if … or" expands to "||" in a JavaScript comment
  • T722875 – Test Runner – The Test Runner incorrectly calculates the count of tests grouped by multiple categories

What's New in v18.2.8

Code Places

This release introduces Code Places. This feature helps you find your way through large code bases and quickly explore and unfamiliar code.

The Code Places window shows type declarations (class, interfaces, delegates, enums), members (methods, properties, events) and regions from the active C# or VB.NET file. The Code Places window contains the following tabs:

  • File Places – visualizes types and members for the active file.

    File Places - CodeRush, DevExpress
  • History - displays changed code places for the active file.

    History - CodeRush, DevExpress
  • Global History – displays information about changed code places in all files.

    Global History - CodeRush, DevExpress

Navigation is easy. Just open the File Places tab, and double-click the desired type member in the code places list. CodeRush moves the caret to the corresponding declaration and scrolls the view if necessary to show this code in the editor.

File Places Navigation - CodeRush, DevExpress

You can use the search field in each tab to find a specific member. CodeRush filters types and members dynamically as you type.

Find Places Search - CodeRush, DevExpress

Code Places are fully synchronized with the editor. Changes to code (e.g., adding, removing or replacing a member) results in immediate updates in the File Places tab.

Code Places is turned off by default. To enable it, use the CodeRush Visualize toolbar.

Code Places - CodeRush, DevExpress

Unit Testing Improvement

Now you can run MS Test unit tests using the Test Runner in Visual Studio 2019 Preview.

Resolved Issues

  • T713331 – Code Cleanup – The "Apply 'Optional parenthesis' style to invocations (constructor, method or property)" cleanup rule incorrectly works in the DataSet designer file in VB
  • T714044 - Code Cleanup – The "Make properties auto-implemented" cleanup rule produces compilation errors in the DataSet designer file in VB
  • T718290 - Code Cleanup – The "Remove all comments" cleanup rule removes line breaks between task-based comments
  • T713102 - Code Cleanup – The "Remove redundant 'MyBase' qualifier" cleanup rule incorrectly works in the DataSet designer file in VB
  • T715055 - Code Coverage – The System.InvalidProgramException exception is raised when running tests
  • T718589 - General – CodeRush causes the System.ArgumentException error when opening database objects in design view
  • T705499 - Refactoring – The "Declare property with initializer" refactoring declares the read/write property in a read-only struct
  • T714909 - References Window – The References window does not refresh tab text based on an exposed reference
  • T711195 - Region Painting – Region painting places the caret in the wrong place if the "virtual space" option is enabled
  • T714881 - Settings – The cursor is moved one line up when declaring a method variable if there is a region above
  • T714421 - Settings – "Jump to Symbol" does not keep settings after the solution is closed
  • T717739 - Show Color – Show Color does not work in XAML for Visual Studio 2019 Preview 3
  • T714575 - Templates – "as" and "ai" templates generate read/write properties in a read-only struct
  • T717925 - Unit Testing – Unit test executed in Test Runner crashes for conditional appearance in code coverage mode

What's New in v18.2.7

Navigation - Jump to XAML Element

In this release, we have added the capability to navigate to a XAML element. You can jump to a named element from any place of your XAML code.

Just press the Ctrl+Alt+N shortcut (or Num Del if enabled via the CodeRush Setup Wizard) to invoke the Jump To window, choose the XAML Element item in this window, and select the desired element from the 'Available locations' list with the Enter key. CodeRush will move the caret to the specified element, bringing it into view.

You can also type an element name in the search field, and CodeRush will filter locations dynamically as you type.


Navigation - Jump to XAML Element, CodeRush | DevExpress

JavaScript & TypeScript Support

The following features are now available in JavaScript and TypeScript code:

Resolved Issues

  • T705632 - Bookmarks - The 'Move Line Up' and 'Move Line Down' commands executed twice delete the numbered bookmarks on a line.
  • T708563 - Clipboard History - Items are incorrectly inserted when you press 'AltGr+A number key' on the Swedish keyboard.
  • T708969 - Code Cleanup - The 'Remove all comments' cleanup rule should skip task-based comments.
  • T707044 - Debug Visualizer breaks source code debugging.
  • T707103 - Decompiler - An unhandled exception is thrown at the startup of a standalone decompliler.
  • T710572 - General - CodeRush does not show references by pressing Shift+12 if Resharper is installed.
  • T708055 - Navigation - The 'Jump to Declaration' navigation goes into the view instead of the class declaration in MVC.
  • T705499 - Refactoring - The 'Declare property with initializer' refactoring declares read/write property in a read-only struct.
  • T707985 - Refactoring - The keyboard becomes unresponsive after invoking the 'Extract String to Resource' refactoring.
  • T711195 - Region Painting - Region painting places the caret to the wrong place if the 'virtual space' option is enabled.
  • T708010 - Templates - The context menu is broken in the 'Create Template from Selection' dialog.
  • T705927 - Templates - Smart Constructor generates an empty constructor on selecting members to initialize.
  • T711432 - Unit Testing - Sorting by test category works only for the first attribute.
  • T706240 - Unit Testing - An unexpected error is raised when tests ran for the second time.
  • T706298 - Unit Testing - The Test icon disappears in the code editor for private async method tests marked by [Theory] and [ClassData] attributes in the .Net Core project.

What's New in v18.2.6

String Format Assistant

CodeRush now provides IntelliSense for the String.Format and interpolated string format items.

String.Format Intellisense

This window displays a list of format specifiers, previewing the formatted results for each.

Format Preview

This feature is available in C# and Visual Basic.

Format specifier IntelliSense appears automatically when the caret is in the format item portion of the string (for example, "{0}", "{1}", etc.) and you type the ":" character, or if you press the default Visual Studio IntelliSense shortcut, Ctrl+Space.

After you selected a format specifier, you can insert it into your code with the Enter key.

If you continue to type format specifiers, CodeRush will filter the list to only include items containing the typed characters.

Format List Filter

Update Notification Window

The new "Update Notification" window alerts you when a new version of CodeRush has been installed, and also highlights cool features included in this update.

Update Notification Window

Resolved Issues

  • T702428 - Static Code Analysis - CRRSP01: A misspelled word has been found - False positive with interpolated strings using a format string
  • T701852 - Spell Checker - The "SpellCheckerCodeFixProvider encountered an error and has been disabled." error occurs after correcting a misspelled word in the comments section
  • T701014 - Region Painting – Regions are rendered incorrectly after horizontal scrolling
  • T701019 - Region Painting – Region lines are rendered with different length
  • T701031 - Region Painting - The caret can be placed in the middle of the painted region after moving between code lines

What's New in v18.2.5

Resolved Issues

  • [T699511] - Code Cleanup - The "Use expression bodies" cleanup rule makes expression-bodied properties read-only.
  • [T699881] - IntelliRush - Visual Studio 2019 Preview - Committing a selected item by pressing the "Enter" key adds a redundant blank line.
  • [T698700] - Performance - CodeRush slows down in Visual Studio 2017 when debugging (or in debug mode).
  • [T700932] - Refactorings - The Pull member up refactoring throws an InvalidOperationException exception in Visual Basic code.
  • [T696221] - Selection – The Comment/Uncomment selection does not work in XAML if existing comments are selected.
  • [T697216] - Settings - Characters entered at the end of the found text are displayed at the beginning of a template in the template editor.
  • [T698713] - Settings - Shortcuts' text is entered incorrectly in shortcuts settings if the Dvorak keyboard layout is used.
  • [T698777] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic works incorrectly in switch statements with the pattern type.

What's New in v18.2.4

Sync Namespace With Folder Structure

With the Sync Namespace with Folder Structure feature, you can quickly rename all namespaces within a project so they match the project's folder structure.

Sync Namespace With Folder Structure - CodeRush, DevExpress

Options Layers - Smart Save

Now CodeRush more intelligently distributes settings modifications by options layers. If you modify an option, CodeRush updates the layer in which this option was previosly set. If an option is not found in existing layers, it will be saved to the app data layer.

ASP.NET MVC Support

Now, the Jump to Declaration navigation provider supports ASP.NET MVC partial views. You can navigate from a partial view's reference to the declaration with a single keystroke (F12).

ASP.NET MVC Support - CodeRush, DevExpress

Refactoring Enhancements

Now the Make Implicit/Explicit refactorings support out variables .

Resolved Issues

  • [T687066] - General - The NullReference exception when applying the "Find And Replace" command in Solution Operator into account
  • [T688259] - Formatting - Wrong indentation of constrictor initializer arguments
  • [T696131] - Mega Super Copy does not work
  • [T691087] - Rich Comment with "#" symbols in .gitignore files works incorrectly
  • [T677470] - Settings - Spellchecker cannot be turned off
  • [T689198] - Show Color - Color Picker inserts a wrong color in a CSS file
  • [T686159] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take DirectCast-
  • [T695422] - Templates for method parameters do not work with local functions
  • [T689960] - Templates - The template expansion gets disabled after the "Exc" key is pressed

What's New in v18.2.3

JavaScript & TypeScript Support

HTML & Razor Support

You can now use Smart Duplicate Line and Smart Duplicate Selection in HTML, C# Razor, Visual Basic Razor and Aspx files.

Refactoring Enhancements

With the Pull Member Up refactoring you can move a member (and its dependencies) to a base class. If more than one base class are available in the current solution, you can select the target class from the submenu.

Pull Member Up Refactoring - CodeRush

Rich Comments

We have added the capability to escape markdown characters with the back slash "\".

// \_This text\_ is not underlined

You can also start a comment line with "//" to disable Markdown for the entire line.

  • //// **Markdown** is disabled for this line
  • /* // **Markdown** is also disabled for this line */

Simple Member Formatting

Starting with this release, CodeRush enables you to specify separate formatting options such as Braces and Blank Lines for Auto-Implemented properties. Note that the options only apply if the initial declaration does not contain comments and directives.

Simple Member Formatting - CodeRush

Resolved Issues

  • T685543: Code Providers - The "DeclareProvider encountered an error and has been disabled" notification occasionally appears
  • T682774: Code Providers - The "Add to Interface" provider does not include default values
  • T681923: Rich Comments - The '#' char is incorrectly handled in PowerShell files
  • T679365: Unit Testing - The Details section in the Test Runner window is cleared after editing a test

What's New in v18.1.14

Visual Studio 2019 Support

CodeRush now installs and runs in Visual Studio 2019.

Resolved Issues

  • [T685543] - Code Providers - The ‘"DeclareProvider" encountered an error and has been disabled' notification occasionally appears
  • [T682774] - Code Providers - The "Add to Interface" provider does not include default values
  • [T687066] - General - The NullReference exception when applying the "Find And Replace" command in Solution
  • [T681923] - Rich Comments - The ‘#' character is incorrectly handled in PowerShell files
  • [T696221] - Selection – The Comment/Uncomment selection does not work in XAML if existing comments are selected
  • [T686159] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take DirectCast-Operator into account
  • [T689960] - The template expansion gets disabled after the "Esc" key is pressed
  • [T679365] - Unit Testing - The Details section in the Test Runner window is cleared after editing a test

What's New in v18.1.13

Rich Comments

Important Comments and Question Comments

CodeRush syntax-highlights important comments and question comments in colors you can set.

  • You can mark comments as important by starting the comment with a "!".
  • You can mark comments as questions by starting the comment with a "?".

Rich Comments - CodeRush | DevExpress

Task-Based Comments

CodeRush highlights comments in the color you specify for comments starting with the following task-based tokens:

  • TODO
  • BUG
  • HACK
  • UNDONE

Default colors for these new comment types for light and dark themes are shown below:


Important Comments - CodeRush | DevExpress


You can change these colors on the Rich Comments options page.


Important Comments - CodeRush | DevExpress

Large and Small Comments

CodeRush gives you the ability to use markdown to create large or small comments. Large comments use one, two, or three "+" characters at the start of the comment, and small comments use one, two, or three "-" characters at the start of the comment.

Large and Small Comments - CodeRush | DevExpress

If you prefer markdown syntax, you can also use the hashtag character ("#") to specify comment size:

Comment Hashes - CodeRush | DevExpress

By default CodeRush decreases comment contrast as the font size increases, and increases contrast as comment size decreases. You can change the contrast, or assign a custom color to each of the large and small comment font sizes using the Rich Comments options page:


Contrast Adjust - Comments - CodeRush | DevExpress


Just make sure the Change comment font size and color using ++, --, #, ##, etc checkbox is checked to enable this functionality:


Contrast Adjust - Comments - CodeRush | DevExpress


We have also added the capability to individually enable or disable markdown formatting (bold, italics, etc.) in comments, embedded images in comments, as well as the ability to hide comment delimiters with the back tick (\`).

All of these options are available on the Editor | All Languages | Rich Comments page of the CodeRush Options dialog.

JavaScript & TypeScript - Jump to Symbol

In this release we have added the Jump to Symbol feature, now available in JavaScript and TypeScript code.


JavaScript and TypeScript - Jump to Symbol - CodeRush | DevExpress

Refactoring Improvements

Simple Member Formatting

CodeRush now lets you set formatting options for simple members that include only a single statement (and do not include comments or directives). For this, we have added the following grouped options:

Braces

  • Simple Method
  • Simple Property / Indexer / Event
  • Simple Accessor

Blank Lines:

  • Simple Method
  • Simple Property / Indexer / Event

Simple Member Formatting - CodeRush | DevExpress

HTML and Razor Support

Resolved Issues

  • [T678569] - Code Cleanup - "This" qualifier is not properly applied when accessing inherited members.
  • [T675126] - Formatting - The "Chained Method Calls" formatting option works incorrectly.
  • [T678197] - Refactorings - Invoking the "Reorder Paramaters" refactoring disables the editor's reference/keyword highlighting features.
  • [T678439] - Refactorings - The "Inline method" refactoring creates incorrect code for extension methods.
  • [T671295] - Region Painting - A region directive is not painted when the caret is on the line start.
  • [T676242] - Rich Comments - Painting is not removed in certain cases when the caret is placed into a comment.
  • [T676660] - Rich Comments - Adding a backtick (`) character does not hide leading comment delimiters.
  • [T677757] - Rich Comments - Comment painting does not work if the FSharp package is not installed.
  • [T674732] - Settings - It is impossible to import custom selection embeddings from CodeRush Classic.
  • [T675458] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take with-statements into account.
  • [T675468] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take OrElse-Condition with For-Each-Statement into account.
  • [T675422] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take default property into account.
  • [T675450] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should omit notifications for (some) members of third-party-libraries.
  • [T677174] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take Return in If-ElseIf with For-Each-Statement into account.
  • [T677363] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take Null-conditional-operator within if-Operator into account.
  • [T676917] - Static Code Analysis - The "Use Task.Run instead of Task.Factory.StartNew" diagnostic does not take the .NET Framework version into account.
  • [T676909] - Static Code Analysis - Unexpected "CancellationToken parameter is never used" warning.
  • [T679365] - Unit Testing - The Details section in the Test Runner window is cleared after editing a test.

What's New in v18.1.12

This update includes bug fixes and performance improvements.

Resolved Issues

  • [T674906] - Formatting - Expression-bodied properties are wrapped incorrectly.
  • [T674277] - Performance - The NGEN performance improvement notification is not displayed.
  • [T674854] - Rich Comments - Comment sizing does not work in VB.
  • [T674303] - Rich Comments - Embedded images are not rendered until Visual Studio is restarted.
  • [T651495] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostics should take Lambda-Expressions/Closures into account.
  • [T578383] - Static Code Analysis - The "Possible NullReferenceException" diagnostic - Mark/Attribute members/parameters as NotNull.
  • [T674406] - Structural Highlighting - It is impossible to change line colors.

What's New in v18.1.11

JavaScript & TypeScript Support

  • Now, you can use Smart Cut & Copy in JavaScript and TypeScript code.
  • This release includes a pre-release set of templates for JavaScript and TypeScript development that make it easy to declare classes, functions, variables, code blocks, expressions and more. These templates are expected be refined and evolve over the coming releases.
JavaScript and TypeScript Support - CodeRush | DevExpress

Member Sections

CodeRush templates can place generated members in dedicated target sections for those members. A member section can start with a comment or be contained inside a region. You can define target sections using the Region or Comment group buttons on the Organize Members option page.

Member Sections - CodeRush | DevExpress

You can specify the text for the target comment or region...

Member Sections - CodeRush | DevExpress

And CodeRush templates will generate well-organized code according to your team's rules and settings:

Member Sections - CodeRush | DevExpress

Performance Improvements

You can improve CodeRush performance by creating native images using NGEN.exe.

If NGEN performance improvements are available, you'll see a notification near the top of the IDE.

Performance Improvements - CodeRush | DevExpress

You can compile assemblies once for this install, do it automatically after each update, or disregard the suggestion and never see it again.

NGEN compilation is performed in a separate process so you can close Visual Studio or keep it running after you start. Compilation progress is updated in the notification area if Visual Studio is running.

Note: CodeRush will only show this performance upgrade notification if Visual Studio is executed with administrator privileges.

Rich Comments

This release includes a groundbreaking new feature which gives Visual Studio developers the ability to effortlessly embed images, diagrams, formulas, tables, etc., inside source code (C#, F#, JavaScript, TypeScript, Visual Basic, XAML, HTML, CSS, and XML). You can paste any image from the clipboard, or reference a local file in markdown.

Rich Comments - CodeRush | DevExpress

Embedded images can be scaled and cropped, and work seamlessly with Visual Studio. Embedded images are great for explaining complex code, signposting important classes and functions, communicating with team members, bringing new team members up to speed faster, and more.

For more details on this amazing new technology, see devexpress.com/holygrail.

Code Analysis

  • You can now set options to determine how the Possible System.NullReferenceException diagnostic performs its analysis in methods, properties, parameters and fields.

    Code Analysis - CodeRush | DevExpress
  • We have added the "Task.Factory.StartNew usage can be dangerous" code diagnostic, warning when unsafe methods are used to start a new thread.

Other Improvements

  • Move to Region can now position methods alphabetically. To try this, on the Move to Region options page, set "Inside regions, place newly-moved members" to Alphabetically.

    Move to Region Options - CodeRush | DevExpress

    The Move to Region UI now allows you to select target regions from a tree menu (regions are shown in the same hierachical order they appear in code).

    Move to Region Tree - CodeRush | DevExpress
  • With new HTML context providers, you can customize your own HTML-specific CodeRush features like shortcuts, templates, selection embeddings.

    Html Context Providers - CodeRush | DevExpress

Resolved Issues

  • [T668685] - Formatting - The Dictionary initialization is aligned incorrectly.
  • [T670141] - Refactorings - The "Convert to string interpolation" refactoring incorrectly processes escaped curly brackets.
  • [T668862] - Static Code Analysis - Code Issues Window - Code issues are not sorted by line number.
  • [T671027] - Unit Testing - TestRunner doesn't take TestCategory attributes of TestClasses into account.

What's New in v18.1.10

This update includes bug fixes and performance improvements.

Resolved Issues

  • [T667085] - Code CleanUp removes necessary parenthesis on processing the await operator.
  • [T665033] - Code Coverage - Profiler gets registered into the system multiple times.
  • [T666329] - Organize Members does not work properly if a member contains preprocessor directives.
  • [T664215] - Refactorings - Add XML Comments - A broken <see/> tag is created when generating xml comments for a method that references a generic type.
  • [T666502] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take outer "not's" into account.
  • [T668363] - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take generic classes with constraints and reserved words into account.
  • [T667218] - TestRunner - A test execution report fails if XML Doc comments are wrong.
  • [T667190] - Test Runner - Test execution report does not contain XML Doc Comments for types.

What's New in v18.1.9

Unit Test Runner

The test runner now supports exporting test execution results to XML.

Unit Test Runner Export - CodeRush | DevExpress

Test name, namespace, state, execution duration (if available), and failure details (if the test has failed).

You can also use the "Include XML documentation comments in export" to include each test’s XML doc comments in the report.

Unit Test Runner - Include XML Comments Option, CodeRush | DevExpress

Code Cleanup

With the new Apply Code Cleanup when saving a document option, you can automatically clean up a file before it is saved.

Code Cleanup - Apply Code Cleanup when saving a document option, CodeRush | DevExpress

HTML and Razor Support

Structural highlighting is now available in HTML, C# Razor, and Aspx files.

HTML and Razor Support - CodeRush | DevExpress

Naming Convention Improvements

We have implemented separate naming convention options for private and non-private static fields.

Naming Convention Improvements - CodeRush | DevExpress

Resolved Issues

  • [T665349] - Code Actions - Visual Studio hangs when collecting a list of code actions for a namespace declaration in .Net Core projects
  • [T664317] - Code Cleanup throws an error when processing the "Apply built-in type style" rule
  • [T659846] - Code Providers - The "Declare Field With Initializer" provider is not available when a constructor uses the "expressing body" syntax
  • [T659504] - Code Providers - Implement ISerializable - Constructor should be private on sealed types
  • [T661924] - Formatting - Initializer Formatting with a blank line separator has bad indentation
  • [T663333] - Formatting - The "Base List->Wrap if long" rule incorrectly works for identifiers with short names
  • [T663335] - Formatting - The "Property\Indexer\Event->Wrap if long" rule incorrectly formats setter code
  • [T660291] - Formatting - The formatting engine incorrectly handles code constructions inside object initializers
  • [T658364] - Formatting - Local functions are formatted incorrectly
  • [T662544] - Navigation - Jump To File - The initial filter text should not get text from an identifier under the caret
  • [T664486] - Refactorings - The "Reorder parameters" refactoring does not work after upgrade to VS 2017 15.8.0
  • [T663890] - Refactorings - The "Implement IEquatable" refactoring on generic classes works incorrectly
  • [T659364] - Refactorings - The "Extract String to Resource" refactoring doesn't consider the "Namespace references declaration style" option
  • [T660699] - Refactorings - The "Inline Temp" refactoring creates nonsense code
  • [T657375] - Templates - The "Stopwatch" template adds additional spaces before the local variable
  • [T660268] - Unit Testing - Code Coverage - The progress bar at the bottom of the Code Coverage window keeps scrolling and never stops

What's New in v18.1.8

This update includes bug fixes and performance improvements.

Resolved Issues

  • [T653835] - Code Formatting - The "Blank line around" option incorrectly works for regions.
  • [T657042] - Code Formatting - Case statements are formatted incorrectly.
  • [T656618] - Code Templates - The "b" (braces) template is not expanded in some cases.
  • [T656632] - Setup Wizard - It is impossible to disable numpad key bindings under the es-ES locale.

What's New in v18.1.7

Rich Comments

With Rich Comments you can apply text formatting right inside the code editor in comments. The following Markdown-like syntax is supported:

  • **Bold**
  • *Italic*
  • _Underline_
  • ~Strike-through~

Enable Rich Comments on the 'Editor | All Languages | Rich Comments' options page or using the 'Toggle Rich Comments' toolbar button.

Unit Test Runner

With this release, you can now execute a single test case of a parameterized test directly from code. Click a CodeRush test icon and choose the desired option from the 'Run test', 'Debug test', or 'Run test with coverage' submenu.

Run Test for a Single Test Case - CodeRush, DevExpress

You can also execute a test for a particular descendant of the current class in a similar manner.

Code Formatting

We have enhanced formatting options to allow you specify how you would like to align code blocks. The "Align content by" and "Indent" options are available on the 'Braces' option page in 'Editor | C# | Formatting'. On the 'Wrapping' option page you can also align content for Initializers.

Formatting Options - CodeRush, DevExpress

Coding Assistance

With this release, Selection to Template has become more intelligent - it generates cleaner templates and uses type links, text links, or regular links intelligently depending on the element type.

We have also enhanced the 'Create Template From Selection' dialog options, allowing you to fine tune a template before committing it and quickly specify which elements should be substituted by links.

Selection to Template - CodeRush, DevExpress

JS and TS Support

Now in Javascript (and Typescript) you can:

Resolved Issues

  • [T655205] - AddCopyrightHeaderProvider raises NullReferenceException in VB
  • [T655314] - DeclareProvider creates duplicated code and then crashes
  • [T652158] - NUnit + TestCases causes issues in test runner
  • [T652717] - Rename Refactoring - Rename all the files of a partial class

What's New in v18.1.6

This update includes bug fixes and performance improvements and usability tweaks.

Resolved Issues

  • [T616989] - Duplicate Line doesn't work properly for some statements.
  • [T648037] - MarkReadOnlyProvider throws an error.
  • [T648038] - Multiple errors appear in the log.
  • [T647768] - NUnit + Derived Test classes causes issues in test runner.
  • [T645610] - Shortcuts - Synchronization with Visual Studio key bindings removes manually added shortcuts.
  • [T648928] - Template expansion of the block template (b) does not work.
  • [T646570] - The Test Runner window does not have a horizontal scrollbar.

What's New in v18.1.5

Training Window

We have ported the Training Window from CodeRush Classic. Open it using the CodeRush | Windows | Training menu item.

CodeRush - Training Window | DevExpress

This window shows shortcuts for all CodeRush features and template expansions available on the current caret position.

CodeRush - Training Window | DevExpress

Code Cleanup

We have added a Copyright Header Code Provider, which adds a copyright comment at the file's beginning.

CodeRush - Code Cleanup | DevExpress

It is also available as a Code Cleanup provider and as a template - just press the letter 'h' at the top of the file on an empty line and press your template expansion key (e.g. Space or Tab).

Before using the default header for the first time, you should configure the "First Name", "Last Name" and "Company" fields on the IDE | User Info options page. The actual text of the generated header is stored in the h template expansion, and can be changed there as desired.

Clipboard and Selection Tools

Code Analysis

We have added a custom icon for spell checker suggestions in the Code Actions Menu so they are more easily identified in the action menu.

CodeRush - Code Analysis | DevExpress

Coding Assistance

Mega Super Copy

Okay, so maybe we went a little crazy on the name of this feature, but it IS pretty cool.

You can now use Multi-Select to mark important text elements before selecting and copying/cutting a block of code to get a richer smarter version of the code on the clipboard. Any code in the selection that has been multi-selected will become a linked Text Fields upon pasting.

CodeRush - Mega Super Copy | DevExpress

You can even create zero-length multi-selections to mark caret insertion points on the paste. Just put the caret where you want the caret to be on paste, and press Ctrl+Alt+Enter to add a multi-selection marker at that location.

Once a Mega Super Copy is on the clipboard, you can paste it as many times as you need. This is really useful for repetitive code where you know in advance what parts you want to change and where you want the cursor after paste.

You can also use the Ctrl+Alt+V shortcut to paste the most recent text Mega-Super-Copied with fields, even if it is not currently on the clipboard.

Other Coding Assistance Features

The Text Links and Text Fields behavior in Smart Duplicate Line/Selection, Mega Super Copy, and Selection to Template features is now configurable. Use the Editor | All Languages | Linked Text & Fields options page to configure when the automatic links and fields should be created. These rules apply to normal selections of code (free of any multi-selections)

Navigation

We have made a Jump to window pre-configurable. You can now define a shortcut that invokes a Jump to window with a pre-configured filter. The JumpToSymbol command now accepts four parameters:

  • TypeFilter (can be: Classes, Interfaces, Structs, Enums, Delegates, and AllTypes)
  • MemberFilter (can be: Methods, Properties, Events, Fields, LocalsAndParams, and AllMembers)
  • AccessFilter (can be: Private, Protected, Internal, ProtectedInternal, Public, and AllVisibilities)
  • LocationFilter (can be: AllFiles, CurrentSolution, CurrentProject, CurrentNamespace, and CurrentFile)

You can use "and" keyword to combine filters like this: 'Classes and Structs'.

Add a new shortcut with the 'JumpToSymbol' command and the initial filter you need in 'Parameters' to make use of this feature.

For example, the shortcut with the 'Classes,Methods and Properties,Public' filter the Jump to Symbol window opens with this filter.

CodeRush - Jump to Symbol | DevExpress

We have also improved markers behavior. System Markers dropped by CodeRush are now cleaned up automatically when CodeRush detects they are redundant or no longer needed.

Refactorings and Code Providers

  • The Declare Method code provider is now available when the caret is located at the end of the line with an undeclared method.

  • The XPO Fields code provider now copies the [Obsolete] attribute from fields to their corresponding maintained properties.

  • We have added a 'Collapse Accessors' code formatter, which collapses both 'get' and 'set' property accessors into single-line form.

Templates

We have extended the CodeRush type-casting templates so that they support explicit type casting in expressions. The following new templates were added, and will expand as described if the caret is inside a code block but not on an empty line.

  • c. - Expands as (Type) with the Type identifier embedded into a Text Field so you can quickly change it. It’s also an incredibly fast way to get parens when you need them.

  • c?Type? - Adds a type-cast to a type specified in the template name variable '?Type?'.

    Template

    cd

    cd8

    Inside an Expression

    (double)

    (DateTime)

    On an Empty Line

    double @double = (double)Expression;

    DateTime dateTime = (DateTime)Expression;


  • c?Generic1Type?. and c?Generic2Type?. - Adds a type-cast to the specified generic type (with one or two parameters) and embeds its parameters into Text Fields.

    Template

    cl.

    cc.

    cd.

    Inside an Expression

    (List<Type>)

    (Collection<Type>)

    (Dictionary<Type1, Type2>)

    On an Empty Line

    List<args> list = Expression as List<args>;

    Collection<args> dictionary = Expression as Collection<args>;

    Dictionary<args> collection = Expression as Dictionary<args>;


  • c?Generic1Type?.?Type? and c?Generic2Type?.?Type1?,?Type2? - Adds a type-cast to the specified generic type (with one or two parameters).

    Template

    cl.d

    cd.s,i

    Inside an Expression

    (List<double>)

    (Dictionary<string, int>)

    On an Empty Line

    List<double> @double = (List<double>)Expression;

    Dictionary<string, int> @int = Expression as Dictionary<string, int>;


Entries in the middle column reflect the new functionality in this release. Entries in the last column show existing but related casting technology. The Expression referenced in this last column will be replaced by an identifier in the clipboard (if any). See the C for Casting video for more on this existing functionality.

We have improved the ForEach text command. Now it is possible to iterate through lines of text copied to the clipboard. You can do it with the following text command: "ForEach(line in clipboardText,template))", where template is the name of the template you want to execute for each line of text on the clipboard. You can access the text of each iterated line by calling ?Get(itemName) from inside your template.

Resolved Issues

  • T644796 - Code Cleanup - The "Braces in Statements Style" rule removes braces incorrectly
  • T643108 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostics should take "complex" expressions/conditions in "If()-Operator" into account
  • T631502 - Test Runner hangs when running all tests for a solution

What's New in v18.1.4

This update includes bug fixes, performance improvements and usability tweaks.

Resolved Critical Issues

  • T637510 - Shortcuts - Bookmark 2 is placed instead of the @ symbol on AZERTY keyboard

Resolved Issues

  • T637184 - Invert Selection - Cannot add a shortcut for Invert Selection
  • T638402 - Region Painting - Arrows are not rendered in code and an empty string is shown in regions
  • T639291 - Region painting - #endregion adornment is invisible
  • T636524 - Templates - Nullable templates in Visual Basic should use the <Type>? syntax instead of Nullable(Of <Type>)

What's New in v18.1.3

Layered Options

CodeRush now stores your settings in Layers, which allow you to bind settings to a particular solution and team, in addition to personal preferences which can serve as defaults (unless overridden by team/solution settings) or, if needed, personal settings can override team/solution settings.

You can use this feature to create solution-dependent options and share them with your entire team. These options are applied automatically to all team members using CodeRush when the solution is open.

DevExpress | CodeRush

The actual configuration settings are determined by merging all layers.

DevExpress | CodeRush

There are three pre-defined layers:

  • Solution Personal Options — your personal preferences for the solution that is currently open. This layer has the highest priority and overrides any settings in lower layers.
  • Solution Team Options — your team's preferences. Stored in a solution directory and should be added to your version control system (VCS) so these options can be shared with the entire team. Solution/Team settings override any default settings below.
  • Personal Options — These are your default preferences for all solutions you work with in CodeRush. This layer has the lowest priority and settings here may be overridden by settings in a higher-priority layer.

You can also add child option layers to any pre-defined layer. The custom layers can be stored in any directory and used to specify options not defined in the base layer.

CSS Support

We have added CSS language support in the following features:

DevExpress | CodeRush

Templates

The ninst template (generates a new instance for the variable in clipboard) now initializes all properties with the default values.

DevExpress | CodeRush

We have also added a ninst, template (with a comma at the end), which creates a simpler initialization of the variable on the clipboard.

To use either of these templates, copy a variable name to the clipboard, place the caret on an empty line, type the template name and expand it (with Space or Tab, depending on your settings).

Multi-select

Multi-selections are now cleared after being copied.

We have also added the Ctrl+Alt+Shift+Backspace shortcut to restore the most recent multi-selection.

Resolved Issues

  • T630769 - Formatting - Wrap braces options should not take property attributes into account
  • T625870 - General - CodeRush causes sluggish keyboard typing
  • T617308 - General - CodeRush font rendering
  • T628519 - Refactorings - The "Convert to string interpolation" refactoring is not working in specific expressions
  • T627331 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take "Continue For" into account
  • T627299 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take "If()-Operator" into account
  • T627293 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should take String.IsNullOrEmpty and String.IsNullOrWhitespace into account
  • T633631 - Test Runner - Cannot run MsTest tests in Visual Studio 15.7
  • T632021 - TestRunner should not run a test marked by the Explicit attribute on running a whole TestFixture
  • T633995 - TypeLoadException in XamlCompilation during work in code-behind file

What's New in v17.2.8

Coding Assistance

Smart Duplicate Selection/Line (Shift+Enter) gets the following improvements:

  • Single letter identifier parts are automatically incremented/decremented if CodeRush detects an alphabetically-ordered pattern in the code.

  • Enhanced support for duplicating parameters and arguments, letting you quickly declare new parameters based on existing parameters and the selection. To duplicate a parameter, select its part(s) you want to change (selected parts becomes fields) and press Shift+Enter. Watch the video below to see examples of what you can do.

    Arguments:

    Parameters:

  • Expressions can now be duplicated. You can duplicate elements of string concatenation, bitwise, boolean and arithmetic expressions. Smart Duplicate Selection will insert a default operator and mark it with a TextField so you can change it later if needed. Watch the video below for examples of what you can do:

Refactorings and Code Providers

The Invert Selection code provider gets a port from CodeRush Classic. Use this to invert selected lines of code in a variety of ways:

  • Assignments (a = bb = a)
  • Boolean literals (truefalse)
  • Addition/substraction assignments (a += ba -= b)
  • Equality operators (==!=)

DevExpress | CodeRush

Templates

We have added the ability to create a template right from your code using a context menu. Select the code to create a template from, right-click and choose Selection to Template...

DevExpress | CodeRush

DevExpress | CodeRush

CodeRush automatically creates Links and Fields based on the selected code and opens the new template in the Template Editor.

Resolved Issues

  • T615463 - Code Providers - Generate Field produces code with a compilation error when the Dim keyword is used
  • T616989 - Duplicate Line doesn't work properly for some statements
  • T617444 - Feature Adviser does not perform cleanup when a document is not in focus
  • T616935 - Formatting incorrectly removes single quotation marks from strings in XAML
  • T618274 - Organize Members - Nested types wrapped into a region are incorrectly processed
  • T615842 - Painting - The drawing of TextFields intersects with regions
  • T614003 - Refactorings - Add Contract->Throws Exception Contract produces invalid code for string arguments
  • T620319 - Selection Expand incorrectly works on regions in Visual Basic
  • T614094 - Templates - The "return" template does not work in VB.NET
  • T614777 - Templates - The r-template breaks code in VB
  • T621181 - Test Runner - CodeRush test result balloon is incorrectly painted with a multi-monitor configuration
  • T618830 - Test Runner disables the "Debug" option for test cases containing the "Inconclusive" assertion
  • T618682 - Test Runner does not run MSTest tests in Visual Studio 15.5.2
  • T621954 - Text Commands - EscapeQuotes does not work in the "To string" selection embedding

What's New in v17.2.7

Feature Advisor

This release introduces Feature Advisor, which introduces CodeRush features likely to improve your coding efficiency based on the ways you create and modify code in the editor.

When CodeRush notices code created or modified in ways which CodeRush features can do faster, it adds an entry to the feature advisor and increments the red and white counter in the bottom right of Visual Studio.

DevExpress | CodeRush

Click this counter to open the Feature Advisor window to learn more about the new CodeRush features that can help.

DevExpress | CodeRush

The Feature Advisor options page shows the full list of features supported by Feature Advisor and lets you disable hinting for features you already know how to use.

DevExpress | CodeRush

Code Formatting

We have added new options to Format statements and blocks after pressing the } and ; keys.

DevExpress | CodeRush

Unit Testing

  • You can now select and copy text from the Test Runner's Results section.

    DevExpress | CodeRush

  • We have added a right-click radio button action to category buttons in the filtering toolbar. When you right-click a filter item, that item becomes the only filter checked.

  • When all filtering items are unchecked, the Test Runner Window shows all tests without filtering.

  • The Test Runner hints shown in the code editor now let you select and copy expected and actual values.

    DevExpress | CodeRush

Member Organization

We have added an option to add an empty line above and below all members organized by CodeRush.

DevExpress | CodeRush

Resolved Issues

  • T605827 - Code Issues - An incorrect line number is shown for issues loaded from Visual Studio
  • T609122 - Formatting - CodeRush reformats code after it is applied for the second time and does not respect formatting options for object initializers
  • T611150 - Formatting - Incorrect comments indention
  • T610051 - Refactorings - "Extract String to Resource" changes a custom tool and paths
  • T607230 - Region Auto Create - #region is misplaced under certain circumstances
  • T608528 - Selection Embedding handles typing the 'c' character even if only a part of the line is selected
  • T609864 - Templates with a dot cannot be expanded
  • T604590 - Test Runner - Duplicates in TestRunner when JS tests are written in TypeScript
  • T607416 - Test Runner - Inherited tests are detected but not executed when a base class is in another assembly and has .NET Standard dependencies
  • T612943 - Test Runner - It is impossible to run MSTests with the Visual Studio's 15.6.0 update
  • T606107 - Test Runner fails to start a MSTest V2 with dynamic data DynamicData

What's New in v17.2.6

Smart Duplicate Selection

Smart Duplicate Line (SDL) gets even smarter and morphs into Smart Duplicate Selection . This feature makes creating structurally-similar code significantly easier and orders of magnitude faster.

This feature can be used in any language Visual Studio supports, however its intelligence and abilities vary depending on the content you're building, so let's go through a few samples to get an idea of what it can do.

First, let's start with some test code that creates a Ninja, like this:

DevExpress | CodeRush

Now I might want to create more Ninjas for the unit test. Normally I would select the block of Ninja-building code, copy it to the clipboard, move the caret to the end of the block, paste the copied code, then navigate through the new code, changing all the parts needed to create my second Ninja.

Phew! That's a lot of work just to create a second Ninja.

Smart Duplicate Selection (SDS) starts the same way - select the code you want to duplicate. But instead of copying anything to the clipboard, just press Shift + Enter to duplicate the selection.

DevExpress | CodeRush

SDS duplicates the selection, placing text fields around the code - parts likely to change in the duplication. Don't worry if you see a lot of text fields when you first try this. We'll show you how to clean this up in a moment. For now, let's focus on the changes we want to make to this block.

For example, I might change the variable name to " ninja2", Name to " Leonardo", ServedInOniwaban to true , and the birth year to 1985 , pressing Enter after each edit (and also on fields I want to leave intact).

It's fast and efficient.

But this feature gets even smarter when you try to duplicate again. Let's create a third Ninja based on the changes we just made .

Now, you could select the second Ninja-building block we just edited, and press Shift + Enter again, and while that would work, it would be an excessive number of key presses just to repeat the last duplication. Forturnately SDS gives you a super-fast way to repeat the last duplication - just press Shift + Enter again when you reach the end of the duplicated selection (or when the caret is inside any text field of the duplication).

Pressing Shift+Enter to repeat the last duplication, we now get something more closely reflecting what we want to modify:

DevExpress | CodeRush

Now we have four fields , surrounding the code we changed in the 'ninja2' declaration. SDS also auto-increments the variable's name (and other numeric primitives and enums ) based on the changes made to the code.

With only four fields we just change or accept what we need, pressing Enter between changes four times.

It's pretty amazing stuff.

Once SDS knows what we want to change, we can repeat it by continuing to press Shift + Enter when we reach the end of the duplicated selection (or when we're inside any TextField of the duplication).

It's the most efficient path to creating similar repeating blocks of code.

You might also be wondering, "well, what if I already know what fields I want to modify?"

This question is best answered in a second example. Let's switch over to XAML, where we might be creating an interface that (so far) looks like this:

DevExpress | CodeRush

This UI shows download progress, but we want to add similar status controls to show progress for installation , configuration , and registration (all of which happen duping our install).

The XAML for the "Download: 0%" part of the UI looks like this:

DevExpress | CodeRush

We've got a horizontal StackPanel containing two TextBlocks, one for the label and the other, named, for the value. So, we need to duplicate this StackPanel and its children three more times. And in each duplication, we want to change only the Text of the label TextBlock and the Name of the value TextBlock.

Since we already know what fields we want to change, we can mark those using CodeRush's multi-select feature. It's easy. Just select the sections of code you want to modify and press Ctrl + Alt + Enter . Like this:

DevExpress | CodeRush

Notice I've only multi-selected one instance of "Download", even though I want to also modify the name of the second occurrence in "tbDownload". That's okay, because SDS will automatically find all camelcase matches to anything we multi-select and link those together in the duplication.

Now it's time to select the block we want to duplicate (tip - for even faster selections, use Selection Increase)...

DevExpress | CodeRush

Press Shift + Enter ...

DevExpress | CodeRush

And now enter the new text for the label: " Installation".

DevExpress | CodeRush

Done. Ready to create another StackPanel/TextBlock set of controls for the "Registration" part of the spec? We're already inside a TextField, so we can use the Shift + Enter shortcut to repeat the last duplication:

DevExpress | CodeRush

Enter the label text: " Registration" and press Shift + Enter again, then enter the " Configuration" label text and press Enter because we're done.

Our interface now looks like this, and includes four properly-named TextBlocks we can easily access from code-behind:

DevExpress | CodeRush

You can also use SDS to duplicate CSS styles, HTML controls, parameters in method declarations, binary expressions, arguments, string constants and entire method blocks. SDS will also remember changes you make in each file and suggest those same changes in similar duplications you perform in the same file.

You can also now dismiss all text fields by pressing the Esc key. This is especially useful for Smart Duplicate Selection because it may generate many text fields on the first duplication, and you can press Escape before or after you've modified the fields you need to change.

Code Formatting

The new Simple Wrap formatting option allows you to configure wrapping of only those line parts that exceed the margin, performing a non-greedy wrapping and adding a minimal number of line breaks.

DevExpress | CodeRush

Unit Testing

  • You can now run unit tests under SciTech Software's .NET Memory Profiler. If this third-party product is installed, you can use the Run Under Memory Profiler option to run tests designed to identify memory leaks and other memory usage issues.

    Note: support for the CodeRush Test Runner is included with the .NET Memory Profiler versions 5.6 and up.

  • CodeRush Test Runner now supports running tests created for the F# language .

Code Analysis

CodeRush Analyzers now appear in the Code Issues Catalog . You can use this options page for the following tasks:

  • Enable/disable specific Code Issues.
  • Add/remove Code Issues to/from Visual Studio's background analysis.
  • Specify the severity of each Code Issue.

DevExpress | CodeRush

Region Creation

The CodeRush Classic's Region Creation feature is now available in CodeRush. Use the Ctrl + 3 shortcut to create a region around the current member or selection instantly.

DevExpress | CodeRush

C# 7 Syntax Support

We are supporting С# 7 syntax in CodeRush features that generate exception-throwing statements (like Throw Exceptions Contract).

Now these CodeRush features generate the specified throw-expression operation if the corresponding preference is set in the Visual Studio settings.

DevExpress | CodeRush

Resolved Issues

  • T602438 - Code Actions - Some items of 'Move Type to Namespace' menu don't react to selection
  • T594730 - Code Cleanup - An unnecessary empty line is inserted at the end of the class declaration
  • T600221 - Code Cleanup - The "Remove unused variable" code cleanup removes the variable used within the collection initializer
  • T596752 - Code Style - "Introduce Using Statement" should respect Programming Style settings
  • T600878 - Code Style - Applying the optional parentheses code style works incorrectly with nullable member access expressions
  • T597981 - Duplicate Line incorrectly works with bit flags enums
  • T598761 - Refactorings - 'Introduce Setter Guard Clause' should be available for INotifyPropertyChanged properties
  • T601944 - Refactorings - The "Rename namespace to match folder structure" refactoring handles namespace references incorrectly
  • T602498 - Refactorings - 'Use string.Format' throws the error and adds multiple items to the light bulb menu
  • T602497 - Smart Duplicate Line Issue
  • T598705 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should not be produced for CType
  • T597731 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should not be produced for GetType
  • T596364 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic should not be produced for variables with structure types
  • T597936 - Unit Testing - Code Coverage hang when using CodeRush 17.2.5
  • T588089 - Unit Testing - xunit tests with classes as a data source are not shown in the TestRunner Window

What's New in v17.2.5

Code Style

  • You can now change the default visibility modifier CodeRush uses for generated members.

    DevExpress | CodeRush

    This setting is used by Declaration Providers, Templates and other features that generate new members from scratch.

  • There's a new Code Style option that lets you set preferences for adding clarifying (but optional) parentheses to your code.

    DevExpress | CodeRush

    You can apply these Code Styles with the Code Cleanup feature.

    DevExpress | CodeRush

Templates

  • Now you can create new templates based on existing templates. Just right-click the template you want to duplicate (in the Templates options page), and select " Create Duplicate". Enter a new template name, and change the expansion or context as needed.

    DevExpress | CodeRush

  • Now you can easily insert template aliases into your existing templates (allowing templates to insert the contents of the aliased templates into the editor when they expand). Inside the Template Editor, just right-click and choose " Insert Alias...", then specify the name of the template to include. This is useful for sharing the same code expansion between two or more templates.

    DevExpress | CodeRush

  • You can now easily include any type in the CodeRush templates system as a Template Name Variable. Just right-click the type anywhere it appears in the Visual Studio editor and choose Use Type in Templates... .

    DevExpress | CodeRush

    After selecting Use Type in Templates... , CodeRush asks for the shortcut to use for the type.

    DevExpress | CodeRush

    After adding the new type, it will instantly become available in all type-aware templates, including declaration verbs like "m" (for methods), "p" (for properties), "q" for constants, "t" (for types) and "v" (for variables) .

  • We have improved support for new language features in templates and other context-aware features by adding the [InInterpolatedString] context and adding the language version parameter to the [InVisualBasic([version])] and [InCSharp([version])] contexts.

Resolved Issues

  • T587148 - Navigation - Tab to Next Reference should work for C# local functions
  • T587118 - Refactorings - The "Rename Namespace to Match Folder Structure" refactoring produces an incorrect namespace name
  • T566355 - Static Code Analysis - CRR0026 shouldn't be shown for event handler parameters
  • T591682 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic does not take array-assignment into account
  • T588199 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic does not take into account Me-assignment
  • T591183 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostics do not always take Null-Check into account
  • T590519 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostics incorrectly highlight indexed properties in VB
  • T585952 - Templates - The 'm.' template does not work if a project uses a language version different than C# 7.x
  • T593179 - Test Runner doesn't recognize MSTest DataTestMethod attribute decorated methods as tests

What's New in v17.2.4

XML Support

The following features support XML markup language now:

Visualization Tools

The Right Margin Line can help you keep code lines from getting too long or exceeding style guidelines. The margin serves as a visual indicator showing lines that have overrun the specified line length.

DevExpress | CodeRush

You can enable the right margin line using the new button (on the CodeRush Visualize toolbar) and configure it in the CodeRush Options dialog on the Editor | All Languages | Right Margin Line page.

DevExpress | CodeRush

Code Analysis

Code Metrics can now establish a Threshold value that determines when the metric appears and when/if the metric contributes to code analysis. This allows code analysis to report type members that exceed your specified complexity thresholds.

DevExpress | CodeRush

Code Formatting

C# Document Formatting adds the following options:

  • Wrapping and Spacing configuration for the "??" operator.
  • Wrapping and Spacing configuration for the base types list .
  • Wrapping and Spacing configuration for the constructor initializer .

    DevExpress | CodeRush

  • Excessive Line Breaks Removal.

    DevExpress | CodeRush

  • Separate Line Break configuration options before "else", "while", "catch" and "finally" keywords.

Navigation

  • We have added a filter for the Jump To Members navigation feature.

  • The filtering dialog now has " Select All" switches for Scope, Types, Members and Access.

    DevExpress | CodeRush

Resolved Issues

  • T566355 - Code Analysis - CRR0026 shouldn't be shown for event handler parameters
  • T579795 - Code Analysis - CRR0027 NullReferenceException: False positive on an ElseIf expression in VB
  • T579799 - Code Analysis - CRR0027 NullReferenceException: False positive on short circuit in VB
  • T580266 - Code Analysis - CRR0027 Possible System.NullReferenceException: Failure when using parenthesis
  • T582571 - Code Analysis - The Possible Null Reference diagnostic incorrectly processes single line if statements
  • T576693 - Code Cleanup - Applying the Make Properties auto-implemented rule produces uncompilable code
  • T579515 - Code CleanUp - CodeRush wraps arguments inside an interpolated string
  • T580711 - Code Coverage - The engine incorrectly treats .runsettings file rules as case-sensitive
  • T579659 - General - Quick Actions do not work in XAML in the preview version of Visual Studio 2017
  • T577000 - General - The code editor should scroll horizontally during the camel case navigation to make the navigated location visible
  • T574118 - Organize Members - The Remove Existing Line Breaks option acts incorrectly with comments
  • T576909 - Refactorings - Convert to string interpolation should be available for concatenated strings
  • T579145 - Refactorings - 'DeclareProvider encountered an error' on pressing the refactor key
  • T582223 - Refactorings - The Sort Namespace References refactoring rearranges "using" statements but not their corresponding comments
  • T583012 - Refactorings - The Throw Exceptions Contract refactoring does not recognize thrown expressions
  • T577953 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic incorrectly highlights array items
  • T577940 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic incorrectly highlights extension methods in VB
  • T577928 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic works incorrectly for the return statement
  • T577944 - Static Code Analysis - The "Possible System.NullReferenceException" diagnostic works incorrectly when the object variable is instantiated
  • T576549 - Templates - One key templates do not work within lambda expressions in VB
  • T579139 - Test Runner - Serializable Xunit tests only show first occurrence in Test Runner

What's New in v17.2.3

CodeRush

Starting with v17.2.3 CodeRush for Roslyn was renamed to CodeRush .

Unit Testing

The JavaScript Test Runner is out of beta and you can now run & debug tests for client-side JavaScript code using the powerful CodeRush Test Runner.

DevExpress | CodeRush for Roslyn

Our JavaScript test runner is based on Karma and supports the following testing frameworks:

If you don't use Karma, we also support unit tests linked to the tested code using triple-slash reference directives or a Chutzpah configuration file.

Learn more about the CodeRush Test Runner here.

Code Analysis

  • NullReferenceException Analysis is now available in Visual Basic . This feature identifies unprotected code that may unexpectedly raise NullReferenceExceptions.

    Note that this feature is still in beta . You can enable/disable this feature on the Static Code Analysis options page:

DevExpress | CodeRush for Roslyn

  • We have added the following static analyzers focused on best practices for async and await :

    • Async method has no CancellationToken parameter.
    • CancellationToken parameter is never used.
    • Async void method should be in a try/catch block. Otherwise, that method's exceptions may cause a crash.
    • ConfigureAwait(true) is called implicitly. ConfigureAwait() should always be explicitly called, as the default behavior may cause a deadlock.
    • Redundant 'await'.
    • The 'await' keyword for the Task.FromResult expression is not required.
    • The returned Task is null. Use 'Task.FromResult()' instead.
    • Task.When is used in an async method. Use Task.Wait instead.
    • The 'await' expression is missing a cancellation token.

Code Cleanup

We have added the ability to remove unused assembly references from your projects, accessible through the project's right-click context menu:

DevExpress | CodeRush for Roslyn

Selecting this command will bring up a confirmation window where you can select which references to remove (from the list of unused references).

DevExpress | CodeRush for Roslyn

Code Formatting

Document Formatting receives the following improvements:

  • Blank lines — now blank lines for the first and last items in a list of elements are omitted. Blank lines are only added between elements.
  • Bitwise operators (&, |, and ^) — now have individual wrapping and spacing options for each operator.
  • Relational operators (==, !=, <, >, <=, and >=) — also have configurable wrapping and spacing settings.
  • Regions — we have added blank line configuration options for #region directives.
  • Wrap First — we have added the "Wrap First" option for assignment expressions.

Navigation

You can now open the Navigation Menu using Member Icons .

DevExpress | CodeRush for Roslyn

Resolved Issues

  • T568165 - Bookmarks - Bookmark painting disappears when navigating to the closed file
  • T565305 - Code Analysis - The Code Issues window shows duplicate entries for linked files
  • T564802 - Code Analysis - The 'If-block matches else block' diagnostic false positive
  • T565749 - Code Analysis - 'Unused members' false positives in the HTML source of ASPX files
  • T567020 - Code Formatting - Blank lines' setting isn't taken into account for constructors
  • T565760 - Code Formatting - Property initialization should not be wrapped to a new line
  • T565743 - Code Formatting - The open and close braces are not correctly aligned with else statements
  • T567315 - Code Formatting - Wrapping - The array's Initializer options do not wrap the opening curly bracket and the closing curly bracket has an incorrect position when the last element ends with a comma
  • T567306 - Code Formatting - Wrapping - The object Initializer does not wrap opening braces
  • T567015 - Code Formatting - XAML Formatting - Attributes aren't sorted correctly when attached properties are used
  • T573424 - Code Formatting produces an incorrect indent when braces for namespaces and types are set to be on a new line
  • T565621 - Formatting - Incorrect screenshot for braces options in What's New
  • T573613 - General - "IconSource should not be used on Completion3" error is shown on the VS 2017 15.5 preview 3.0
  • T568256 - IntelliRush - ArgumentOutOfRangeException in the log file
  • T565809 - Member Icons - context menu is not shown for overridden methods
  • T557548 - Naming Assistant shows a suggestion at the wrong position
  • T573243 - Navigation - The selected line is not highlighted after clicking a reference in the References window
  • T574244 - Refactorings - "Extract String to Resource" removes <comment> nodes in resource.resx
  • T564267 - Refactorings - 'Declare Property' incorrectly works for an interface in Visual Basic in certain cases
  • T565890 - SpellChecker - It's possible to add the same word to a dictionary multiple times
  • T563691 - Templates - The 'NameOf' operator should be used in the property change notification
  • T571114 - Test Runner - Clicking the test in an abstract class doesn't jump to code
  • T567211 - Test Runner - Incorrect output for NUnit tests with parallelization
  • T566340 - Test Runner - Running all tests in a solution with multiple projects using the MS Test framework is not working as expected

What's New in v17.1.9

CodeRush for Roslyn

Code Formatting

We have extended the Code Formatting feature with new abilities to configure Line Breaks (Beta). Two new options pages were added:

  • Editor | C# | Formatting | Blank Lines — enables you to configure the number of blank lines around and within the following code elements:
    • Namespaces
    • Types
    • Methods
    • Properties
    • Fields
  • Editor | C# | Formatting | Braces — enables you to configure the line breaks around and within the following code blocks:

    • Namespaces
    • Types
    • Methods
    • Properties
    • Accessors
    • Lambda Expressions and Anonymous Methods
    • Statements

    Code Formatting styles are applied using Code Cleanup.

    DevExpress | CodeRush for Roslyn

New Features for XAML

We have added an ability to normalize whitespace inside XML comments.

DevExpress | CodeRush for Roslyn

Unit Testing

  • CodeRush Test Runner now supports Microsoft Fakes isolation framework.

    It helps you mock the code you are testing by replacing parts of your application with the small pieces of code under the control of your tests.

    DevExpress | CodeRush for Roslyn

    Note: Microsoft Fakes framework is available only in the Enterprise version of Visual Studio IDE.

  • The Code Coverage Filtering has been improved. You can now filter the report, not only by name and percentage, but also by node kind . For example, you can create a filter that only shows methods with test coverage between 1% and 40%, like this:

    DevExpress | CodeRush for Roslyn

Code Analysis

We have improved the Highlight unused members feature so that member de-emphasis is disabled when the caret is inside the member.

Resolved Issues

  • T556037 - Code Analysis - CodeRush incorrectly marks event handlers as unused members in XAML code-behind files
  • T561122 - Code Analysis - False "Possible null reference exception" diagnostics
  • T557281 - Code Analysis - The "NullReferenceException" code analysis works unexpectedly for properties
  • T557986 - Code Cleanup - Format document removes unexpected code
  • T558123 - Code Cleanup - The event handler containing the NotImplementedException should not be removed
  • T557617 - Code Cleanup - The 'Format Document' provider doesn't respect VS settings for braces
  • T558242 - Code Cleanup duplicates Comment lines
  • T557130 - Code Formatting - The Spacing options in Formatting have certain issues
  • T557104 - Drop Marker Before Jump option does not work for the "Go to Implementation" action
  • T558098 - Formatting - Comments are duplicated when spacing options are used
  • T557071 - Options Page - Scrollbar is missing on the C#>Formatting>Spacing options page
  • T561501 - Refactorings - Suggestions for the "Use string.Compare" refactoring
  • T559692 - Refactorings - The "Inline Temporary Variable" refactoring crashes in certain scenarios
  • T560906 - Refactorings - The Convert to Auto-implemented Property refactoring breaks code when the constructor parameter is "in PascalCase"
  • T558013 - Selection Embedding - The "Embed region" action does not select a region name after invocation
  • T558055 - Stop on Build Error - Feature supresses the VS option to display an Error List
  • T558374 - Templates - It is impossible to iterate through elements in XAML
  • T555668 - Test Runner - Combinatorial / Pairwise NUnit testing with TestRunner enabled causes Visual Studio to hang / become unresponsive
  • T557116 - Test Runner does not run .NET tests when a new sdk-based project is used
  • T561954 - TestRunner does not run xUnit 2.3 RC 2 unit test

What's New in v17.1.8

CodeRush for Roslyn

.NET Core 2.0 Support

  • You can now use the CodeRush for Roslyn Unit Test Runner to run .NET Core 2.0 tests and calculate Code Coverage in Portable PDB debug-symbols-format projects.

  • Unit Test Runner is now even faster when running .NET Core test cases.

Code Formatting

  • We have added a new code formatting feature that enables you to specify spacing options in your code.

    CodeRush for Roslyn Spacing options allow you to add or omit spaces around virtually every part of code. It is more flexible than the built-in Visual Studio code formatting options. Spacing style is applied using Code Cleanup.

    DevExpress | CodeRush for Roslyn

  • We have improved XAML Formatting with the ability to format markup extensions . You can now use the following options:

    • Break arguments apart only if they exceed the specified number. You can set a threshold argument count to determine whether argument splitting occurs, as well as a maximum number of arguments per line.
    • Align markup extension arguments with first argument.

    DevExpress | CodeRush for Roslyn

Code Analysis

This release includes a beta version of a new feature we've been working on, NullReferenceException Analysis . This feature identifies unprotected code that may unintentionally raise NullReferenceExceptions.

Null-reference exceptions often occur in edge-case scenarios, and tend to remain undetected even after publishing your software. These bugs are challenging for developers to find and are often discovered by customers after your app has shipped .

CodeRush for Roslyn now identifies code that may be at risk to raising a NullReferenceException. You can turn this feature on for C# (it is disabled by default ) on the Editor | All Languages | Static Code Analysis options page:

DevExpress | CodeRush for Roslyn

We encourage you to turn this feature on and let us know what you think.

Refactorings and Code Providers

We have added a new Add XML Comments Code Provider. Using it you can instantly add an XML doc comment to a member.

If you use Add XML Comments for a member that is an override or an interface implementation, the XML doc comment is based on the documentation found in the interface or ancestor class. If the target method has no base method or its base method or interface declaration has no XML comment, the code provider generates an empty XML comment with the correct structure.

DevExpress | CodeRush for Roslyn

Resolved Issues

  • T548278 - Code Analysis - CRR0026 diagnostic works incorrectly for empty methods used in assignments
  • T548372 - Code Analysis - CRR0026 diagnostics should not be processed for constructors
  • T551291 - Code Providers - The "Promote to parameter" feature incorrectly works for optional parameters
  • T547970 - Naming Assistant - IntelliSense is broken in Visual Basic after symbol typing if "Enabled Naming Assistant" is enabled
  • T544114 - Navigation - Tab to Next Reference - add a way to customize highlighting style
  • T550728 - Refactorings - Convert to Property with Change Notification incorrectly produces new code if the SetProperty method was present in the initial one
  • T548198 - Refactorings - Move Type to Namespace incorrectly processes partial classes with nested xml comments
  • T551274 - Selection Embedding - The Embed Selection ToString feature should correctly process double quotation marks in selected code
  • T548622 - Smart Semicolon doesn't work properly if a whitespace is added before close parenthesis
  • T550717 - Templates - The "le" template unexpectedly expands in the comment located in the same line with the preprocessor directive
  • T547901 - Unit Testing - 'Go to Class' doesn't work for Paramaterized Test Fixtures

What's New in v17.1.7

CodeRush for Roslyn

Code Coverage

  • You can now exclude specific projects from Code Coverage analysis using the *.runsettings file. For details refer to Microsoft's article, Customizing Code Coverage Analysis.

    DevExpress | CodeRush for Roslyn

  • You can now create and apply Filters to the Code Coverage report. For example, you can create a filter that only shows members with less than 70% coverage.

    DevExpress | CodeRush for Roslyn

Code Analysis - Unused Members

We have added a new analyzer that detects unused members .

DevExpress | CodeRush for Roslyn

You can also configure the highlighting of such members in the code editor ( Editor | All Languages | Static Code Analysis | Highlight unused members ).

DevExpress | CodeRush for Roslyn

The unused members can be safely deleted and this won't affect program behavior.

Refactorings and Code Providers

The Use string.Format refactoring is now available on interpolated strings .

Project-wide Code Cleanup (Preview)

You can now run Code Cleanup for the entire project . Simply right-click the project you want to clean in the Solution Explorer and select Cleanup Project from the context menu.

DevExpress | CodeRush for Roslyn

While the project is cleaned, a progress window is displayed.

DevExpress | CodeRush for Roslyn

If code cleanup is cancelled while it is still in progress, the code will remain unchanged.

Note: This feature is in a preview state, and may break or change the behavior of your code. You can undo the entire operation using the Visual Studio's Undo action (available only when any changed document is open).

Resolved Issues

  • T540626 - Code Cleanup mistakenly removes code in a preprocessor directive
  • T539206 - Code Formatter - .ToArray should be chaining with .Select, and should be indented at the same level as .Select
  • T539208 - Code Formatter - Add the "Wrap open brace" and "Wrap close brace" options for the "Lambda Expression" formatting rule
  • T539451 - Code Providers - Errors when using the move to namespace code provider
  • T540451 - General - Visual Studio hangs on exporting CodeRush settings
  • T539785 - Member Icons don't show for all members
  • T542659 - Move To Region - Header and regions lists have different weight
  • T539219 - Move To Region does not show existing regions in VB
  • T539222 - Move To Region does not work in VB.net in certain cases
  • T539669 - Templates - Errors when using the smart return template
  • T543212 - Visual Elements - The Member Icons menu closes when the cursor is moved and should be selected for the second time

What's New in v17.1.6

CodeRush for Roslyn

Code Formatting

We have implemented new formatting rules related to wrapping code (and aligning subsequent wrapped lines) for the following language elements (when they exceed the specified margin):

  • Ternary Expression
  • LINQ Expression
  • Binary Expression
  • Assignment Expression
  • Logical Expression
  • Parameters
  • Arguments
  • Array Initializer
  • Collection Initializer
  • Object Initializer
  • Chained Method Calls
  • Lambda Expression
  • Expression Body

DevExpress | CodeRush for Roslyn

These formatting options are applied as part of the Format Document rule, which can be optionally part of Code Cleanup. You can specify which rules are applied on the Code Cleanup options page.

DevExpress | CodeRush for Roslyn

You can also bind the FormatDocument command to a shortcut and use it to invoke the Format Document separately from Code Cleanup .

Code Analysis

We have added several new features to Spell Checker . We can now:

  • Check XML comments (<c> and <code> tags are ignored).
  • Check File names .
  • Exclude ToString() expressions.
  • Properly handle Microsoft.Naming suppressions. The Spell Checker now ignores words suppressed using the SuppressMessage attribute for CA1704 and CA1709 issues.

We have also added a new toolbar button to toggle the Spell Checker on and off.

DevExpress | CodeRush for Roslyn

Code Style

  • You can now set your preferred order for member modifiers. CodeRush for Roslyn features maintain it when adding or removing modifiers. For instance, you can set public and private modifiers to be placed before static . This feature is available for C# only, because Visual Studio automatically sorts modifiers in Visual Basic.

  • We are now synchronizing Code Style settings with Visual Studio's similar code style settings. The following settings are now synchronized between CodeRush and Visual Studio:

    • Local Declaration Style
    • Built-in Type Names
    • this / Me Qualifier Usage

    If you change any of these settings in Visual Studio, the corresponding settings in CodeRush will be updated to match your changes (going back and changing the CodeRush settings will not alter Visual Studio settings).

  • We have added the new Attribute list Code Style & Code Cleanup rule, allowing you to combine two or more attributes when they are applied to a single member.

DevExpress | CodeRush for Roslyn

Refactorings and Code Providers

We have improved the ForEach to Linq refactoring so it generates cleaner code in complex cases. The following Linq functions are now supported by the query generator: Where, Select, Cast, Distinct, FirstOrDefault, LastOrDefault, Aggregate, Any, All, and Count.

DevExpress | CodeRush for Roslyn

Move Member to Region

We have ported the Move Member to Region feature from CodeRush Classic. You can now create regions and move members among them using a simple GUI. Now simply click a member icon, select Move To Region and choose the target region.

DevExpress | CodeRush for Roslyn

Resolved Issues

  • T528495 - Code Actions - The "Conditional to Switch" code action is not available for a simple if-statement
  • T528993 - Code Analysis - False positive of CRR0025 for lambda expressions
  • T530447 - Code Issues - 'Can use Declare' code issue false positive in VB
  • T533012 - Code Issues - 'Logical OR expression has opposite operands' false positive
  • T533174 - Code Issues - 'This conditional's code block does not appear to be reachable' false positive
  • T530363 - CodeAnalysis - The "Error List" window displays errors for designer generated files when the "Check designer files" option is disabled
  • T531031 - Formatting - Array initializers are formatted incorrectly
  • T532340 - Formatting - Lambda expressions are incorrectly indented
  • T529698 - General - The closing 'X' mark should be more visible in the About dialog
  • T527471 - General - VS2017 is not visible in task switcher (Alt+Tab) when the CodeRush Options dialog is open
  • T525724 - IntelliRush - Breaks the Enter key behavior in VB
  • T532993 - IntelliRush - Incorrect expansion when calling the Generic method
  • T535856 - Member icons - Visibility changing adds redundant curly braces
  • T531436 - Navigation - Tab to Next Reference - Can't find references in "*.Designer.cs" files
  • T533750 - Organize Members - The number of empty lines between members is reset when adding a region
  • T534605 - Organize Members rule incorrectly formats the "base" call for a constructor
  • T526565 - Refactorings - Accept the variable name when using declare local
  • T533783 - Refactorings - The "Introduce using statement" refactoring works incorrectly when initializing a variable via a property
  • T530892 - Refactorings - The "Update XPO Fields Class" provider removes empty lines
  • T530266 - Refactorings - The 'ForEach To Linq' refactoring adds a redundant line break in Visual Basic
  • T530499 - Refactorings - The 'Move Type to Namespace' refactoring incorrectly updates the Implements clause in VB
  • T465726 - Selection Expand works incorrectly on an enum with XML Doc comments
  • T522585 - Templates - "Convert to Property with Change Notification" expansion uses an improper trigger for the PropertyChanged event
  • T528883 - Templates - Smart Constructor - Adding a default value to an optional parameter should not change a linked value
  • T531001 - Templates - The 't?type?' template expands inside string literals
  • T533797 - Test Runner - The output text should be monospaced
  • T529992 - XPO Fields - A Visual Studio message about editing a file is shown when saving a document

What's New in v17.1.5

CodeRush for Roslyn

Refactorings and Code Providers

We have implemented the XPO Fields feature based on the XPO EasyFields community plugin for CodeRush Classic. It is helpful for those who work with eXpress Persistent Objects as it enables you to automatically generate and update the XPO FieldsClass based on the existing class members.

DevExpress | CodeRush for Roslyn

Code Generation

  • The Declare Menu is now accessible from Visual Studio's Light Bulb action menu.

  • We have added configuration options for members generated by the following features:

    • Declare Menu
    • Add to Interface
    • Add Getter/Setter
    • Declare Providers

    You can find these options on the Editor | <Language> | Code Actions | Code Actions Settings options page.

    DevExpress | CodeRush for Roslyn

Learn more about Code Generation

Code Style

We have added a new Code Style rule named Braces in statements . You can now configure CodeRush for Roslyn to add block delimiters to places where they are not obligatory. The Force braces and Remove redundant braces Code Cleanup rules were replaced by a single rule Apply 'Braces in statements' style .

Selection Tools

We have added the new Selection Tool called Include Previous/Next Element . You can now use this tool to select code blocks above and beyond the currently selected code block. Use Ctrl + Alt + Shift + Up Arrow or Ctrl + Alt + Shift + Down Arrow to select text from the current caret position to the end of the next code element. This is especially useful in combination with the Selection Expand/Reduce feature.

DevExpress | CodeRush for Roslyn

Resolved Issues

  • T527186 - Actions - 'Find All References' does not work from xaml editor
  • T518233 - Clipboard History - Unable to disable Clipboard History
  • T523216 - Code Cleanup - Applying hangs with the enabled 'Remove redundant type qualifiers rule on specific code
  • T527356 - Code Cleanup - Removes the 'Me' qualifier and produces incorrect code in Visual Basic
  • T523451 - Code Providers - 'Declare Field with Initializer' should declare a read-only field when called in the constructor
  • T521771 - General - CodeRush raises an exception in WebApi with .NET Core
  • T518206 - Refactoring - 'Introduce Format Item' uses incorrect {} index number
  • T522390 - Refactoring - 'Update XPO Fields Class' generates duplicated header comments
  • T522391 - Refactoring - 'Update XPO Fields Class' inserts a redundant break line after duplicated header comments
  • T522388 - Refactoring - 'Update XPO Fields Class' should keep existing region directives
  • T523549 - Templates - The System.Drawing.Color type has an incorrect 'd' mnemonic
  • T526713 - Templates - Typing '.' inside the link breaks it
  • T523737 - Test Runner - Clear previous results before running tests
  • T523456 - TestRunner window incorrectly displays parametrized tests
  • T524137 - The 'Break apart arguments/parameters' refactoring incorrectly sets indents for arguments/parameters when the 'Keep tabs' option is enabled
  • T527573 - Unit Testing - TestRunner does not support the "Theory" attribute in NUnit

What's New in v17.1.4

CodeRush for Roslyn

Navigation

  • We extended the Drop Marker feature, adding the ability to drop markers for selections , and then later return, restoring the selection, when you collect the marker. Simply select the text and then drop a marker using Alt + Home . To collect markers press Esc or Alt + End .

    DevExpress | CodeRush for Roslyn

  • Jump To File and Jump To Symbol windows can now display Recently Opened Items .

    DevExpress | CodeRush for Roslyn

  • The Jump to Symbol , Jump to File , and Jump to Everything menus can now use an identifier under the caret as the initial filter option. You can enable this feature on the Navigation | General options page.

Refactorings and Code Providers

  • We widened the accessibility of many refactorings and code providers, making them available with the caret anywhere on the line containing the relevant code you want to change:

    • Use Expression Body
    • Collapse/Expand Property, Accessor, Method
    • Reverse Conditional
    • Flatten Conditional
    • Compress/Expand Ternary Expression

    This improves discoverability and is easier to use.

Unit Testing

In this release we have excluded the PhantomJS library from the install, allowing you to specify the path to your preferred PhantomJS library. Also, you don't have the PhantomJS library, the Jasmine Test Runner prompts you to install it through npm or NuGet.

Code Generation

  • You can now choose where CodeRush should place newly-generated type declarations. Options include: Above the active type , Below the active type , or In a newly-created file . Use the Editor | <Language> | Code Actions | Code Actions Settings options page to change this option.
  • You can now configure naming conventions for generic types.

Resolved Issues

  • T498826 - Code Coverage does not work in .NET Core Web App
  • T516267 - General - CodeRushWelcome.exe isn't signed
  • T511449 - Templates - Active template expansion changes the previous template expansion
  • T515045 - Test Runner cannot run tests in multi-framework test projects
  • T515273 - Test Runner - Names for NUnit TestCaseSource tests are incorrect
  • T508760 - Test Runner does not support running NUnit tests on the .NET Core platform

What's New in v16.2.8

CodeRush for Roslyn

Advanced Code Generation

This release introduces the Declare menu, a quick and easy way to add needed code to your types. These declarations are now available:

  • Automatic Constructor generation (which also automatically initializes selected members).
  • Delegate Members is useful when you want to surface a field's or property's members to this parenting type. Creates members that wrap around the contained field's or property's members. For example, if your type contains a generic List of strings (as a field or property), you can wrap that List's Count property in its own property, surfacing it in your type.
  • IDisposable Implementation generates the Dispose pattern, disposing the specified fields and properties.
  • Equality Members generates two Equals methods and a GetHashCode override.
  • Override Members overrides virtual and abstract methods (e.g. GetHashCode ).
  • Properties and Read-only Properties generate properties for the selected fields.
  • Comparison Members generates a CompareTo implementation, individually comparing the specified fields, and optionally implements the IComparable<T> and IComparable interfaces.
  • Missing Members implements any interface members missing from the active class.
  • Partial Methods implements any partial methods missing from the active class.
  • ToString Override .

DevExpress | CodeRush for Roslyn

DevExpress | CodeRush for Roslyn

You can access the Declare menu using the Alt+Insert shortcut.

Clipboard and Selection Tools

This release introduces the Clipboard History list, providing complete visual access to your ten most-recent clipboard operations. Instantly paste with the Ctrl+number shortcut. Filter through the list just by entering the text you're looking for. Ctrl+Shift+V brings up the Clipboard History list.

DevExpress | CodeRush for Roslyn

Navigation

  • We have added support for directories and projects into the Jump To File menu.

    DevExpress | CodeRush for Roslyn

New Refactorings and Code Providers

  • Implement IDisposable makes it easy to implement the dispose pattern in your types.

    DevExpress | CodeRush for Roslyn

  • Encapsulate Property wraps selected field properties (declared by the field's type) in new properties declared in the active class/struct.

Unit Testing

In this release, we're introducing the beta version of the Jasmine Test Runner for JavaScript and TypeScript. This feature, in its current state, should be considered a technical preview, but you can already run Jasmine tests with it using the CodeRush Test Runner window. This beta works with the following restrictions:   - Test discovery is not implemented yet. Every file with unit tests should reference the Jasmine framework (e.g., contain the following string at the beginning: "/// <reference path='path/to/jasmine.js' />"). - Currently all of the project's JS files will appear in the Test Runner. You can Ctrl+click to multi-select the test files you want to run, or you can right-click a file and add it to a new or existing Test Runner session , allowing you to easily run all tests in all files held by that session at once. - Test Debugging and Code Coverage are not yet implemented.

DevExpress | CodeRush for Roslyn

This beta feature is disabled by default , however you can enable it using the Unit Testing | Test Runner options page.

C# 7 and VB 15 Syntax Support

  • We have added support for the new language features to the Debug Visualize, including support for the new switch capabilities.

    DevExpress | CodeRush for Roslyn

  • Smart Duplicate Line now supports the new language features, including binary literals and digit separators.

    DevExpress | CodeRush for Roslyn

  • Expand Method , Expand Property , Expand Getter and Expand Setter refactorings all now support the new language features.

Other improvements

  • We have implemented asynchronous extension loading , allowing CodeRush for Roslyn to load even faster.

  • Paste Replace Word (default shortcut is Ctrl + B ) is now available in XAML markup.

Known Issues

  • T508760 - TestRunner doesn't support running NUnit tests on the .NET core platform

Resolved Issues

  • T500747 - Code Providers - DeclareProvider throws an exception in VB
  • T503375 - Code Providers - The "Introduce change notification" feature incorrectly generates a property name for PropertyChangedEventArgs
  • T499420 - Code Providers - The "IntroduceSetterBody" provider causes an error
  • T507545 - Decompiler - An exception is thrown on an attempt to view resources
  • T504359 - General - Massive ngen.exe calls of CodeRush assemblies after project build in VS 2017
  • T507563 - General - Ngen error in Windows log after updating CodeRush
  • T506485 - General - Registration procedure leads to VisualStudio deadlock
  • T500255 - General - Spell Checker causes Visual Studio crash in certain scenarios
  • T504476 - IntelliRush - A double dot is inserted on typing or completing attached properties when IntelliRush is enabled in Xaml
  • T501444 - Refactorings - InlineTempProvider throws System.ArgumentNullException with the "Value cannot be null" message in certain cases
  • T505702 - Refactorings - NullReferenceException is thrown inside the reorder parameters refactoring
  • T499393 - Refactorings - The 'ForEachToLinqProvider' refactoring encountered an error and has been disabled
  • T506958 - Refactorings - The Move Type to Namespace refactoring incorrectly handles references to static type members and type constructors in VB

What's New in v16.2.7

CodeRush for Roslyn

Code Style

We have added a new Code Style rule for placing new Namespace reference imports/using declarations . You can now choose one of three styles: use fully qualified type names, place new imports/using references at the top of the file, or place new imports/using statements inside the active namespace.

DevExpress | CodeRush for Roslyn

New Features for XAML

We have added two new refactorings: Convert Nested Element to Attribute and Convert Attribute to Nested Element . Using them, you can extract an attribute from a XAML tag and make it a child element. You can also perform the reverse operation — inline a child element as an attribute of the parent tag. This refactoring can increase XAML readability when there are excessive attributes or when the nesting level gets too deep.

DevExpress | CodeRush for Roslyn

C# 7 Syntax Support

  • The Expand\Compress Ternary refactorings now support C# 7 syntax.
  • Smart Return ('r' template) now supports C# 7 syntax.
  • Declare Providers also support C# 7 syntax.
  • The Use Expression Body refactoring now works on constructors , destructors , getters and setters .

Refactorings and Code Providers

  • Move Type to Namespace and Extract String to Resource refactorings are now more organized and easier to execute with the new Code Actions Sub-menu .

    DevExpress | CodeRush for Roslyn

  • We have added two new Code Providers: Introduce Change Notification and Convert to Property with Change Notification . These code providers will help you implement the INotifyPropertyChanged interface for the active property.

    DevExpress | CodeRush for Roslyn

Other Improvements

  • To simplify the installation experience, we now provide CodeRush for Roslyn installer designed to install the extension to all supported IDE versions at once. It is accessible through the Download Manager.

    DevExpress | CodeRush for Roslyn

Resolved Issues

  • T490492 - Linked Identifiers - The resx file is broken when it contains a link and is edited via a designer
  • T488142 - Naming Assistant is not required in certain scenarios
  • T495156 - Naming Assistant overrides the partial name
  • T492639 - Refactorings - "Convert to Function" should be available when the method has the expression body
  • T493583 - Refactorings - ConvertToInitializerProvider is failed when invoking the Quick Actions menu
  • T492101 - Refactorings - DeclareProvider fails on the string literal in VS2017
  • T477933 - Refactorings - Extract String to Resource - The caret jumps to the beginning of a resource class name when you start typing
  • T493274 - Refactorings - Getting a lots of different error messages when invoking the Quick Actions menu
  • T492521 - Refactorings - ParameterRefactoringProvider is crashing in a VB.NET project
  • T488891 - Refactorings - Widen Scope - Invalid code is generated for a variable named "@object"
  • T485302 - Region Painting - A region is rendered with artifacts
  • T490759 - Rename File to Match Type - Never finishes when applied to a class from a web-site project
  • T488957 - Selection Expand should select a parameter name and then the whole parameter
  • T488176 - Setup Wizard - The Tab and Space keys are swapped on the "Enable Template Selection" screen
  • T492272 - Templates - The property template expansion does not include the "RaisePropertyChanged" part if a base class implements INotifiyPropertyChanged
  • T488407 - TestRunner - Code Coverage - No coverage results in a .net core project with xUnit tests
  • T495365 - TestRunner - xUnit tests are not run on a specific project with "No unit test provider that supports the selected project(s) is found" message

What's New in v16.2.6

CodeRush for Roslyn

This update adds the support of Visual Studio 2017 and includes bug fixes, performance improvements and usability tweaks.

  • T485965 - General - Performance issues when typing in large unit tests files
  • T485444 - Refactorings - The "Reorder Parameters" refactoring adds strange code on being applied
  • T486352 - Refactorings - In a .NET Standard Library project the "Rename Namespace to Match Folder Structure" refactoring suggests incorrect namespaces
  • T485289 - Test Runner does not hit any breakpoints while debugging .net core tests on Visual Studio 2017 RC4 (15.0.0-RC.4+26206.0)
  • T486295 - Test Runner - xUnit - Test Runner incorrectly parses InlineData arguments

What's New in v16.2.5

CodeRush for Roslyn

Code Analysis

We have added the Code Metrics feature. Code metrics measure code complexity. You can now place code metric values in the editor to the left of member declarations, so you can immediately spot problem code members.

DevExpress | CodeRush for Roslyn

Three code metrics are currently available out of the box: Maintenance Complexity , Cyclomatic Complexity , and Line Count . This list will be extended with future releases.

Naming Assistance

We have added a brand-new feature called the Naming Assistant . It makes naming new members, variables, and parameters easier.

DevExpress | CodeRush for Roslyn

The Naming Assistant window automatically opens when you start typing a new symbol name. It holds a list of suggestions, which is filtered as you type.

This symbol name suggestion list is generated from:

  • Identifier names used in the solution and in the current code block
  • The identifier type
  • The identifier role (member, variable, or parameter)

Simply press the up and down arrows to select a suggestion, and then press Enter to accept the selected symbol name.

Decompiler

We have improved the Decompiler output to make it more readable. The following changes were made:

  • Anonymous methods now appear inline.
  • Nullable types use modifiers ( int? instead of Nullable<int> ).
  • XML documentation comments now appear in decompiled code.

Navigation

  • We have added a fast and easy way to navigate to code from the References Window . While the window is open, press the F8 key to jump to the next item and press Shift + F8 to jump to the previous item.

  • You can now use the Jump To dialog to navigate through currently open files.

Refactorings

  • We have added the Move Type to Namespace refactoring, which instantly changes the namespace of the active type.

  • The Introduce Using Statement refactoring replaces object creation and dispose code blocks with a using statement. This improves code readability and ensures the locally used objects are properly disposed.

    DevExpress | CodeRush for Roslyn

Visualization Tools

  • We have added the Region Painting feature, which adds low-contrast visual representation of #region directives, reducing visual noise where regions are used.

    DevExpress | CodeRush for Roslyn

Other improvements

  • You can now highlight errors and warnings in the Output window , making it easier to recognize important messages faster.

    DevExpress | CodeRush for Roslyn

  • The Smart Duplicate Line feature includes the following improvements:

    • When duplicating items in collection initializers and in parameter lists, a comma is added automatically.
    • You can now disable the "smart" part of the Smart Duplicate Line feature so that it simply duplicates the line of code as is.

Resolved Issues

  • T478417 - Debug Visualizer incorrectly evaluates VB expressions in certain cases
  • T476899 - Debug Visualizer setting is not saved
  • T477079 - General - Visual Studio 2017 RC3 - Can't open the QuickActions menu in XAML
  • T472272 - General - Visual Studio crashes when switching from Design View to Code View
  • T478776 - Navigation - Tab to next reference not working in VS2017 RC VB.Net project
  • T478207 - Refactorings - Declare Parameter throws the NullReferenceException after updating Visual Studio to the VS 2017rc (RC.3+26127.0) version
  • T476559 - Refactorings - Extract String to Resource shows resx files for forms and fails when images are used in resources
  • T474028 - Refactorings - Optimize Namespace References - Blank lines are not removed after applying Optimize Namespace References refactoring in VB code
  • T483669 - Refactorings - Rename - VB.NET - Renaming a class leads to compilation errors
  • T480142 - Refactorings - 'Rename namespace to match folder structure' doesn't work
  • T475327 - Refactorings - 'Rename file to match type' is unavailable on classes with a trailing colon
  • T475395 - Refactorings - Split Conditional - Comments above the if statement are removed after applying Split Conditional refactoring
  • T477966 - Refactorings - The "Convert to Null Coalescing Operation" refactoring is available when an expression type of a conditional true path differs from the nullable variable value type
  • T479168 - Refactorings - The "Rename namespace to match folder structure" refactoring hangs in a .NET Core project
  • T480377 - Templates - CodeRush for Roslyn doesn't consider context in XML files
  • T479176 - Templates - Namespace references are not declared when expanding a template with a template name variable
  • T475094 - Test Runner - Category attributes are not correctly taken into account for MSTest
  • T477090 - Test Runner - Unable to use Test Explorer to run Roslyn tests
  • T477989 - Test Runner doesn't run .net core tests after updating to Visual Studio 2017 RC3 (15.0.26127.0)

What's New in v16.2.4

CodeRush for Roslyn

This update includes bug fixes, performance improvements and usability tweaks.

Resolved Issues

  • T465726 - Clipboard and Selection Tools - Expand Selection works incorrectly on an enum with XML Doc comments
  • T465298 - Clipboard and Selection Tools - The "Paste as XAML\SVG" feature inserts SVG content at the end of the selected text instead of replacing it
  • T464345 - Code CleanUp should not change the "" literal in the switch case clause
  • T462156 - Code Cleanup - The "Apply 'this' qualifier style" rule adds "this" qualifier to a static field initializer
  • T463225 - Code Cleanup - NullReferenceException during cleanup if "Remove Redundant type qualifier" is enabled
  • T466846 - CodeRush - Code Cleanup removes a private method used only in the DebuggerDisplay attribute
  • T464594 - General - Visual Studio crashes on pressing the Tab key on an identifier
  • T463853 - General - Installing CodeRush for Roslyn v16.2.3 clears all my templates
  • T463232 - General - Installation - The CodeRushWelcome.exe tool is not signed
  • T462737 - Navigation - "Tab to Next Reference" in XAML code behind causes VS2015 crash
  • T464164 - Navigation - 'Tab to Next Reference' when applied from an XAML file does not work
  • T462944 - Navigation - "Jump To Symbol" doesn't show any targets if not all members are selected in the filter options
  • T436710 - Navigation - Save current grouping on importing results of the 'Jump to References' provider
  • T470377 - Refactorings - The "Inline Method" refactoring produces non-compilable code or changes the behavior when a method to be inlined uses both a ternary operator and a return value in an expression
  • T398766 - Refactorings - Contract.Requires for an array shouldn't check its length
  • T460967 - Refactorings - The "Declare Local" provider should select a variable name
  • T464602 - Refactorings - Implement IEquatable for structures shouldn't test for nullability or reference equality
  • T461375 - Refactorings - 'Use nameof' should not use 'this' keyword in attributes
  • T465159 - Refactorings - 'Inline Method' fails if a target method has parameters with a default value
  • T463200 - Refactorings - The 'Collapse Getter' option is missing in Code Actions Catalog
  • T461544 - Refactorings - The "Convert to auto-implemented property" refactoring removes the "WriteOnly" modifier from write-only properties
  • T451491 - Refactorings - The "Add Parameter" refactoring is not focusing a new parameter
  • T461969 - Refactorings - Split Initialization from Declaration should not be available on constant declaration
  • T465789 - Refactorings - The "Convert to Null Coalescing Operation" refactoring is suggested in an invalid scenario
  • T465051 - Shortcuts - F12 does not work in .cshtml file
  • T462798 - Shortcuts - All shortcut options are missing if the Japan input language is active
  • T411676 - Templates - Automatic property expansion not working correctly
  • T461806 - Templates - The "p" template does not trigger the "PropertyChanged" event handler under certain conditions
  • T468343 - Test Runner - The "Ctrl+T, F" shortcut does not run all tests in a file
  • T418389 - Test Runner - Nunit 3 TestCaseData Name is not used for a test name in TestRunner
  • T463369 - Test Runner - It is impossible to debug tests using VS2015 Community Update3 and XUnit 2.1
  • T461948 - Test Runner - Unit Tests created with NUnit framework older than 2.6.3 does not run
  • T462705 - Test Runner - It is impossible to start debugging from the test icon's popup menu
  • T456710 - Test Runner - Filtered tests do not display information in the "Details" tab
  • T463188 - Test Runner doesn't run unit tests created with Visual Studio 2017 Community edition
  • T469783 - Test Runner fails to run tests when running a specific parametrized test through the test runner window's context menu
  • T439931 - UI - A tooltip for the type contains a wrong instruction after expanding the "p" template
  • T465342 - UI - CRR doesn't take themes with the Japanese locale into account

What's New in v16.2.3

CodeRush for Roslyn

Refactorings and Code Providers

  • Convert to Function - Allows you to easily convert a method that returns void into a function that returns the appropriate type (matching the type of the expression returned). CodeRush For Roslyn | DevExpress
  • Convert to Procedure – This code provider is the opposite of Convert to Function . It converts a method that returns a value of any type to a proc that returns void (or a Sub in VB).
  • Extract Interface – This refactoring creates an interface based on the public members of the active class, and modifies the active class so it implements the extracted interface. CodeRush For Roslyn | DevExpress
  • Widen Scope (promote to field) - Use this to move a local variable declaration from inside a method body out to become a private field of the parenting class. CodeRush For Roslyn | DevExpress

Stop on Build Error

You can now configure CodeRush for Roslyn to stop building a solution if project building fails and an attempt to build a dependent project is made. CodeRush For Roslyn | DevExpress

Typing Helpers

  • Paste Replace Word – Replaces the identifier under caret with the one on the clipboard in a single keystroke. Press Ctrl+B when the caret is on an identifier to immediately replace it.
  • Smart Duplicate Line improvements – we have extended the Smart Duplicate Line functionality with the following improvements:
    • Duplicate Line features are now available in XAML . CodeRush For Roslyn | DevExpress
    • The hex, octal, float, double , and decimal literals are now automatically incremented. CodeRush For Roslyn | DevExpress
    • Duplicate Line recognizes camel case parts of an identifier name and create links between similar parts of different identifiers. CodeRush For Roslyn | DevExpress
    • Duplicate Line recognizes enum element references and automatically cycles through those elements (if a pattern of enum element cycling is detected in the surrounding code). CodeRush For Roslyn | DevExpress
    • If Duplicate Line cannot recognize any pattern, it creates a text field around each identifier and literal in duplicated line.

Other improvements

  • Navigation features now support XAML bindings.
  • Now items in Code Actions Menu related to Spell Checker and a number of Code Providers are displayed in submenus.
  • We have added the ability to Collect a Marker and Paste clipboard contents in its place using a single keystroke ( Shift+Esc ).
  • We have added a menu item allowing you to clear all Markers in the document.
  • You can now group Code Issues and References by folder containing the source code file. CodeRush For Roslyn | DevExpress

Resolved Issues

  • T453344 - Code Templates - "And" and "Or" are not converted to "&&" and "||"
  • T459131 - Debug Visualizer - IDE freezes when Debug Visualizer is used on large arrays
  • T435128 - General - Visual Studio's editor slows down in combination with CodeRush Roslyn and StyleCop.Analyzers
  • T456824 - Navigation - The CodeRush References window does not find references to a default property when the property is defined more than once
  • T447122 - Navigation - Jump to Symbol sometimes fails to filter elements when a filter string is typed in the lower case
  • T453443 - Refactorings - Introduce Format Item - VB - Incorrect part of text is selected after applying the refactoring
  • T454947 - Refactorings - The "Add To Interface" refactoring is unavailable for a method with an implicit visibility modifier
  • T451175 - Refactorings - VS2017 RC Support: "Add Parameter" refactoring incorrectly resolves argument type
  • T411595 - Shortcuts - Some bookmark shortcuts are missing
  • T450875 - Shortcuts - The "JumpToEverything" command is misspelled
  • T451854 - Shortcuts - CodeRush for Roslyn overwrites and/or deletes keyboard shortcuts in VS 2015
  • T451856 - Shortcuts - CodeRush for Roslyn incorrectly recognizes key combinations pressed on the keyboard with a non-English layout
  • T451651 - Templates - The "gs" template does not expand inside of a property without "get" or "set" accessors
  • T451808 - Test Runner cannot find Nunit framework v3.4.1
  • T455392 - Test Runner does not display assembly-level NUnit categories
  • T442314 - Test Runner does not recognize the NUnit3 TestCaseSource attribute
  • T451190 - VS2017 RC Support - The "g2x2" template produces incorrect results
  • T451150 - VS2017 RC Support - Test Runner doesn't run unit tests created with Visual Studio
  • T451170 - VS2017 RC Support - Test Runner doesn't run xUnit tests in a .NET core app

What's New in v16.1.9

CodeRush for Roslyn

We have added support for Visual Studio 2017 RC .

Resolved Issues

  • T443560 - Bookmarks' state is not saved when a solution is closed
  • T446281 - Code Cleanup - The "Apply visibility style" option works incorrectly with a public partial class
  • T428182 - Code Cleanup is no longer converting non-implemented properties to autoimplemented
  • T442924 - Code Providers - The "Declare local" code provider should generate an object creation expression instead of the "null" expression when it is possible
  • T446890 - General - It is impossible to turn off warnings for ASP.NET and/or aspx-files
  • T446280 - JumpTo Symbol displays images of different size in advanced options when High-DPI environment is used
  • T446279 - JumpTo windows is positioned off screen on a High-DPI screen
  • T443828 - Organize Members - 'Remove existing line breaks' option doesn't work in some cases
  • T449912 - Organize Members creates a non-compilable (messy) file when used outside of a class
  • T449911 - Organize Members does not move initialized enum fields to the correct position
  • T449018 - Organize Members doesn't remove trailing empty lines after a single line comment if the 'Remove existing line breaks' option is enabled
  • T450203 - Refactorings - The "Remove Type Qualifier" refactoring does not work in some scenarios
  • T425353 - Refactorings - Optimize namespace references do not remove blank lines
  • T446325 - Refactorings - The "Move Class to File" refactoring generates Imports without space between the Import keyword and the Namespace name in VB
  • T439892 - Templates - The enable/disable state of a templates folder should be based on the templates' state in it

Known Issues

  • T451170 - Test Runner doesn't run xUnit tests in a .NET core app
  • T451150 - Test Runner doesn't run VS Unit tests

What's New in v16.1.8

CodeRush for Roslyn

New Features for XAML

  • XAML Code Formatting CodeRush For Roslyn | DevExpress
  • Import All Types code provider – declares all namespace references used in the XAML file. CodeRush For Roslyn | DevExpress

Refactorings, Code Providers and Code Formatters

  • Break Apart or Line Up both Parameters and Arguments – either collapses a list of method parameters or passed-in arguments into a single line, or breaks them apart into separate lines (one for each parameter or argument).
  • Remove Type Qualifier – removes the explicit namespace definition from symbol usage and adds the corresponding namespace reference to the file's using/imports list. You can use it on a single identifier , on all identifiers in the current file, or as a code cleanup rule.
  • Decompose Parameter – changes the method signature in order to improve encapsulation, allowing you to pass in only the part or parts of the parameter instead of the parameter itself. This refactoring often helps in promoting reuse by reducing the complexity of the objects needed to call a method.
    For example, if a method accepts a Person instance but only references that Person's Age property (see IsAdult in the screenshot below), Decompose Parameter will change that method and update all calling sites, so only the Age is passed in. CodeRush For Roslyn | DevExpress
  • Extract String to Resource – Adds a string literal to an existing RESX file (creating the new RESX if necessary), and replaces the string with the resource link. You can also optionally extract all string literals within a method or accessor.
  • Declare Parameter – Adds the selected identifier to the method signature and updates all usages.

Unit Testing

Now, the Code Coverage feature supports .NET Core test cases.

Other Improvements

  • The Duplicate Line feature is now called Smart Duplicate Line . Now it watches and learns from your changes to improve the duplicate line experience, creating text fields for the parts of the line we expect you to change, and automatically incrementing integer values if we detect an incrementing pattern.
  • We have improved and redesigned the options page structure . Now features are grouped by language, and include brief descriptions with links to further documentation. For some pages, configuration options which are less likely to be changed are hidden in the Advanced tab, located in the upper right of the options page.
  • Also, navigation features in the editor have received a UI improvement, enhancing clarity for selected filtering options in the Jump to Symbol menu.

Resolved Issues

  • T432552 - Code Analysis detects non-reachable code incorrectly
  • T433650 - Code Cleanup - "CodeCleanUpProvider" encountered an error and has been disabled
  • T428182 - Code Cleanup is no longer converting non-implemented properties to auto-implemented
  • T438241 - Code Cleanup Options Page - Visual Studio hangs when the "Apply variable declaration style" is selected
  • T429024 - Cycle Scope Up/Down is not working for members with attributes
  • T433809 - Debug Visualizer doesn't clean up hints when debugging is ended
  • T435312 - General - CodeRush disrupts standard IntelliSense
  • T441550 - General - Immediate Window is losing focus
  • T438575 - Import Templates - Not all templates are imported if the same folder already exists in the templates tree
  • T439513 - Import/Export - Exporting settings to an existing file fails
  • T434140 - Import/Export - Visual Studio crashes on an attempt to import custom CodeRush Classic templates
  • T442172 - IntelliRush - Typing the hyphen symbol wrongly accepts IntelliRush in .less files
  • T429258 - Member Icons - Layout is inconsistent when the editor's font size is different from the default one
  • T434723 - Navigation - "Jump to : References" doesn't find any locations in a .NET Core project
  • T441953 - Navigation - "Jump to symbol" is slow when a local file is used
  • T430859 - Navigation - The "Show All References" command (Shift + F12) does not work from a top window of a split screen
  • T436284 - Navigation - The "Show All References" command crashes Visual Studio
  • T431832 - Options - Templates - The state of the templates tree is not preserved
  • T434143 - Options - The template editor caret is invisible in a custom Visual Studio color theme
  • T433234 - Organize Members - A field with an initializer is not moved to the 'fields' group
  • T403986 - Organize Members - Add the capability to clone the scheme of one of existing rules during the creation of a new scheme
  • T435618 - Organize Members - Fields initialized by lambda expressions are not sorted
  • T403992 - Organize Members - Improve editing a rule that is surrounded by a region
  • T436821 - Organize Members adds a blank line between the #region head and the next line of code each time it is applied
  • T433235 - Organize Members should not remove line breaks after a list of usings
  • T441612 - Refactorings - Optimize namespace references leaves in duplicates
  • T428544 - Refactorings - Renaming a namespace alias renames the namespace instead
  • T436523 - Refactorings - The "Add to Interface" refactoring needs to show generic parameters
  • T429676 - Refactorings - The "Move Type to File" refactoring fails in a .NET Core project
  • T428359 - Refactorings - The "Rename Namespace to Match Folder Structure" refactoring causes an exception
  • T431421 - Refactorings - The "Rename Namespace to Match Folder Structure" refactoring incorrectly works when there are two classes with the same name
  • T430214 - Selection Embeddings do not allow newlines
  • T436130 - Smart Semicolon - A smart semicolon is not working in lambda-defined events
  • T433583 - Templates - A dependent namespace is not added when there is one with alias
  • T425589 - Templates - A template incorrectly works in an html file
  • T430633 - Templates - The "using xunit" statement is added during the "tm" template expansion when it already exists inside the namespace definition
  • T427846 - Templates - The 'r' template does not expand on the first attempt
  • T428089 - Templates - The 'sw' template doesn't work correctly on being used with the method call argument
  • T439932 - Templates - Typing in the "(" symbol breaks the link in the "p" template
  • T437351 - Templates (C#) - and, or, not, xor etc. should not be expanded inside xml comments
  • T433271 - Templates do not support namespace aliases
  • T434975 - Test Runner - A test icon hint is shown incorrectly for certain monitors' configuration
  • T417384 - Test Runner cannot run unit tests of Roslyn (xUnit)
  • T426861 - Test Runner doesn't actually run .NET Core xUnit tests
  • T428070 - Test Runner stops randomly when running .Net Core xUnit tests

What's New in v16.1.7

CodeRush for Roslyn

This update includes bug fixes, performance improvements and usability tweaks. The full list of changes is below.

  • Reorder Parameters is now available on method calls, indexers, constructors, object creation expressions and element access expressions.
  • We have added a shortcut to collapse/expand code regions using keyboard. When the caret is located at the beginning of a string containing the #region directive, pressing the Space key will expand or collapse this region.
  • IntelliRush performance was improved.

Resolved Critical Issues

  • T413984 - General - Docking the 'Code Issues' window crashes Visual Studio

Resolved Issues

  • T418410 - Code Analysis progress goes beyond 100% with certain projects
  • T415028 - Code Cleanup - 'Make properties auto implement code' cleanup rule does not take a language version into account
  • T419766 - Code Cleanup - Sort namespace references - The "Place System references first" option does not work
  • T422614 - Code Cleanup - The 'Apply variable declaration style' provider shows an error message on specific code
  • T416484 - Code Cleanup - The 'Make properties auto-implemented' rule causes errors when used with ReadOnly properties in VB
  • T414372 - Code Cleanup should not change the Designer Code
  • T418364 - Cycle Scope Up/Down doesn't work at the end of the method when the "Place open brace on new line for methods" formatting option is enabled
  • T419769 - General - CodeRush for Roslyn incorrectly suppresses auto-complete on entering the ";" symbol
  • T413618 - General - CodeRush for Roslyn is disabled after installation if CodeRush Classic is already installed
  • T412352 - General - Editing the "Organize members" options makes it impossible to reopen the "Options" window for certain scenarios
  • T418139 - General - Import of CodeRush Classic settings disables Reorder Parameters refactoring shortcuts
  • T403571 - General - Namespace aliases are incorrectly sorted during code cleanup
  • T417880 - Markers - An option to turn off the locator beacon animation is missing
  • T409944 - Markers - The Esc key collects markers in scenarios when it should not
  • T414419 - Naming Conventions - The Interface rule does not work
  • T421359 - Navigation - The "Jump to file" window displays duplicated items if a file belongs to a shared project referenced by multiple projects within a solution
  • T412313 - Organize Members incorrectly determines the default visibility of members in Visual Basic
  • T416816 - Refactorings - Boolean to Enum refactoring does not update ctor parameters in attributes
  • T423806 - Refactorings - Conversion to string interpolation is broken for string.Format calls with 10 or more parameters
  • T413999 - Refactorings - Implement IEquatable doesn't work on CodeRush Roslyn
  • T414163 - Refactorings - RenameFileToMatchTypeCodeRefactoringProvider encountered an error and has been disabled
  • T416551 - Refactorings - Reverse Boolean refactoring does not update constructor parameters in attributes
  • T421647 - Refactorings - The 'Convert to auto-implemened properties' refactoring shouldn't be available for properties that are not implemented
  • T414995 - Refactorings - The 'Make Implicit' refactoring should preserve a variable type
  • T418342 - Shortcuts - The shortcut binding to the "Num Del" key does not work
  • T419773 - Smart semicolon incorrectly moves semicolons for lambda expressions
  • T419631 - Templates - The "n." template shouldn't be expanded within the Object Initializer
  • T413683 - Templates do not work in certain code parts
  • T421948 - Test Runner - Visual Studio hangs when many files should be updated
  • T414108 - Test Runner - does not run any tests in the 16.1.6 release (Visual Studio 2015)

What's New in v16.1.6

CodeRush for Roslyn

Code Analysis

  • You can now run Code Analysis for the active project or file separately.

  • The Code Analysis report now includes information about source files .
  • You can now reconfigure Code Analysis without restarting Visual Studio.
  • We have added the ability to check naming conventions continuously in background .
  • The Code Analysis performance has been improved.

Navigation

The new Jump to Everything navigation provider allows you to jump to any file and symbol in the solution.

CodeRush For Roslyn | DevExpress

Refactorings and Code Providers

  • Convert to System Type/Built-in Type lets you easily switch between CLR types and their keyword aliases.
  • Split String divides a string into two at the caret position. You can also divide one string into three concatenated strings — just select the portion you want to break out before applying this refactoring.
  • Reorder Parameters changes method parameter order, without any dialogs to slow you down. The method signature and all references are updated. This is the fastest, most effortless way to reorder parameters.
  • Visual Studio's Rename refactoring is now accessible from the refactoring menu.
  • We have added the ability to sort Light Bulb menu items (refactorings and code providers) based on their most recent usage in the given context.
  • You can now optionally hide redundant Light Bulb menu items provided by Visual Studio if these features overlap more efficient CodeRush functionality. For example, if this option is selected, when CodeRush's "Declare Method" is available, Visual Studio's "Generate method stub" menu item will be hidden.

Test Runner

  • In this release, we are introducing beta support for .NET Core tests. Now you can run and debug .NET Core tests, created with NUnit, xUnit or MSTest frameworks.
  • Test Runner output in Visual Studio's Output window now shows the filter applied to the test run: CodeRush For Roslyn | DevExpress
  • You can now configure the Test Runner and Code Coverage items in the Visual Studio context menus to be visible or hidden.
  • Visual Studio's status bar now displays the currently running test .
  • Testing results in Visual Studio's Output window are now grouped by project . CodeRush For Roslyn | DevExpress
  • Tests can now be grouped by file path .
  • A number of minor usability issues were corrected/improved.

Other Improvements

  • We have completely redesigned the Code Cleanup options . Now it shows the code samples before and after cleanup, so you can more easily see what each option performs. CodeRush For Roslyn | DevExpress
  • Member Icons are now in vector format. This makes them look sharp and clear regardless of the color scheme, display resolution or code window scale. CodeRush For Roslyn | DevExpress
  • Images used in the Setup Wizard were redesigned to be more informative and look clearer. CodeRush For Roslyn | DevExpress

Resolved Issues

We've resolved several important issues for this release, including:

  • T403117 - Code Cleanup - options are duplicated after update on 16.1.5
  • T369994 - Code Cleanup - The "Make Properties Auto-Implemented" provider doesn't retain the "Readonly" modifier for declaration in VisualBasic
  • T410788 - Code Providers - Declare Providers - Improve identifier naming
  • T393597 - General - CRR should respect the project language version when using new language features
  • T395809 - General - The "Display Data in separate Window" button in Jump To List is too large on a High-DPI screen
  • T402400 - Naming Conventions - An additional rule for private fields should be _camelCase instead of _PascalCase
  • T395871 - References window - Incorrect filtering behavior
  • T403114 - Setup Wizard - Images overlap text on a custom screen scale factor
  • T407439 - Tab to Next Reference - Not working properly after importing settings from CodeRush Classic
  • T410391 - Templates - The TemplateExpand command should accept parameters
  • T407304 - Templates - CodeRush for Roslyn does not link property and field types when expanding XPO templates
  • T355996 - Test Runner - Cannot run tests with coverage on the "Machine.VSTestAdapter.Specs" project

What's New in v16.1.5

CodeRush for Roslyn (Preview)

This update includes the CodeRush for Roslyn Setup Wizard . This wizard will help new and existing users configure key CodeRush for Roslyn features. The Setup Wizard guides you through the following feature options:

  • Structural Highlighting
  • Numeric Keypad Bindings
  • Smart Semicolon
  • One-key Selection Embeddings
  • Code Template Expansion key
  • Drop Marker Before Jump
  • Escape Key Bypass (to collect Markers faster)
  • IntelliRush
CodeRush For Roslyn | DevExpress

Note that this update is expected to be our last free preview version. We plan to officially release CodeRush for Roslyn in the next update.

Resolved Issues

We've resolved several important issues for this release, including:

  • T391966 - Code Cleanup - "Apply 'this' qualifier style" works incorrectly with comments
  • T393146 - Code Cleanup - "Apply 'this' qualifier style" works incorrectly in property initializers
  • T394415 - Code Cleanup - Unnecessary indents are added each time code cleanup rules are applied
  • T394629 - Code Cleanup - XML doc comments are duplicated after applying code cleanup rules
  • T393698 - Code Cleanup - "Use nameof" - The "nameof" operator is incorrectly added to every string constant that matches a variable name
  • T399786 - Organize Members should be executed several times to remove all unnecessary line breaks
  • T399987 - Refactorings - "Convert to string interpolation" adds an unnecessary whitespace character at the end of the last parameter
  • T398028 - Refactorings - "Sort Namespace References" refactoring should respect Visual Studio's "Place System namespace references first" option
  • T398376 - Refactorings - The "Add to Interface" refactoring ignores type parameters
  • T391601 - Refactorings - The "Move Type to File" refactoring sometimes copies leading // comments
  • T384052 - Refactorings - The "Move Type to File" refactoring inserts an unnecessary empty line
  • T384053 - Refactorings - The "Move Type to File" refactoring does not copy a file's starting comment
  • T378497 - Refactorings - The "Move Type to File" refactoring keeps unnecessary whitespaces
  • T395815 - References Window - The default Light theme colors rather than customized Light-with-Dark-Editor colors should be applied to TreeList
  • T395308 - Templates - IntelliSense inserts an item on an attempt to expand the 'al.s' template
  • T398272 - Unit Testing - NUnit 3.4 integration doesn't work

What's New in v16.1.4

CodeRush for Roslyn (Preview)

Code Analysis

You can now configure the Code Issues window to display the Visual Studio code analysis results instantly without refreshing the list.

CodeRush For Roslyn | DevExpress

Spell Checker

The CodeRush Spell Checker is now integrated with the Code Analysis engine, with misspelled words appearing in the Code Issues window.

CodeRush For Roslyn | DevExpress

Target Picker

The Target Picker from CodeRush Classic is now part of CodeRush for Roslyn and integrated with the following code providers:

  • Create Event Trigger
  • Declare Constant
  • Declare Field
  • Declare Field with Initializer
  • Declare Local
  • Declare Method
  • Declare Property
  • Declare Property (auto-implemented)
  • Declare Property (with field)
  • Declare Property with Initializer

CodeRush For Roslyn | DevExpress

XAML Enhancements

  • Optimize namespace references refactoring now works with XAML code:
  • Templates for XAML are now shipping:

Navigation

  • Reference Window – You can now filter records by the type of reference to the symbol (reference read , reference write or instantiating ):
  • We have added the new Implemented API navigation provider. It shows all public members grouped by the base types and enables you to navigate to any public member.

New Refactorings and Code Providers

  • Declare Field/Property with Initializer – Generates a field of the appropriate type for the selected parameter.
  • Introduce Format Item – Creates a new String.Format item from a selected string part.
  • Move Initialization To Declaration – If the variable is declared and initialized in separate statements, this refactoring combines the two into a single statement.
  • Split Initialization From Declaration – If the variable is declared and initialized in the same statement, this refactoring breaks this statement into two lines (useful for conditional initialization, or when you want to widen the scope of the declaration).
  • Move Declaration Near Reference – Moves a local variable declaration at the caret to the closest point before its first usage.
  • Add to Interface – Adds a method to an interface implemented by the current class.
  • Add Missing Constructors – Adds the default constructor and all constructors specified by parent types to the current class.

Import/Export Settings

We have implemented the ability to import settings from CodeRush Classic, making it easier to migrate to CodeRush for Roslyn from previous versions of CodeRush easily. CodeRush For Roslyn | DevExpress

Resolved Issues

We've resolved several important issues for this release, including:

  • T392450 - Visual Studio crashes after entering the Code|Expansion group on the Shortcuts option page
  • T371900 - The Add and Remove buttons do not work on the IDE\UserInfo options page
  • T372478 - Test Runner should keep configured sessions after restarting Visual Studio
  • T368228 - Test Runner does not show names of xUnit test methods with more than three parameters
  • T378513 - Test Runner - NUnit 3 TestCaseSource attribute is not supported
  • T377018 - Test Runner - Adding tests to session doesn't respect the current filter
  • T373615 - Templates - The templates TreeList on the options page doesn't contain a context menu when it is empty
  • T371907 - System.ArgumentOutOfRangeExtension appears when editing an aspx file
  • T370692 - Smart Semi-colon works incorrectly if typed in a string
  • T371840 - Refactorings - The "Declare Constant" refactoring does not replace all occurrences in a file
  • T384203 - Refactorings - Move Type To File - Support the capability to return the caret to the source place after the feature was applied
  • T384558 - Refactorings - Implement IEquatable - A namespace reference is incorrectly added before the first comment after the feature is applied
  • T377409 - Refactorings - Contract.Requires - Provide the capability to use the "nameof" operator
  • T371823 - Refactorings - CodeRush for Roslyn - String.Format refactoring works incorrectly
  • T374402 - Refactorings - 'Add Parameter' adds a parameter twice in Visual Studio 2015 Update 2
  • T374575 - Refactorings - "Reverse Boolean" refactoring does not update usages when used on the Constructor parameter
  • T384247 - Refactorings - "Move Type To File" should preserve encoding for a new file
  • T384561 - Refactorings - "Implement IEquatable" should process the "Use 'this/qualifier for:'" option for fields correctly
  • T374044 - Organize Members - Redundant line breaks remain after applying
  • T370494 - Organize Members - Line breaks behavior inside regions should be improved
  • T298693 - Navigation - Tab to Next Reference interferes VS snippet expansion in js script blocks in cshtml files
  • T387145 - Debugger Visualizer is very slow when debugging code with string literals that contain many double-quotes or CR LF characters
  • T386368 - CodeRush deletes text when typing
  • T371453 - CodeRush conflicts with angular directives
  • T374208 - Code View - An incorrect background color is used for the "Light with Dark Editor" theme
  • T331633 - Code View - Structural Highlighting does not respect the dark color theme
  • T382266 - Code Templates - The "fmt" template expands to "String.Format" rather than to the lower case text "string.Format"
  • T384406 - Code Templates - Inserting a space after ? in "T?Foo" deletes the "T?" symbols
  • T372258 - Code Coverage shows the code tree in an unsorted manner

What's New in 1.0.11

CodeRush for Roslyn

Code Analysis

In this version we introduce the Code Issues window. The Code Issues window lists potential problems found in the code, and can optionally display Visual Studio code issues as well. Just click the Refresh button to analyze your code. If you have a large source code base, we encourage you to give this a try and see what you find. This version of CodeRush ships with some very interesting analyzers that may help you find and fix unintentional logic errors in your code. Let us know if you find this feature helpful.

CodeRush For Roslyn | DevExpress

Code Style

With the new Code Style feature, your code will be adjusted to the specified style automatically. Currently, you can configure the following aspects of code style:

  • Implicit/explicit declaration of local variables
  • Visibility modifiers (always specify or remove if possible)
  • Prefer CLR type name or language-specific keywords (e.g., int, string, bool)
  • Use this/me qualifier for members

CodeRush For Roslyn | DevExpress

Styles are applied automatically when executing refactorings or expanding CodeRush templates. We have also added the code cleanup providers linked with the code style rules.

  • Apply variable declaration style
  • Apply built-in type style
  • Apply 'this' qualifier style
  • Apply visibility style

Naming Conventions . These naming rules apply to new identifiers created with templates and code providers.

CodeRush For Roslyn | DevExpress

New Features for XAML

We have added two new navigation actions:

  • Go to Source – Enables you to open the resource dictionary file using the F12 key when the caret is on a reference.
  • Find Usages – Helps you quickly navigate to a resource reference.

CodeRush For Roslyn | DevExpress

Import/Export Settings

You can now export and import your CodeRush for Roslyn settings.

Unit Test Runner

The Test Runner window now supports Sessions . Now it is possible to create several test sets and run them independently. You can create a test session by clicking on the icon displayed for the Test and TestFixture attribute or by right-clicking on a node in the Test Runner window.

Decompiler

We have separated the Decompiler into a standalone executable. You can now use the Decompiler outside of Visual Studio. The executable is located in the " Decompiler" folder inside the CodeRush for Roslyn Extension folder. Tip: to find this folder quickly, from Visual Studio use the CodeRush | Support | Extension Folder... menu item.

Navigation

  • Symbol and File navigation windows appear empty after opening. They are populated with items after you start to type.
  • Visual improvements for Dark color theme
  • New loading indicator
CodeRush For Roslyn | DevExpress

Refactorings and Code Providers

We have added the following refactorings and code providers.

  • Convert to Constant – convers a variable or field into a constant.
  • Create Backing Store – converts an auto-implemented property to a property that encapsulates a private field (the field backing store is created automatically).

Organize Members now allows you to configure the amount of line breaks between groups and between members. In this release it is also possible to configure Organize Members so that it removes existing line breaks.

Debug Visualizer

  • The Expression Map has been ported from CodeRush Classic: CodeRush For Roslyn | DevExpress
  • Strings containing path to a file are now trimmed so that the beginning and end of the path are always visible.

IntelliRush

  • Constructor overloads are now visible: CodeRush For Roslyn | DevExpress
  • Argument insertion can now be disabled for methods created when you accept an IntelliRush suggestion.
  • Optional parameters are no longer inserted to method calls.

Other Improvements

  • The new Smart semi-colon feature. With this C# feature enabled, CodeRush for Roslyn places a semi-colon at the end of the expression when a semi-colon is manually typed inside an expression.
  • The CodeRush | menu is supplemented with the following items:
    • Support
      • CodeRush Logs (used to quickly open the logs folder in Windows Explorer)
      • Extension Folder (used to quickly open the root extension folder in Windows Explorer)
    • Shortcuts (opens the shortcuts options)
    • Code Templates (opens the code templates options page)
  • Code view sections in both the Decompiler and Code Coverage windows include line numbers .
  • Selection Embedding is now available from the “light bulb” menu, which can be invoked using the Ctrl+~ or Ctrl+ . hotkeys.
  • The languages supported by Code Templates and Selection Embeddings has been extended. You can now define custom code templates and embeddings for XAML, XML, HTML, JavaScript, CSS and F# languages.

Resolved Issues

We've resolved several important issues for this release, including:

  • T357476 - Code Templates - Unexpected template expansion in string interpolation
  • T363036 - Code Templates - VB template settings are absent after the update
  • T353330 - Code Templates - The "M" template expands to the non-static method in the static class
  • T358200 - Code Templates - Expanding the "if" template indents the line
  • T316600 - Decompiler - Local names are incorrectly mapped from a pdb file
  • T363882 - Decompiler - Incorrect visibility is generated for an overridden method
  • T362031 - Decompiler does not search for types by full name
  • T358985 - Organize Members wrongly sorts some fields
  • T358023 - Refactorings - The "Conditional to Case (Switch)" refactoring should not be available for non-constant expressions
  • T358785 - Refactorings - Several refactorings don't work for enums in VB
  • T358484 - Refactorings - The "Flatten Conditional" refactoring deletes comments from code
  • T287644 - Refactorings - The "Move Type to File" refactoring incorrectly works with the Shared Project
  • T354532 - Refactorings - The "Convert to auto-implemented property" refactoring is not available for read-only fields
  • T353340 - Refactorings - The "Rename namespace to match folder structure" refactoring produces bad code and breaks the build
  • T362933 - Refactorings - XAML - The "Import Type" refactoring is unavailable on the {x:Type} argument
  • T359141 - Refactorings - The 'Inline Method' refactoring incorrectly processes an argument expression with a cast expression
  • T366180 - Refactorings - The "Inline Temp" refactoring fails on specific code
  • T356621 - References window - The reference count is displayed on top of the namespace name
  • T353561 - Show Color is not working for a newly opened XAML file if this file does not have any changes
  • T367848 - Template Editor causing Unhandled exceptions when trying to view Visual Basic templates
  • T358138 - Unit Test Runner ignores the Nunit 3.2.0.0 tests
  • T355315 - Unit Test Runner gets blocked after running test cases
  • T354741 - Visual Studio is crashed when editing a CSHTML file

What's New in 1.0.10

CodeRush for Roslyn

Critical Issues fixed in 1.0.10

  • T353260 - CodeRush (Roslyn) causes Visual Studio to crash when working with XAML

What's New in 1.0.9

CodeRush for Roslyn

Enhancements and Updates

New features for XAML

We have added the following new features for XAML language support.

  • The Break Apart/LineUp Attributes refactoring – Collapses the attributes of a XAML tag into a single line or breaks them apart.
  • The Show Color feature now works in XAML markup.
  • The Import Type refactoring – Declares the necessary XAML namespace reference for an unresolved type.

CodeRush For Roslyn | DevExpress

Unit Test Runner

  • The Unit Test Runner now supports the most recent version of the NUnit testing framework – NUnit 3.0.
  • Test execution output is now displayed in a separate tab.
  • You can now filter what members appear in the Code Coverage window using the Search Box .

Navigation

  • The References window now has multiple tabs , allowing you to collect search results in new tabs without overwriting previous results.
  • If you're using CodeRush's Jump To feature, and you decide you want to visit more than one of the references found, you can click the References button in the upper right to open all those locations inside a new tab of the References window for later exploration:
  • The Drop Marker Before Jump feature has been ported from CodeRush Classic. You can now configure the marker to drop automatically before navigating away.
  • The Jump To navigation provider now lets you navigate to decompiled code .

Refactorings

  • Rename Namespace to Match Folder Structure – Renames the namespace according to the project default namespace and the path to the source code file in which the namespace is declared.
  • Convert to string interpolation improvements – This refactoring is now available everywhere Use String.Format is available and also at the Debug.Print, Console.Write, Console.WriteLine and the StringBuilder.AppendFormat method calls.

Diagnostics

In this release, we have added brand new code analysis diagnostics . These diagnostics will help you detect and correct possible code issues and code smells. You can add these diagnostics as an analyzer reference, or you can use a command line tool to run static analysis tasks on separate server. This release includes the following diagnostics:

  • Duplicate conditional
  • Exception missing throw
  • Expression contains redundant subsets
  • Expression is always the same
  • If -block matches else-block
  • Increase precision with built-in constant or call
  • Integral divide operation cast to float
  • Logical OR expression has opposite operands
  • Logical OR expression redundancy
  • Member always returns the same value
  • Method call's return value ignored
  • Next if -statement's body will never be reached
  • Null check follows usage
  • Redundant Sub-expressions in Binary Operation
  • String format item/argument mismatch
  • Subsequent else-if conditions are identical
  • Subsequent if -statements have identical conditions
  • Suspect assignment reversal
  • Suspect variable reference in For -loop condition
  • Suspect variable reference in For -loop iterator section
  • Suspect variable reference in null-check following as-cast
  • Ternary expression has identical branches
  • Unreachable conditional code block (else same)
  • Unreachable conditional code block (nested inverse)
  • Variable is assigned twice in succession

Other Improvements

  • We have added the new Debug Toolbar . It allows you to toggle the Debug Visualizer on and off, control execution while ignoring breakpoints, step into the member at the caret position, and toggle the temporary breakpoint.
  • We've made a number of improvements to the Debug Visualizer user interface to make values easier to read:
  • To improve discoverability of the Code Cleanup and Organize Members features, we have added the menu items for these features to the CodeRush | Edit menu and the Cleanup Document button to the CodeRush toolbar.
  • You can now initialize properties using the Smart Constructor feature (accessible when you expand the "cc" template).

Resolved Issues

We've resolved several important issues for this release, including:

  • T344265 - Code Cleanup - The use of the "Use explicit 'this' qualifier for fields" option adds "this" to references in statics fields
  • T334341 - Code Coverage doesn't take into account the [ExcludeFromCodeCoverage] attribute
  • T331702 - Code Templates - The =n template doesn't correctly expand in expressions
  • T334868 - Decompiler shows incomplete results
  • T334654 - File Navigation selects a wrong item on an attempt to type the filter text while the items are not yet collected
  • T347308 - Move Type To File incorrectly processes using statements controlled by the compile directive
  • T334278 - Navigation - Text in the filter is typed and removed with a delay
  • T346480 - Organize Members - The 'Delegates' group is placed at the incorrect position after being re-applied
  • T346478 - Organize Members incorrectly works with the surrounded region for a members group
  • T337066 - Symbol Navigation - Filtering - An item with a completely matching name is not selected
  • T332664 - Test Runner does not run MSpec tests
  • T336957 - Visual Studio freezes when a file with many types is being edited

What's New in 1.0.8

CodeRush for Roslyn

Enhancements and Updates

Paste as XAML/SVG

Starting with version 1.0.8, CodeRush for Roslyn enables you to easily to incorporate vector graphics into your applications, with the new "Paste as XAML" and "Paste as SVG" code providers. Simply copy a graphic selection from a vector editing tool (such as Microsoft Visio®, Microsoft PowerPoint®, or Adobe Illustrator®) and then paste that vector drawing inside your XAML, or an HTML file as SVG.

CodeRush For Roslyn | DevExpress

Quick File Navigation

Quick File Navigation is now faster and uses less memory.

Code Coverage

CodeRush for Roslyn can now collect coverage information for CoreCLR test cases in the DNX environment.

Decompiler

The CodeRush Decompiler can now search for symbols across multiple assemblies simultaneously. Search progress across for assembly is individually visualized.

CodeRush DecompilerCodeRush Decompiler

We have also improved decompilation routines. The CodeRush Decompiler now understands and builds code for:

  • Members explicitly implementing an interface
  • Constructor initializers
  • Events
  • Custom event accessors
  • Indexers

Resolved Issues

We've resolved several important issues for this release, including:

  • T306996 - Code Coverage - Cannot Run tests with coverage on a specific project
  • T316576 - Code Templates - Template expansions produce incorrect results when certain formatting settings are used in Visual Studio
  • T294771 - Code Templates - Visual Basic - If two Visual Studio instances are opened, the "Pretty Listing" option is turned off after expanding a template
  • T327738 - Code Templates - The "r" template expands unexpectedly
  • T326230 - Code Templates - The "n" template is mistakenly expanded in a string argument
  • T293948 - Code Templates - Cannot expand the 'c,' template when IntelliSense is active
  • T318310 - Code Templates - Certain CodeRush Classic custom templates do not work after being
  • T295962 - Code Templates - The "sw" template generates unnecessary case labels
  • T327360 - IntelliRush - Hierarchy - It is impossible to display only members defined in a static class
  • T315017 - Navigation - Cannot navigate to implementations from metadata
  • T297338 - Navigation - The "Base Types" and "Members" providers are not available on the declaration but are available on references for enums and delegates
  • T297337 - Navigation - Incorrect providers are available in xml-documentation comments
  • T297308 - Navigation - The "Implementations" provider is unavailable at the end of an identifier
  • T297418 - Navigation - The "Overloads" provider is available but should not
  • T297421 - Navigation - Overloads - Overloaded extension methods are not detected
  • T318855 - Options - TestRunner - Add the possibility to disable certain providers
  • T321628 - Options - Code file is edited when changing settings on the "Selection Embeddings" options page
  • T319831 - Refactorings - The "Add Parameter" refactoring should only use a class name when generating a parameter name
  • T330907 - Refactorings - The "Convert to string interpolation" refactoring produces incorrectly formatted code when applied to a method with wrapped arguments
  • T300606 - Refactorings - The "Optimize Namespace References" refactoring is available when it should not be
  • T324225 - Selection - The "Ctrl+W" shortcut no longer selects the #region directive
  • T321287 - Shortcuts - Pressing the "Alt+N" shortcut incorrectly enters the "N" symbol
  • T284942 - Show Color - Colors on the "Named" tab are not sorted
  • T284933 - Show Color - Named colors are replaced with Color.FromRgb(...)
  • T319489 - Symbol Navigation - Filter does not allow pasting from clipboard
  • T327422 - Unit Test Runner - Dead lock when clicking "Run Tests"
  • T320906 - Unit Test Runner - Visual Studio is crashed after reloading the projects
  • T325298 - Unit Test Runner - Test icons disappeared after performing the "Undo"
  • T327051 - Unit Test Runner - Visual Studio is crashed after applying the Rename refactoring on an enum member
  • T313424 - Unit Test Runner stops working if the solution configuration (e.g Debug -> Release) is changed
  • T310766 - Unit Test Runner - Can't debug failed MSpec tests
  • T325419 - Unit Test Runner - The System.NullReferenceException is thrown when running tests in Microsoft.Dnx projects

What's New in 1.0.7

CodeRush for Roslyn

Enhancements and Updates

Unit Test Runner

Starting with version 1.0.7, Unit Test Runner detects and runs unit tests for the MSTest framework. The Test Runner also runs CoreCLR test cases in the DNX environment.

CodeRush Unit Test Runner

Structural Highlighting

With this release we have implemented Structural Highlighting for C#, Visual Basic and XAML, so you can easily see the structure of your code.

CodeRush Structural Highlighting

Navigation Tools

Quick Navigation and Quick File Navigation are now ported to CodeRush for Roslyn, so you can quickly find symbols and files in your solution.

CodeRush Navigation Tools

Refactorings

Starting with version 1.0.7, the Refactorings Catalog options page is now available. This options page lists all refactorings and enables you to control the availability of each one.

CodeRush Refactorings

Code Cleanup

The Make properties auto-implemented code cleanup rule is now available.

Code Coverage

Now you can export code coverage statistics to XML, HMTL, and an NDepend-compatible format. CodeRush for Roslyn also now collects and presents coverage information for MSTest unit tests.

CodeRush Code Coverage

Decompiler

With this release, we have introduced new enhancements to the CodeRush Decompiler. Decompiled code structure more closely matches the original structure of the code before it was compiled, and the Decompiler now automatically names variables based on their usage or type. The following code structures are now supported:

  • for and foreach loops
  • using statements
  • auto-implemented properties
  • null-coalescing operators

Resolved Issues

We've resolved several important issues for this release, including:

  • T319031 - Error dialog is displayed in VS2015 Update 1 when the Shift+F2 key combination is pressed to display all references
  • T301084 - "Convert to String Interpolation" refactoring produces wrong result
  • T300432 - Test Runner does not run tests from the XUnit test fixture
  • T301494 - Test Runner does not detect newly written MSpec tests
  • T303635 - CodeRush for Roslyn ignores the "Enable native code debugging" project option
  • T287523 - Test Runner - Disable menu items to prevent execution of ignored tests
  • T301156 - EmbedParentheses is not invoked inside a string interpolation expression

What's New in 1.0.6

CodeRush for Roslyn

Decompiler

Starting with version 1.0.6, the CodeRush for Roslyn preview includes the Decompiler that reveals source code from compiled assemblies. Assembly structure is presented as a tree and you can drill into classes and their members, as well as navigate to base classes and derived classes.

CodeRush Decompiler

Unit Test Runner

  • The Unit Test Runner now shows test execution progress and summarizes test run results on Visual Studio’s status bar. Unit Test Runner in CodeRush for Roslyn 1.0.6
  • We have added the following Unit Test Runner actions, which you can bind to shortcuts for fast feature invocation:
    • UnitTestsRunCurrentClass - executes all tests inside the active type (at the caret). The default shortcut is Ctrl+T, C .
    • UnitTestsRunFile - executes all tests contained in the active file. The default shortcut is Ctrl+T, F .
    • ShowTestRunner - shows the Unit Test Runner window. The default shortcut is Ctrl+T, T .

Code Cleanup

With this release we have added the following cleanup rules:

  • Collapse Accessors
  • Expand Accessors
  • Remove redundant 'base' qualifier
  • Remove redundant 'this' qualifier
  • Remove redundant type cast
  • Use explicit 'this' qualifier for field access
  • Use explicit/implicit visibility modifiers

Member Icons

With this release we have added the ability to display member icons and control a member visibility using the member icon menu.

CodeRush Member Icons

Cycle Scope Up/Down

With this release, we have added an ability to change the scope of a class or a class member with a single keystroke. Press Alt+Up arrow or Alt+Down arrow to cycle through available visibilities (private, protected, internal, public, etc.) for the active member or type.

Selection Embedding

We have increased the number of available selection embeddings. Now you can embed selections inside parens.

Selection Embedding

Refactorings and Code Providers

  • We have added an options page for the Optimize Namespace References refactoring, which enables you to specify sorting type and order. This page also allows you to specify which references should be never removed.

    Namespace References
  • The Remove Unused Member refactoring removes empty and unused event handlers.

  • We have improved support for code providers declaring classes and members inside Visual Basic.

  • We have added the following new refactorings:

    • Collapse Property (C# only) - Collapses a property with backing store to a single line if its accessors are empty or contain a single one-line statement.
    • Collapse Accessor (C# only) - Collapses an accessor to a single line if it is empty or contains a single one-line statement.
    • Collapse Method (C# only) - Collapses a method to a single line if its body is empty or contains a single one-line statement.
    • Expand Property (C# only) - Expands a property, placing its getter and setter on separate lines.
    • Expand Accessor (C# only) - Expands an accessor placing its content on a separate line.
    • Expand Method (C# only) - Expands a single-line method placing its content on a separate line.
    • Rename File to Match Type - Renames the file (and updates the project), so the file name matches the type name.

  • We have added the following code providers:

    • Add Parameter (now available for Visual Basic).
    • Introduce Setter Guard Clause - Introduces a value-changed check at the start of a property setter, exiting early if the assigned value matches what is already in the backing store.
    • Declare Constant - Declares a constant for the primitive value at the caret.
    • Declare Method (now available for Visual Basic).

Navigation Providers

We have implemented the following navigation providers. You can invoke the Navigation menu using the Ctrl+Alt+N shortcut. The list of navigation targets supports filtering. You can type a part of the required identifier name, or use the camelcase filtering.

Navigation Providers
  • Implementations
  • Base Types
  • Derived Types
  • Overrides
  • Overloads
  • Declaration
  • Overridden Member
  • Parent Type
  • Members
  • Instantiations
  • Assignments

Resolved Issues

We've resolved several important issues for this release, including:

  • T285140 - "Run Tests" menu item should not be located at the top of the context menu
  • T295917 - Test Runner ignores the SetUpFixture attribute when running tests
  • T288765 - Templates should not be available in interpolated strings
  • T294234 - Smart Constructor - should insert new text near the caret position
  • T293675 - Templates - The 'If' template should be expanded to a single line if statement
  • T289047 - It is impossible to press Space after typing 'List(Of'
  • T289066 - Intellirush causes an exception on an attempt to browse the method definitions
  • T285617 - Scrollbar behavior is incorrect on the Templates option page
  • T272018 - Code cleanup can remove code in use
  • T285705 - Running tests with coverage throws InvalidProgramException
  • T285718 - Refactoring - 'Inline Method' throws an error when an inlined method reference locates in an expression-bodied function member

What's New in 1.0.5

CodeRush for Roslyn

Enhancements and Updates

Unit Test Runner

  • CodeRush now reveals test run progress over the Visual Studio icon on the Windows taskbar. Visual Studio icon on the Windows taskbar
  • The Test Runner test filter now reveals the full path to each test matching the filter you type, so you can easily find the test you are looking for even if you have tests with identical names in different test fixtures.

New Code Providers

  • Add Else Statement - Instantly adds an else block to a conditional statement.

  • Declare Interface - Generates an interface for the current type reference.

  • Declare Class, Declare Property and Declare property (with field) code providers are now available for Visual Basic.

Smart Constructor Enhancement

Smart Constructor now supports Visual Basic.

Resolved Issues

We've resolved over 200 issues for this release. Among them are the following:

  • T272252 - Visual Studio crashes with OutOfMemoryException when CodeRush is loaded
  • T268872 - Closing a solution hangs Visual Studio
  • T271619 - CodeRush throws an exception on code editing
  • T272198 - CodeRush throws an exception on code editing
  • T267397 - Toggling Comment/Uncomment freezes Visual Studio for a few seconds in case of files with a large size
  • T262724 - Declare Class causes a slowdown at the preview stage
  • T269088 - VS crashes after Rename is invoked in an active NavLink
  • T279401 - Visual Studio crashes on double clicking within Test Runner
  • T272018 - Test Runner works slowly in case of large files that contain tests
  • T269759 - Test Runner activates Solution Explorer when running tests
  • T272005 - TestRunnerExecutor still works in certain cases after all tests have ended
  • T272776 - Test Runner - xUnit tests are not recognized
  • T267919 - Code Coverage - It is impossible to stop the process when running tests with coverage
  • T276865 - ForEarch to Linq throws an exception
  • T270388 - Test Runner - Performance issue in an ASP.NET 5 application

What's New in 1.0.4

CodeRush for Roslyn

Enhancements and Updates

New Editor Features

  • Smart Copy/Cut - Places logical blocks of code into the clipboard in a single keystroke.
  • Smart Return - Generates a return statement in a few keystrokes.
  • Smart Constructor - Generates constructors that initialize properties contained in the current class.
  • Show Color - Marks each color identifier with the appropriate color sample to instantly show what the specified color looks like.

Refactorings and Code Providers

We have implemented the Sort Namespace References refactoring, which sorts namespace references in the namespace imports/using section.

The following C#6 and VB14 specific refactorings are also available now.

  • Use nameof - Replaces a string value with the appropriate nameof function call.
  • Use Expression Body (C# only) - Converts the active property or method into an expression-bodied member.
  • Convert to String Interpolation - Converts the active String.Format expression into an interpolated string.

We have added the following code providers.

  • Create Event Trigger - Generates an event trigger for the current event.
  • Add Getter - Adds a getter to a write-only property.
  • Add Setter - Adds a setter to a read-only property.

The Add Contract code provider is now available in Visual Basic projects.

Code Cleanup

We have added the Code Cleanup feature which analyzes the active source code file and applies selected refactorings as they are available. You can specify which refactorings should be applied during cleanup using the Editor | Code Cleanup options page.

Organize Members

The Member Organizer supports Visual Basic now.

Debug Visualizer

The Debug Visualizer supports Visual Basic now.

Unit Test Runner

Test execution is even faster. Now you can add new tests while other tests are running. And we added the ability to exclude tests from execution by category when performing the Run All command.

Code Coverage

You can now navigate from a member in the code to the appropriate Code Coverage tree node. Just right-click and select “Show Coverage”.

In addition, the active method is now highlighted in the Code Coverage code view window.

ForEach TextCommand

We have implemented the ForEach TextCommand, which can be used in a custom template to iterate over elements of your code and expand a specified template for each element. This TextCommand is already used in the " sw" and " asm" templates.

Resolved Issues

  • T256374 - UnitTestRunner - It is impossible to change the NUnit runner settings
  • T258675 - Templates - The "For" template is expanded inside comments
  • T255298 - Templates - INotifyPropertyChanged property templates are not expanded
  • T255041 - Templates - The 'pb' template is not expanded correctly in VB
  • T258677 - The "Throw exceptions" contract does not use the new "nameof" feature
  • T256974 - Shortcuts - Add an option to distinguish between 'AltGr' and 'Alt' keys
  • T258884 - CodeRush for Roslyn crashes on opening a solution
  • T253969 - CodeRush for Roslyn Preview - An error occurs when trying to use the "Add to Dictionary" code fix