CodeRush for Roslyn 1.0.8 (preview) is Available

Team CodeRush continues its 45-day sprint cycles with today’s release of CodeRush for Roslyn 1.0.8. We’ve fixed bugs, improved performance, and reduced memory consumption. New features include:

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 inside an HTML file as SVG.


Code Coverage

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


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


We have also improved the decompilation logic to produce code that is even easier to read. The CodeRush Decompiler now understands and builds code for:

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

Quick File Navigation

Quick File Navigation is now faster and uses less memory.

Try CodeRush for Roslyn Now

You can download the current preview version of CodeRush for Roslyn from the Visual Studio Gallery. Let us know what you think.

What’s New in CodeRush for Roslyn (preview) 1.0.7

CodeRush for Roslyn (preview) v1.0.7 is now available on the Visual Studio gallery.

Here’s an overview of new and improved functionality in CodeRush for Roslyn (CRR):

Unit Test Runner

The Unit Test Runner now detects and runs unit tests for the MSTest framework. The Test Runner also runs CoreCLR test cases in the DNX environment.

Structural Highlighting

This release includes Structural Highlighting support for C#, Visual Basic and XAML. Structural Highlighting helps you easily see the structure of your code.

Navigation Tools

The Quick Nav and Quick File Nav features have been ported to CodeRush for Roslyn, so you can quickly find symbols and files throughout your solution.


The Refactorings Catalog options page is now available. This options page lists all refactorings and enables you to control the availability of each refactoring.

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.


Decompiled code structure now 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.

Additionally, the following code structures are now supported:

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

Give it a Try

As always, you are encouraged to download the CodeRush for Roslyn preview and give it a try.

Side note: One of the new CodeRush 15.2 features, Paste as XAML/SVG, did not make it into the CodeRush for Roslyn v1.0.7 release due to tight development constraints. Our intention is to release this feature in the next CodeRush for Roslyn update, v1.0.8.

Earlier blog posts on CodeRush for Roslyn:

What’s New in CodeRush Classic 15.2

CodeRush Classic (CRC) gets two new features in 15.2.

Note that most of our development effort is currently directed toward CodeRush for Roslyn (CRR) which is driven by 45-day sprints between releases. We’ll talk about new features in CodeRush for Roslyn as those releases become available.

In CodeRush Classic, we’ve found clever ways to improve the speed of Quick Nav, making it significantly more responsive.

Also, CodeRush Classic gets two new features in this release:

Code Coverage

CodeRush classic gets Code Coverage, which tells you how much of your application is covered by test cases, which can be one indicator of overall code quality. This feature is also useful when maintaining code – you can get a clear picture of how safe it is to change methods or even individual lines of code. If the code you want to change is covered by test cases, it is safer to change that code (because the test cases covering the code you want to change increase the chances you’ll know immediately if you unintentionally break something).

To see Code Coverage, you need to first run your tests from the CodeRush Unit Test Runner using one of the two orange test tube icons at the top:


These icons run your tests so CodeRush watches for coverage.

The orange test tube button with only a single green triangle ( RunSelectedTests ) shows coverage provided by only the selected tests.

The orange test tube button with two green triangles ( RunAllTests  ) shows coverage provided by all your tests.

Regardless of which button you press, after the test run is complete, CodeRush reports the results in the Code Coverage window, which looks like this:


The Code Coverage window provides a hierarchical view of the projects in your solution, and shows the code coverage results for each member, type, namespace or project. Results are summarized in the percent graphs on the right, showing the lines of code covered over the total lines of code.

The Code Coverage window optionally shows you a code preview in a separate pane, shown in the screenshot above. Code highlighted in green is covered – that means at least one of the test cases resulted in that line of code being executed. Code with a gray background is not covered by the tests that were run.

You can bring a method of interest to focus inside the Visual Studio editor by right-clicking that node in the tree view and choosing “Go to Method”.

Paste as Xaml/Svg

This is one of the more interesting features we’ve introduced in some time, and it’s for developers who are creating applications and web sites that need scalable graphics. Up until now, creating vector graphics for your applications has been relatively painful, especially if your team lacks a dedicated graphic designer. Existing vector graphic editors are either functionally weak or they require a sequence of tedious export/import steps to get those vector graphics from the graphic editor into Visual Studio.

CodeRush Classic 15.2 solves this challenge rather elegantly, with the new Paste as Xaml/Svg code providers. Just design or open the graphic in your vector editor of choice (Microsoft® Visio, Microsoft® PowerPoint, Adobe® Illustrator, etc.), copy it to the clipboard, and then paste the graphic inside Visual Studio (inside a XAML file or an HTML file using Ctrl+V or Shift+Insert). CodeRush will convert the vector data on the clipboard into XAML or SVG automatically. You can also press the CodeRush key to bring up the CodeRush menu and choose Paste as Xaml or Paste as SVG.

To be clear, here are the steps:

1. Create or open your vector shape in the vector editor of your choice: 
For example, I used PowerPoint to create the gear shown above by forming a union with four rounded rectangles and a circle, and then subtracting a circular hole from the center (you can create this custom shape in PowerPoint in about 45 seconds – it’s that easy).

2. Copy your custom shape to the clipboard.

3. Paste into the XAML code or into an HTML file inside Visual Studio:


Of course, you can adjust properties after the paste, such as height/width, fill, stroke, etc.

Here’s the same gear that I created in PowerPoint pasted inside Visual Studio as SVG (and then copied and pasted here into this post):

<svg height="352px" width="351px" viewBox="0 0 351 352">
linearGradient id="gradient0" y2="0%" x2="100%" y1="0%" x1="0%">
stop style="stop-color: #2e75b6; stop-opacity: 0.5" offset="0%" />
      <stop style="stop-color: #2e75b6; stop-opacity: 0.5" offset="100%" />
path d="M173,85.0625C124.3125,85.0625,84.8125,124.6875,84.8125,173.5C84.8125,222.375,124.3125,262,173,262
    C221.75,262,261.25,222.375,261.25,173.5C261.25,124.6875,221.75,85.0625,173,85.0625z M153.6875,0L192.375,0
    C197.6875,0,202,4.375,202,9.75L202,33.5625 205.1875,34.0625C219.5,37,233.0625,42,245.5,48.8125
    L252.3125,52.9375 268,37.125C269.9375,35.25,272.375,34.3125,274.875,34.3125
    78.25L294.75,92.5625 297.125,95.8125C305.0625,107.5625,311.3125,120.5,315.5625,134.25L318.1875,
    144.4375 336.375,144.4375C341.6875,144.4375,346,148.8125,346,154.125L346,192.9375C346,198.25,
    341.6875,202.625,336.375,202.625L319.9375,202.625 319.1875,207.5625C316.25,221.9375,311.25,235.5,
    304.5,248L298.375,258.125 309,268.8125C312.8125,272.5625,312.8125,278.75,309,282.5L281.6875,309.9375
    C277.9375,313.6875,271.8125,313.6875,268,309.9375L257.75,299.625 257.5625,299.75C242,310.3125,
    224.3125,317.9375,205.1875,321.875L202,322.375 202,337.3125C202,342.6875,197.6875,347,192.375,347
    L153.6875,347C148.375,347,144.0625,342.6875,144.0625,337.3125L144.0625,321.3125 132.125,318.25
    C118.375,313.9375,105.5,307.6875,93.8125,299.75L90.5625,297.3125 78.0625,309.9375C74.25,313.6875,
    46.875,248C40.125,235.5,35.125,221.9375,32.1875,207.5625L31.4375,202.625 9.6875,202.625C4.375,
    35.8125,134.25C40.0625,120.5,46.3125,107.5625,54.25,95.8125L54.375,95.625 37.0625,78.25C33.25,74.5,
    34.3125,76.125,35.25,78.0625,37.125L95.8125,54.9375 105.875,48.8125C114.1875,44.25,122.9375,40.5,
    132.125,37.6875L144.0625,34.625 144.0625,9.75C144.0625,4.375,148.375,0,153.6875,0z"
    fill="url(#gradient0)" stroke-width="1" stroke="#1F4E79" />

If you would like to see how this SVG renders in your browser (with an added animated spin), click here.

So now it’s easy to create your own custom vector graphics and use them inside your XAML applications and web sites.

As always, let us know what you think.

CodeRush for Roslyn, v1.0.6

CodeRush for Roslyn v1.0.6 is ready for download. Here’s what’s new in this version:

  • The Decompiler is now included in CodeRush for Roslyn v1.0.6. Assembly structure, from namespace all the way down to class members, appears in the tree view on the left, while source code for the selected node appears in a pane on the right.


  • The Unit Test Runner shows test execution progress and summarizes test run results on Visual Studio’s status bar.
  • New test runner actions (which can be bound to shortcuts for fast invocation):

Command Behavior Default Shortcut
UnitTestsRunCurrentClass Executes all tests inside the active type (at the caret) Ctrl+T, C
UnitTestsRunFile Executes all tests contained in the active file Ctrl+T, F
ShowTestRunner Shows the Unit Test Runner window Ctrl+T, T

    • New Code 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 – select member scope.

    • Cycle Scope (member/type visibility) Up/Down with Alt+Up/Down
    • New Selection Embeddings wrap the selected expression inside parens when you press one of the paren keys. Enable these bindings if you want this feature:


      Also, if you work with a non-U.S. keyboard, check the bindings and redefine them if needed to correspond with the keys you press for the left and right parentheses, and the “!” character.

    • New for Refactorings and Code Providers:
      • Declare Constant - declares a constant for the primitive value at the caret.
      • 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.
      • Optimize Namespace References gets a new options page, letting you specify sorting options. You can also use this page to specify which references should be never removed even when they aren’t used.

      • Rename File to Match Type - renames the file (and updates the project), so the file name matches the type name.
      • Remove Unused Member - removes empty and unused event handlers.
      • Now available for Visual Basic:
        • Improved support for code providers declaring classes and members.
        • Add Parameter
        • Declare Method
      • New refactorings for C#:
        • Collapse Property - collapses a property with backing store to a single line if its accessors are empty or contain a single one-line statement.
        • Collapse Accessor - Collapses an accessor to a single line if it is empty or contains a single one-line statement.
        • Collapse Method - collapses a method to a single line if its body is empty or contains a single one-line statement.
        • Expand Property - expands a property, placing its getter and setter on separate lines.
        • Expand Accessor - expands an accessor placing its content on a separate line.
        • Expand Method - expands a single-line method placing its content on a separate line.


    • Navigation Providers, accessible by pressing Ctrl+Alt+N:
      • Assignments
      • Base Types
      • Declaration
      • Derived Types
      • Implementations
      • Instantiations
      • Members
      • Overloads
      • Overridden Member
      • Overrides
      • Parent Type


    The CodeRush for Roslyn preview is free, and updated every 45 days.

    As usual, please download, give it a try – and let us know how we can make it better (

    CodeRush for Roslyn, v1.0.5

    The CodeRush team, continuing its 45-day or less release pace, is ready to bring you the latest update to CodeRush for Roslyn, version 1.0.5.

    Our previous release, CodeRush for Roslyn v1.0.4, included new refactorings, code providers, text commands, and test runner and code coverage support. You can download the latest version of CodeRush for Roslyn from the Visual Studio Gallery.

    Zero Bug Policy

    The team has a zero-bug policy, which essentially means we resolve all reported issues before we write new features. And so in this release, v1.0.5, we’ve prioritized quality and performance over new/ported functionality, resolving over 200 issues, including:

    • Templates:
      • Expansions in split views
      • Corrected context to prevent unintended expansions inside XML doc comments and interpolated strings
      • Corrected a number of template expansion issues in Visual Basic
    • Exceptions when editing code
    • Performance issues:
      • Toggle Comment
      • Test Runner in large files with a huge number of test cases
    • An edge case out-of-memory exception
    • Edge case deadlocks on solution open/close and Test Runner build
    • Edge case crashes (when rename is invoked in navigation link, or when double-clicking tests in the Test Runner)

    Other feature areas receiving improvements in this release:

    • Code Cleanup
    • Code Coverage
    • Code Providers
    • IntelliRush
    • Linked Identifiers
    • Refactorings
    • References tool window
    • Shortcuts
    • Tab to Next Reference
    • Text Fields
    • Test Runner

    We also added hundreds of test cases to help ensure these issues never appear again.

    New in v1.0.5:

    We added the following new features in v1.0.5:

    • CodeRush now updates test run progress on the Windows taskbar.

    • The Test Runner filter now shows the full path to each test, so you can easily find the test you are looking for even if you have tests with identical names in different test fixtures.
    • We added the "Add Else Statement" and “Declare Interface” code providers.
    • Smart Constructor, Declare Class, Declare Property, and Declare Property (with field) are now available for Visual Basic developers.

    Give it a Try

    Give the 1.0.5 version a try and let us know what you think. You can download CodeRush for Roslyn from the Visual Studio Gallery.

    More Posts