Mark Miller
  • CodeRush for Roslyn Shortcut Cheat Sheet

    Just in time for the final release, here is your CodeRush for Roslyn Shortcut Cheat Sheet:


  • Code Snippets on Steroids + Jet Fuel

    CodeRush for Roslyn, 16.1 - Code Template Example

    CodeRush is well-known for its code templates, guided by a set of easy-to-learn rules for writing code quickly. In our port to Roslyn, we kept CodeRush’s unrivaled code template technology and worked to amp up developer efficiency everywhere we could.

    Code templates are like code snippets – they offer a shorter path between thought and actual code. They are like a compression mechanism for writing code. So your mind and your fingers do less work, and it takes less time to turn your ideas into working code.

    For example, let’s say we want to create a new public enum called “Vowels”, with five elements, “a”, “e”, “i”, “o”, and “u”. Something like this:

      public enum Vowels

    To create this by hand in C# it takes 11 keystrokes to enter those six names (“Vowels”, “a”, “e”, etc.) and another 27 keystrokes to create the syntax that makes it an enum:

    1. p
    2. u
    3. b
    4. l
    5. i
    6. c
    7. Space
    8. e
    9. n
    10. u
    11. m
    12. Space
    13. V
    14. o
    15. w
    16. e
    17. l
    18. s
    19. Enter
    20. Shift+
    21.          [    // for “{“ on a US keyboard
    22. Enter
    23. a
    24. ,
    25. Enter
    26. e
    27. ,
    28. Enter
    29. i
    30. ,
    31. Enter
    32. o
    33. ,
    34. Enter
    35. u
    36. Shift+
    37.          ]    // for “}“ on a US keyboard
    38. Enter

    We could use Visual Studio’s code snippets to improve our efficiency, saving 10 keystrokes. Nice. In this case it still takes 11 keystrokes to enter “Vowels”, “a”, “e”, etc., and another 17 keystrokes to create the code that makes it a syntactically correct enum:

    1. p         // wait for Intellisense to suggest “public” – if it doesn’t you have more typing
    2. Tab     // expands VS snippet
    3. Space
    4. e         // wait for Intellisense to suggest “enum” – if it doesn’t you have more typing
    5. Tab     // expand “enum”
    6. Tab     // expand enum snippet
    7. V
    8. o
    9. w
    10. e
    11. l
    12. s
    13. Enter  // moves caret into enum
    14. a
    15. ,
    16. Enter
    17. e
    18. ,
    19. Enter
    20. i
    21. ,
    22. Enter
    23. o
    24. ,
    25. Enter
    26. u
    27. Down Arrow
    28. Enter

    So using Visual Studio code snippets seems to improve the developer experience. We eliminate the need to hold the Shift key down when pressing the brace keys (simplifying our task and lowering cognitive load), but we’re still required to hit that comma key, which is small and requires more precision to hit (and is a more error prone key to hit) than the much larger Enter key, for example.

    Now compare the code snippet experience with CodeRush template expansion, which looks like this (11 keys to name the elements, plus 8 keys to create the syntax):

    1. e
    2. Tab      // …or Space, depending on your settings. Either way, this expands the public enum template instantly.
    3. V
    4. o
    5. w
    6. e
    7. l
    8. s
    9. Enter   // moves caret into enum
    10. a
    11. Enter   // comma added automatically
    12. e
    13. Enter   // comma added automatically
    14. i
    15. Enter   // comma added automatically
    16. o
    17. Enter   // comma added automatically
    18. u
    19. ;        // smart semicolon ends the enum declaration and moves the caret outside

    In all three approaches we are creating the exact same code. And each example demands a different level of developer effort.

    So for each of these approaches, the minimum number of keys needed to declare only the syntax (e.g., no element names) are summarized in the chart below:



    Using CodeRush’s “e” template to quickly create enums.

    Wrap Up & Benefits

    This gives you an idea of the kind of compression we’re talking about when you use CodeRush templates to write code syntax. In many of the CodeRush templates, including the enum template discussed here, we have achieved what we believe is the most optimally efficient way to write code. Fewest keystrokes. Lightest cognitive load.

    There are a number of reasons why you might want to be able to write more code with less work:

    • Your fingers do less work. Less strain over the course of a lifetime may increase the longevity of your hands.
    • Typing fewer keys means fewer opportunities to introduce mistakes. Fewer mistakes means less time wasted correcting.
    • You can write code faster. Useful when you’re pair programming, competing in a hackathon, or presenting/coding live in front of your team or an audience.
    • Writing code faster also shortens the feedback loop between idea and realization, which can lead to a higher quality design.
    • The more experience you get writing code, the better you get. If you write more code in less time, your experience will come at a faster rate.

    If you’re already using Visual Studio snippets, that’s a good sign. It shows you value getting more done with less effort.

    Note that CodeRush templates tend to be more than twice as efficient as Visual Studio’s snippets. So if efficiency, longevity or coding speed is important to you – and you’re not using CodeRush templates – you might want to take a closer look.

    Speaking of closer looks, Paul Usher has a CodeRush for Roslyn webinar on 2 August 2016. Check it out.

  • CodeRush for Roslyn Webinar

    A shiny new CodeRush for Roslyn release is imminent. It’s fast, lightweight, and feature-rich.

    Check out what’s new, get a tour, and see how easy it is to get started with the new setup wizard.

    See how you can increase developer productivity and efficiency. Get more done in less time, with fewer keystrokes a lower cognitive load.

    Click the button below to register:

    1:00 PM
    Your time zone: GMT -4
    Other time zones
  • CodeRush for Roslyn (Preview), version 16.1.5

    We’re releasing this preview of CodeRush for Roslyn (CRR) a few weeks early, because we want to get feedback on a new configuration feature before we release. It’s the CodeRush Setup Wizard, and it’s available when you first start CodeRush.

    The Setup wizard guides you through important CodeRush configuration choices, and looks like this:


    Each page has a Learn More link, which takes you to a video talking about the options on that page of the setup wizard.

    Running the setup wizard is optional, however we highly recommend it, even for experienced CodeRush developers, especially if you’re interested in optimizing your coding efficiency (e.g., getting more code with fewer keystrokes).

    You can bring up the Setup Wizard from the CodeRush menu.

    The CodeRush for Roslyn preview is available on the Visual Studio Gallery. Try it and let us know what you think.

  • CodeRush for Roslyn (Preview), version 16.1.4

    First, a quick update on where we are and how we got here: About a year ago I announced that the CodeRush team had been working on a new project, CodeRush for Roslyn. A new version of CodeRush that relied upon the Roslyn engine instead of our own parser. The architectural shift yielded two primary benefits:

    • Significantly Faster Performance:


    • Significantly Lower Memory Use:


    And developers are reporting similar results on twitter:


    In the last year we’ve ported hundreds of features from CodeRush Classic, maintaining our focus and priority on faster performance and low memory use. During this time CodeRush for Roslyn (Preview) has been available as a free download from the Visual Studio Gallery, and we received valuable feedback from our customers. Thank you for that.

    In this release, version 16.1.4, we get a step closer to the first official release. In July we expect to make one more preview available, and shortly after that we expect to ship.

    Here are the new features in 16.1.4 (Preview):

    Target Picker

    Now you can quickly select the target location for new methods, events, properties, fields, and constants. Just press the up and down arrows to move the target picker up and down, and press Enter to declare at the specified location.


    Reference Filtering

    The Reference window now lets you optionally filter results by usage - Read, Write, or Instantiation:


    Jump to Implementation

    Now you can jump to the implementation of ancestor overrides and implemented interfaces, available through the “Implemented API” option in the Jump To menu:


    XAML Enhancements

    • The Optimize Namespace References refactoring is now available for XAML namespaces:

    • Templates for XAML are now shipping:


    New Refactorings and Code Providers

    • Add Missing Constructors – Adds the default constructor and all constructors specified by parent types to the current class.
    • Add to Interface – Adds a member to an interface that is already implemented by the current class.
    • 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 Declaration Near Reference – Moves a local variable declaration to the line of code that is closest to its first usage.
    • Move Initialization to Declaration – Combines separate variable declaration and initialization statements into a single statement.
    • Split Initialization From Declaration – Separates a single-statement variable declaration and initialization into two separate declaration and initialization statements. This refactoring is useful for conditional initialization, or when you want to widen the scope of the declaration.

    Other Improvements

    • The Code Issues window can now show Visual Studio code analysis results instantly without refreshing the list.
    • The Spell Checker now reports misspelled words in the Code Issues window.
    • You can now export your Roslyn settings and import settings from CodeRush Classic using the CodeRush | Support | Import and Export Settings… command.

    Try it Yourself

    Give CodeRush for Roslyn (Preview) a try. The preview edition is free. Let us know what you think, and what we can do to make the experience better.

  • CodeRush for Roslyn 1.0.11 (preview) is Available

    As we’re in the final stretch for the first official CodeRush for Roslyn release, today we offer what may be our final pre-release for you to test-drive. Here’s what’s new and improved in this version:

    Code Analysis

    In this version we introduce code analysis through the Code Issues window, showing potential logic errors and code smells found in the code. Just open your solution, bring up the Code Issues window, and click Refresh to analyze your code.


    Code Style

    Code Style gets an update with new options for:

    • 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 linked the following code cleanup providers to the code style rules:

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

    And we’ve added new naming conventions for newly-declared identifiers.

    XAML Navigation

    Two new XAML navigation providers:

    • Go to Source – Opens the resource dictionary for the active reference when you press F12.
    • Find Usages – Helps you quickly navigate to a particular resource reference.



    Settings Import/Export

    In this version you can import/export your CodeRush for Roslyn settings.

    Test Sessions

    The Test Runner now supports multiple test sessions:

    Test Sessions

    This is a convenient way to group collections of related tests and run them independently. Just right-click on one of the test or fixture icons in the tree list and choose “Add to session”.


    Standalone Decompiler

    The Decompiler is now its own standalone executable, which means you can use the Decompiler outside of Visual Studio. The executable is located in the "Decompiler" folder inside the CodeRush for Roslyn Extension folder (which typically has a uniquely generated folder name). To find this folder quickly, from Visual Studio use the CodeRush | Support | Extension Folder... menu item.



    Symbol and File navigation windows are more responsive. When they appear start typing for what you are looking for and they’ll populate with entries matching your filter.

    The navigation windows also include a few minor visual tweaks to improve clarity.


    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:

    Also, strings containing long file paths are now trimmed so that the beginning and end of the path are always visible.


    • Argument insertion can now be disabled for method calls created by IntelliRush.
    • Optional parameters are no longer inserted into method calls.
    • Constructor overloads are now listed in the IntelliRush overloads menu:


    Smart Semi-colon

    It’s finally here. The feature that gives C# developers the smallest gain, hundreds of times a day. With this C# feature enabled, CodeRush for Roslyn automatically places a semi-colon at the end of the expression when a semi-colon is manually typed inside an expression.

    Other Improvements

    • 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.
    • The CodeRush menu gains 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 page)
      • Code Templates (opens the code templates options page)

    Give it a Try

    Download the latest CodeRush for Roslyn preview from the Visual Studio Gallery. Try it out and let us know what you think.

  • CodeRush for Roslyn Update – 1.0.10

    Today we discovered an important crash bug in CodeRush for Roslyn 1.0.9 that results in a stack overflow when editing XAML files when the Show Color feature is enabled (Show Color is disabled by default in version 1.0.9, so this crash bug will only affect you if you’ve turned the feature on and are editing XAML files).

    We have updated CodeRush for Roslyn on the Visual Studio Gallery to 1.0.10 which includes a fix for this issue.

    If you’re using CodeRush for Roslyn 1.0.9 we strongly recommend you upgrade to the latest version.

  • CodeRush for Roslyn 1.0.9 (preview) is Available

    In this release, we’ve added XAML features and improved the Test Runner, Code Coverage, Debug Visualizer, Navigation and Refactorings. You can get the latest CodeRush for Roslyn on the Visual Studio Gallery. The preview is free until we release, currently expected by the summer of 2016. Details on the new features are below.

    Unit Test Runner

    The CodeRush Unit Test Runner now supports NUnit 3.0 framework, and test execution output is now displayed in the Console output tab:


    Code Coverage

    Code Coverage lets you filter displayed members using the Search Box:



    Four new features here. The References window now supports multiple tabs. Want to find all references for the symbol at the caret? Just click the green plus button to create a new tab and instantly fill it with all the references to the symbol.


    The second neat feature is improved interaction with CodeRush’s Jump To feature. Typically you use the Jump To feature to quickly find and get to a single location of interest. But what if you want to visit multiple locations across your session? Just press Ctrl+P to pin the results in the References window, or click the References button from the Jump To window, like this:


    This will instantly create and populate a new tab in the References window, filled with all the locations found by Jump To. Now these locations are in a single place and persist until you close the tab or close Visual Studio.

    The third new feature modifies the Jump To feature, allowing you to drill into decompiled code:


    And the fourth new navigation feature we’ve added is to bring CodeRush Classic’s Drop Marker Before Jump feature, which drops a marker automatically before you go away using the Visual Studio Edit.GoToDefinition command. This makes it easy to return to where you were (just press Escape to get back).

    XAML Language Support

    We’ve ported four XAML features over from CodeRush Classic: Break Apart Attributes, Line Up Attributes, Show Color (for showing and changing color references in XAML), and Import Type (to declare XAML namespace references for unresolved types).


    New Refactorings

    CodeRush for Roslyn adds a new refactoring: Rename Namespace to Match Folder Structure, which renames the namespace according to the project default namespace and the path to the source code file.

    And we improved Convert to String Interpolation. This refactoring is now available everywhere Use String.Format is, and is also aware of string formatting in calls to Debug.Print, Console.Write, Console.WriteLine and the StringBuilder.AppendFormat.

    Debug Visualizer

    We’ve added the Debug Toolbar, which lets you turn the Debug Visualizer on and off, control execution while ignoring breakpoints, step into the member at the caret position, and toggle temporary breakpoints.


    And we’ve improved the Debug Visualizer user interface to make preview expressions easier to read. In the two identical code samples below, you can see the UI from earlier versions (on top) compared to the improved version of the UI (below):


    Other Minor Improvements

    • Smart Constructor Template now allows you to initialize properties.
    • Code Cleanup and Organize Members features are now available from the CodeRush | Edit menu. 


    As always, we’re interested to know what you think. Download the latest version of CodeRush for Roslyn and give it a try. Thanks for your support and feedback.

  • 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:

1 2
4 5 6 7 8 9 10

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners