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 = b → b = a)
-
Boolean literals (true → false)
-
Addition/substraction assignments (a += b → a -= b)
-
Equality operators (== → !=)
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...
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.
Click this counter to open the Feature Advisor window to learn more about the new CodeRush features that can help.
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.
Code Formatting
We have added new options to Format statements and blocks after pressing the } and ; keys.
Unit Testing
You can now select and copy text from the Test Runner's Results section.
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.
Member Organization
We have added an option to add an empty line above and below all members organized by 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:
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.
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:
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:
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:
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:
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)...
Press Shift + Enter ...
And now enter the new text for the label: " Installation".
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:
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:
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.
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.
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.
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.
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.
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.
You can apply these Code Styles with the Code Cleanup feature.
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.
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.
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... .
After selecting Use Type in Templates... , CodeRush asks for the shortcut to use for the type.
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.
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.
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.
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 .
Excessive Line Breaks Removal.
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.
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.
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:
Code Cleanup
We have added the ability to remove unused assembly references from your projects, accessible through the project's right-click context menu:
Selecting this command will bring up a confirmation window where you can select which references to remove (from the list of unused references).
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 .
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:
New Features for XAML
We have added an ability to normalize whitespace inside XML comments.
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.
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:
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.
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.
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:
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.
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.
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.
Code Analysis - Unused Members
We have added a new analyzer that detects unused members .
You can also configure the highlighting of such members in the code editor ( Editor | All Languages | Static Code Analysis | Highlight unused members ).
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.
While the project is cleaned, a progress window is displayed.
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
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.
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.
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.
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.
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.
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.
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.
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.
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 .
Jump To File and Jump To Symbol windows can now display Recently Opened Items .
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 .
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.
Navigation
New Refactorings and Code Providers
Implement IDisposable makes it easy to implement the dispose pattern in your types.
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.
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.
Smart Duplicate Line now supports the new language features, including binary literals and digit separators.
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.
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.
C# 7 Syntax Support
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 .
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.
Other Improvements
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.
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.
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.
Visualization Tools
Other improvements
You can now highlight errors and warnings in the Output window , making it easier to recognize important messages faster.
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).
-
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.
-
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.
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.
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 .
-
The hex, octal, float, double , and decimal literals are now automatically incremented.
-
Duplicate Line recognizes camel case parts of an identifier name and create links between similar parts of different identifiers.
-
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).
-
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.
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
-
Import All Types code provider – declares all namespace references used in the XAML file.
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.
-
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
Navigation
The new Jump to Everything navigation provider allows you to jump to any file and symbol in the solution.
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:
-
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 .
-
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.
-
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.
-
Images used in the Setup Wizard were redesigned to be more informative and look clearer.
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
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.
Spell Checker
The CodeRush Spell Checker is now integrated with the Code Analysis engine, with misspelled words appearing in the Code Issues window.
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
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.
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.
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
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.
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.
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
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:
- 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:
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
Unit Test Runner
-
The Unit Test Runner now shows test execution progress and summarizes test run results on Visual Studio’s status bar.
-
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.
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.
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.
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.
- 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.
-
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