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.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