How-To's

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.

image description