ReSharper 7: What’s Inside

As of now, pretty much everyone knows that ReSharper 7 will be supporting Visual Studio 2012 — in fact, ReSharper 7 EAP works with Visual Studio 2012 RC and VS11 Beta right now.

Apart from that however not much is known about ReSharper 7, meaning that it’s time to shed the light on the new version of the tool. The following list describes what’s inside ReSharper 7 (aside from VS 2012 support), and you can expect us to follow up with more details on most of the feature set items.

  • Windows 8 and WinRT development. ReSharper 7 provides extensive tooling to support developers targeting the new Microsoft operating system and runtime. For example, the new version provides code inspections and quick-fixes that ease transition to the new environment, such as those highlighting WinRT types that should be sealed or those that can’t be generic; support for projected types and new types of resources in XAML, as well as type, naming, and method projection support for JavaScript.
  • New refactorings: specifically, the intensely requested Extract Class refactoring to split cumbersome classes into single-responsibility classes, and Transform Out Parameters to Tuple refactoring for functional style supporters.
  • Members Hierarchy. ReSharper’s existing Type Hierarchy feature has been extended to support a common code exploration case: invoking it on a polymorphic member now shows type hierarchy which emphasizes in which types this member has or has not been implemented.
  • CSS Style Hierarchy. This is yet another example of Type Hierarchy extensibility, this time for web developers: You can now take a bird’s-eye view on chains of nested CSS selectors and try make sense of them. Note that current builds of ReSharper might not have this feature included but it’s going to be there come release time.
  • INotifyPropertyChanged support pack. ReSharper 7 introduces code inspections, context actions, code completion, and code generation helpers for those working with INotifyPropertyChanged interface, whether it’s a WPF, Silverlight, or third-party implementation.
  • Generate menu improvements. One of the key ReSharper coding accelerators available via Alt+Ins has received an update that comprises new actions to generate partial methods and equality comparers, enhancements to Generate Equality Members, and a fair share of INotifyPropertyChanged support.
  • Multi-level Alt+Enter menu. The pop-up menu that you see when you press Alt+Enter has been extended to hide items that are less relevant. For instance, it makes a huge difference in numerous Create from Usage scenarios when you instantly see the action that you’re most probably going to invoke, and other possible actions are hidden on the second menu level.
  • New code inspections and quick-fixes. In addition to extensive sets of WinRT-specific code inspections for C# and VB.NET, as well as those related to INotifyPropertyChanged usage, ReSharper 7 improves its code analysis in other areas. For example, new code inspections related to explicit interface implementation, optional arguments, C# 5 Caller Info attributes, JavaScript properties, and the usage of My namespace in VB.NET are introduced.
  • Contract annotations. One further improvement to the code analysis subsystem is the introduction of contract annotations that allow defining dependencies between method arguments and return values. Using this kind of annotations enables ReSharper to detect unreachable code and other control flow deficiencies.
  • Find Usages that works everywhere. With an exception of master pages and user controls in web projects, previous versions of ReSharper didn’t allow applying Find Usages to files or larger project items. ReSharper 7 makes it possible to search for usages of files, project items or arbitrary selections of project items in Solution Explorer. For example, you can select a project folder, invoke Find Usages, and make it show usages of all non-private types and type members in this project folder that are external to that scope.
  • Remove Unused References that is now working solution-wide. ReSharper provides several ways to get rid of redundant project references since version 6.1 but 7.0 takes it to another level, making it easy to just quickly drop all unused references in your entire solution.

    Not only can you invoke Remove Unused References exactly once on a solution level but if you can also make it run on an arbitrary set of project items containing references: for example, on a project folder, or a mixed selection of projects and project folders.
  • Improved naming style configuration. Naming style settings in ReSharper are becoming more flexible, particularly due to the introduction of predefined naming styles that allow using lowerCamelCase_WithUnderscores, UpperCamelCase_WithUnderscores and similar mixed styles that are common among unit testing practitioners.
  • Completion commit settings. Following feedback from Visual Studio’s own code completion users, we’ve introduced an options page called Completion Characters that lets you set whether you want ReSharper to commit a selected completion item on pressing Space, or prevent it from committing on certain characters that you can define. Visual Studio’s own language-specific completion options are also taken into account.
  • Unit testing improvements include support for Jasmine, PhantomJS (which works both with Jasmine and QUnit), NUnit TestCaseSource attribute support, and NUnit 2.6 introduced as the default version.
  • JavaScript support improvements. This includes support for ECMAScript 5 and JavaScript properties, more relevant code completion in different scenarios including jQuery calls, a huge pack of context actions around string literals, conditional and logical operators, and properties.
  • Initial ASP.NET 4.5 and ASP.NET MVC 4 support. As Microsoft is promoting updated versions of its web development frameworks, ReSharper starts to provide support for some of the new features that they have, including strongly typed data controls, model binding, and MVC display modes.
  • LightSwitch and SharePoint support. The two Microsoft technologies receive a support quality boost in v7. The new ReSharper knows about LightSwitch application type, which leads to less red code and extends ReSharper feature coverage to a wider set of file types. As to SharePoint, ReSharper now understands SharePoint-specific master pages, resources, style sheets and JavaScript files.
  • SDK enables developing ReSharper support for new languages. This is not your typical selling feature, even more so that it’s not something that comes out of the box, but in actual fact in you take a look at how many people vote for F#, CoffeeScript, or LESS support in ReSharper, you’ll see that this one has a potential to make ReSharper a great tooling foundation for polyglot development on the .NET platform.

If you find any of these improvements appealing, give it a try: download a fresh ReSharper 7 EAP build.

This entry was posted in dotTrace Tips&Tricks, How-To's, News and Events and tagged , . Bookmark the permalink.

17 Responses to ReSharper 7: What’s Inside

  1. John B says:

    Ohhh, how I lack “Refactor Move” working nicely with TFS (performing an actual move rather than delete/insert)

  2. @John B Can you elaborate on this please? Do you experience this behavior (delete/insert instead of move) in ReSharper 7 EAP? If you are, have you experienced this same problem with ReSharper 6? Thanks

  3. Dzejms says:

    Haven’t been keeping up with the EAP but is this all the features? Is there still not a way to extract [method|function] in js? Has it been under my nose all this time?

  4. Dmitry Kryuchkov says:

    @John I believe this is not R# concern, but TFS Source control provider problem. I stopped using TFS directly via Source control provider few months ago and I do use git-tfs ( since then – and git detects renames correctly and sends this info to TFS.

  5. Lazie says:

    It would be nice if there was an option that displays a black line separating the methods, as in VB.
    Who does not like it disables the option, and who like or are familiar with the VB can enable this option. It’s something simple, and I bet many people would like.


  6. AgileHobo says:

    How about full ASP.NET 4.5 and ASP.NET MVC 4 support? Do I need to wait for R# 7.x or 8?

  7. David Gardiner says:

    And if (like me) you were wondering what “Resharper Internal Mode” was, it can be enabled by following the instructions from here –

  8. John B says:

    @Jura Gorohovsky, I experience this behaviour (“delete/add” instead of “move”) in R# 6.1 and 7 EAP (both are latest versions as of today).

    @Dmitry Kryuchkov, TFS supports this functionality in Visual Studio and using command line. I would be *really* surprised if something as basic as “move/rename” would not be exposed to R#.

  9. Gleb says:

    you UI is getting better, great!
    also, is there any plans to include “Extract method to existing interface” refactoring?

  10. Kenny says:

    @Gleb, if your class is inheriting the interface you can highlight the method/property and press CTRL+Shift+R and choose “Pull members up”

  11. Evgeniy Koshkin says:

    @Jura Gorohovsky, @John B – I’ve found related issue

  12. @John B cc @Evgeniy Koshkin Thanks. Seems like a known issue:

  13. @Dzejms AFAIK Extract Method/Function for JavaScript hasn’t made it to 7.0.

  14. @AgileHobo Full support for the web dev frameworks isn’t ready just yet, it’s true. Can you elaborate what kind of support are you expecting? This would make easier for us to make a scheduling decision. Thanks!

  15. @AgileHobo, except bundling and minification, all features that require separate support are implemented. Are you missing something?

  16. bitbonk says:

    Why is Extract Class currently only available in ReSharper Internal mode? And when will that change?

  17. @bitbonk
    The UI used to be unstable in Beta, so we kept it in Internal for quite a while.
    It was made available for everyone somewhere between Beta and yesterday’s final release.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>