ReSharper and Visual Studio: Where do We Stand

Visual Studio keeps evolving, and ReSharper support for the Microsoft IDE is up to the challenge as usual. As a reminder, ReSharper 8.x currently supports a staggering 5 Visual Studio versions: 2005, 2008, 2010, 2012, and 2013. It’s only been half a year since we discontinued sales of ReSharper 2.x with support for Visual Studio 2003.

In light of recent Microsoft announcements and our internal decisions we’d like to give you an update on how we stand in regard to supporting different versions of Visual Studio. We have good news and bad news.

Bad news: ReSharper 9 and other .NET tools will not support Visual Studio 2005 and 2008

This was coming for a long time but we kept giving VS2005 and VS2008 one last chance after another. It didn’t help the case that certain recent ReSharper features such as Architecture Tools and Extension Manager weren’t by definition compatible with VS2005 and VS2008. Given the complexity of changes that ReSharper and other .NET tools have been subject to during the ReSharper 9 development cycle, we could have opted to release unstable, untested support for VS2005 and VS2008 but we chose not to. As we stand, we have to stop maintaining support for these releases to focus on up-to-date challenges.

To sum it up, the upcoming releases of ReSharper (including ReSharper 9) and other JetBrains .NET tools will not support Visual Studio 2005 and 2008. Only Visual Studio 2010 and later will be supported further on.

ReSharper 8.2.3, dotTrace 5.5.6, dotMemory 4.1 and dotCover 2.7.2 will become the last releases to support Visual Studio 2005 and 2008. Please keep using these stable releases if you’re staying with Visual Studio 2005 and/or 2008.

Should you or your team mates need to purchase new ReSharper licenses and expect them to work in Visual Studio 2005 and 2008, as a workaround, you’ll be able to buy ReSharper 9 licenses and use them with ReSharper 8.2.3 as we have specifically made sure that this release accepted the new license format.

Good news: ReSharper 9 will support Visual Studio 2015

Therefore, ReSharper 9 will support Visual Studio 2010, 2012, 2013 and 2015.

Following the pattern of ReSharper 8 release, version 9.0 will provide support for Visual Studio 2015 Preview, and further updates will add any necessary improvements required to integrate smoothly into the final VS2015 release. In case you have missed it, the current early ReSharper 9 builds work with Visual Studio 2015 Preview although there are known issues with its dark theme that are going to be fixed shortly.

We’re also close to smoothly integrating ReSharper’s quick-fixes and other Alt+Enter actions with Visual Studio 2015′s quick actions in a single UI:

We expect to write more about ways how ReSharper 9 is going to work in Visual Studio 2015, so stay tuned.

More good news: Both ReSharper 8 and 9 integrate with Visual Studio Community 2013

Microsoft has recently released the (conditionally) free Community edition of Visual Studio 2013 that totally beats Visual Studio Express by supporting extensions. Immediately we were faced with questions whether ReSharper would work in the Community edition. The answer is yes, both ReSharper 8 and ReSharper 9 do integrate into Visual Studio Community 2013.

The next question we faced in this regard was whether ReSharper would introduce a free edition as well. Well, we’re not planning to provide a special free edition. This is not necessary however. Similar to Visual Studio Community that is only available to specific groups of customers (see Channel 9 Q&A for details), ReSharper is also available for free to multiple groups including Microsoft MVPs (along with other JetBrains .NET tools and WebStorm), students and teachers (along with all other JetBrains products), as well as faculty members and trainers for use in classroom environments. Additionally, startup companies can enjoy a 50% startup discount on all JetBrains tools.

Posted in How-To's | Tagged , , | 10 Comments

Meet ReSharper, ReSharper C++ and ReSharper Ultimate

We’d like to give a preview of updates to JetBrains .NET product line that will become effective as soon as ReSharper 9 and other JetBrains .NET tools are released in coming weeks.

TL;DR: ReSharper editions (C#, VB.NET and Full) are going away. Instead, the ReSharper product line will now consist of 3 items:

  • ReSharper (formerly Full Edition: C#, VB.NET, XAML and other languages traditionally supported by ReSharper; no C++ support),
  • ReSharper C++ (C++ support only)
  • ReSharper Ultimate (includes both ReSharper and ReSharper C++, as well as dotCover, dotTrace and doMemory.)

Please see details below, along with answers to some of the questions that we expect to be asked.

How exactly is the set of ReSharper products going to change?

ReSharper is currently available in 3 editions: C# Edition (includes all features except for VB.NET support), VB.NET Edition (includes all features except C# support), and Full Edition (includes everything that ReSharper has to offer.)

Starting with the release of ReSharper 9 next month, C# Edition and VB.NET Edition are going away, Full Edition becomes referred to as simply ReSharper, and two additional products become available. The diff looks as follows:

  • ReSharper C# Edition. Will no longer be available.
  • ReSharper VB.NET Edition. Will no longer be available.
  • What has been known as ReSharper Full Edition will now be referred to as simply ReSharper. This will include all ReSharper functionality available in the current Full Edition, including support for C#, VB.NET, ASP.NET, JavaScript, TypeScript, HTML, CSS, XAML and build scripts. However C++ support will not be available in this product. If you have an active ReSharper upgrade subscription to C#, VB.NET or Full Edition by the time of ReSharper 9 release, you will be able to upgrade to ReSharper 9 for free.
  • ReSharper C++. This is a new offering in the ReSharper product line and will only provide C++ support.
  • ReSharper Ultimate. This is also new. ReSharper Ultimate will provide all ReSharper functionality including C++ support, and it will also include all other commercial JetBrains .NET tools: the set that currently consists of dotCover, dotTrace, and dotMemory.

Here’s how the new products relate to each other: ReSharper and ReSharper C++ are distinct products but ReSharper Ultimate unites them and adds other .NET tools:

How ReSharper, ReSharper C++ and ReSharper Ultimate relate

Why change anything?

There are two major reasons behind introducing these changes:

  • We wanted to get the positioning of ReSharper and .NET tools in sync with reality. For instance, isolating C# and VB.NET editions don’t make much sense anymore as ReSharper now supports over 10 programming languages. However separating C++ support from everything else does make sense as C++ and .NET applications are usually developed separately.
  • We wanted to streamline concurrent usage of ReSharper with other .NET tools. Traditionally, many customers have been hesitant to use dotTrace, dotMemory and dotCover alongside the widely popular ReSharper. This has happened for various reasons, notably those related to price and compatibility. For example, profilers would sometimes be seen as costing too much without being fully applicable in a day-to-day .NET developer workflow, and integrating all these tools in Visual Studio could increase memory consumption to intolerable levels. Both of these problems are now solved: one (price) with recent pricing changes and integrating .NET tools into the single-license ReSharper Ultimate product, the other (compatibility) with a considerable effort of getting all JetBrains .NET tools to reuse a shared set of libraries and thus drastically decreasing memory consumption when more than a single tool (for example, ReSharper and dotCover) is integrated in the same version of Visual Studio and used concurrently.

What is ReSharper Ultimate?

ReSharper Ultimate is introduced as the top-level product in the ReSharper product line that combines all individual tools for .NET developers that JetBrains produces, as well as ReSharper C++. After the release of ReSharper 9, ReSharper Ultimate will include:

  • ReSharper
  • ReSharper C++
  • dotMemory
  • dotTrace
  • dotCover

A ReSharper Ultimate license makes a single developer eligible to use all 5 products on a single developer workstation. You can install them all at once, or at any time you feel you need them, and use a single license key to activate any of them.

Purchasing licenses to separate products will also be possible. For example, if you don’t need ReSharper but you need dotCover, dotMemory or dotTrace, you will still be able to purchase them separately. However if you need more than two of these tools, and also if you need any of these tools and ReSharper, then ReSharper Ultimate would be the easier and most probably the cheaper way to go.

Why would I be interested in ReSharper Ultimate?

There are several reasons why purchasing ReSharper Ultimate licenses can be beneficial:

  • Using both .NET languages and C++. If a single developer uses Visual Studio to code both in C# (or VB.NET, or TypeScript, or other languages supported by ReSharper) and in C++, they would probably want to have ReSharper help out in both worlds. Purchasing both ReSharper and ReSharper C++ for this developer is an option but ReSharper Ultimate is priced roughly the same and additionally makes the developer eligible to use dotCover, dotTrace and dotMemory.
  • Easier procurement and license key management. As opposed to maintaining several sets of licenses to individual JetBrains .NET tools that could be subject to different licensing terms and require renewal at different dates, you get a single license key per developer that you don’t have to renew any more often than once a year.
  • Uniform maintenance. Traditionally, JetBrains .NET tools have distributed using different licensing schemes, which would introduce unnecessary confusion at times for customers with licenses to more than a single tool. To make things easier, ReSharper Ultimate always includes a 1-year subscription meaning you won’t have to monitor subscription expiration dates for every tool, but instead you can upgrade them all for free during a year after purchase date. As soon as the first year of free subscription expires, you can renew all covered products for one more year, in one go.
  • Price. ReSharper Ultimate pricing is crazy appealing. For example, if you’re a company from the US and you’re considering buying commercial licenses to all JetBrains .NET tools, here’s how much you’d have to shell out to buy them separately:

    $349 (ReSharper) + $229 (ReSharper C++) + $249 (dotMemory) + $249 (dotTrace) + $199 (dotCover) = $1275. This is way overboard, right?

    In contrast, a single ReSharper Ultimate license that qualifies a single developer for all these products is worth only $599, which is over 50% off the package! You’re essentially getting 5 JetBrains .NET tools for the price of 2.

What if I want my ReSharper to support both .NET languages and C++?

If this is the case, you have two options:

  • Purchase both ReSharper and ReSharper C++. For a company based in the US, two commercial licenses would cost $349 (ReSharper) + $229 (ReSharper C++) = $578.
  • Purchase ReSharper Ultimate. For a company based in the US, a single ReSharper Ultimate license would cost $599. This is just a tad more expensive than the combo of two ReSharper licenses suggested above, plus the Ultimate license would also make you eligible to use dotMemory, dotTrace and dotCover.

ReSharper C++ release however is going to be delayed

While ReSharper 9 and updates to other .NET tools are expected to be released in early December, ReSharper C++ will not reach release quality by this time and will only be available as Beta. The ReSharper C++ team expects to deliver the final release in early 2015.

Therefore if you’re looking to purchase a license to ReSharper C++, you have the option to either hold off until the final release of ReSharper C++ (and use the free Beta before it goes live) or purchase ReSharper Ultimate that will cover ReSharper C++ as soon as the latter goes live.

You’ll be able to use the free ReSharper C++ Beta in any case, the choice goes down to spending money earlier (by purchasing ReSharper Ultimate) or later (by purchasing a ReSharper C++ license as soon as it’s available for purchase.)

Upgrades and renewals

Will I be able to upgrade my existing ReSharper Full/C#/VB.NET license to ReSharper 9?

Sure. If you have a license without free upgrade subscription or with an expired free upgrade subscription, this would be a paid upgrade.

However if you have a ReSharper C#, VB.NET or Full Edition license with a free upgrade subscription that is active by the time of ReSharper 9 release, you’ll be able to upgrade to ReSharper 9 for free.

Will I be able to upgrade my existing ReSharper Full/C#/VB.NET Edition license to ReSharper 9 Ultimate?

Yes, you can upgrade to ReSharper Ultimate from your current license at any time for an upgrade fee.

Will I be able to upgrade my existing dotTrace/dotCover/dotMemory license to ReSharper Ultimate?

No, there’s no explicit way to upgrade existing dotTrace (formerly dotTrace Performance), dotMemory (formerly dotTrace Memory) or dotCover licenses to ReSharper Ultimate as we don’t anticipate high demand on this upgrade path. If real demand proves us wrong, we’ll reconsider and find a solution.

For how long will I receive free updates for the products covered by ReSharper Ultimate license?

Every ReSharper Ultimate license includes 1-year subscription to all updates across all tools that it includes. After your subscription expires you can continue using the latest installed versions of the tools, and you will be eligible to receive free bug-fix updates as well (those that have 3 digits in version number).

Please note that there are no traditional “per major version” licenses to ReSharper Ultimate: when you buy (or upgrade to) a ReSharper Ultimate license, you always receive 1 year of free upgrades.

Questions?

The considerable changes outlined above can be hard to understand, and communicating them is not an easy task as well. If you have any questions, please ask them in comments, and we’ll try our best to clarify.

Posted in How-To's | Tagged , , , , , , | 43 Comments

Free JetBrains Night in London, December 2nd

Looking for a date in London, UK on the 2nd of December? Spend a fun and informative evening with us and our developer tools.

In collaboration with NDC, we have prepared a FREE special evening event that coincides with the pending major release of ReSharper.

JetBrains Night in London, December 2nd

Come learn what’s new in ReSharper 9 and see ReSharper C++ in action. We’ll show you the hottest new features and share our tips and tricks to help you get the most out of our tools.

We will also be giving a sneak peak at some of things things we have been working on including Upsource, our new repository browser and code review tool, new upcoming features in TeamCity, YouTrack and some other goodies!

Light snacks and drinks will be provided. We hope that you join us from 17:30 – 21:00 on December 2nd at the Crowne Plaza London – Docklands.

There are a very limited number of tickets that are available. Learn more and register now to reserve your spot today.

Brought to you by JetBrains and NDC
NDC London 2014JetBrains Night in London is brought to you by JetBrains in collaboration with NDC. We would like take this opportunity to remind you that NDC London 2014 takes place during the same week, December 1st – December 5th, at the same venue. You do not need to attend NDC in order to attend our free JetBrains Night.

Posted in News and Events | Tagged , , , , | Leave a comment

Introducing EAPs for dotTrace 6, dotCover 3, dotMemory 4.2

Please welcome a new ReSharper 9 EAP build that comes along with compatible dotTrace 6, dotCover 3 and dotMemory 4.2 Early Access builds.

Download the common .NET tools installer, launch it and choose the products you want to try.

We’ve done a great amount of work on the UI side, resulting in a more pleasant and easy-to-use profiling experience with dotTrace 6 EAP. A number of new features were also implemented, as well as the new and powerful timeline profiling option. Let’s have a look at what’s new.

dotTrace Home

When launching dotTrace 6, we’ll be presented with an all-new starting point: the dotTrace Home. From here, we can start a new local or remote profiling session for known .NET application types, attach to a running process and configure our profiling session.

dotTrace Home

Every application type will offer different settings for running the application we want to profile. Ticking the Advanced checkbox will provide us with additional options, such as using the profiler API.

If you’re new to performance profiling, check the Tutorials section on the home screen. We’ll guide you through how dotTrace works and how to analyze the data that was collected by the profiler.

Enhanced Profiling Controller

After launching a profiling session, we’ll see a new profiling controller open. We can use it to start the profiler, generate a snapshot, specify whether the profiler should continue capturing data or not, detach the profiler, or kill the running process.

Controller

With dotTrace 6 you can expand the profiling controller, providing you insight into the realtime CPU and memory usage of your application.

Profiler controller showing realtime CPU and memory usage

When our application runs multiple processes, we can select to profile any of them from the Processes page. Note that the Profile child processes option must be enabled for this to take effect.

Timeline Profiling

We’re introducing a new profiling type with dotTrace 6: Timeline profiling.

Timeline profiling collects temporal data about thread states, application events and other multi-threading data using Event Tracing for Windows (ETW). It comes in handy when analyzing multithreaded applications and lets us determine the cause of UI freezes, excessive garbage collections, uneven workload distribution, insufficient I/O and so on. The main advantage of Timeline profiling is that it not only allows us to see which calls were made by our application, but also how these calls were distributed over time.

Analyzing timeline profiling snapshots is similar to analyzing other profiling type results, with one difference: everything is bound to the timeline. We can view all events, or zoom in on a particular timespan of our application’s runtime and analyze the call tree, threads, memory allocation, garbage collection and I/O events.

Timeline profiling for multithreaded applications

In general, we can use timeline profiling all the time: just like the other profiling types it collects call stack data and allows us to determine performance bottlenecks. It is unable to determine the exact number of performed calls, making it less suitable to analyze algorithms, but that’s where tracing and line-by-line profiling are the tools of the trade.

Dissolved and Hidden Subsystems

When analyzing profiling results, we get a broad overview of subsystems used by our application. This gives us a hunch of where most time is spent: in the UI, in user code, with Garbage Collection, with I/O and so on. We can even define our own subsystems.

dotTrace subsystems view

From the options, dotTrace now lets us dissolve or hide subsystems. By default, each subsystem is visible as an entry in the subsystems pane. Making a subsystem dissolve will account the call times to its caller. Hidden subsystems will not be counted in results.

Subsystems now dissolvable or hidden

Setting these options for existing or new subsystems lets us slice and dice the profiling results in such a way that we only see the data we’re interested in.

Various UI Improvements in dotTrace 6 and dotCover 3

dotTrace 6 is now sharing a unified UI framework with ReSharper, dotCover and dotPeek. This brings an experience consistent to Visual Studio to the latest version of our profiler. All tabs and panes can be docked wherever we want, or detached from the main window so they float around. Very useful in multi-monitor setups! dotCover 3 receives a new UI for configuration settings dialog box.

Code Coverage in dotCover 3 on a Remote Machine

Code analysis in dotCover 3 can be performed on a remote machine. Set up a server and run it as a console application or Windows service on a remote machine. To perform code coverage, one needs to navigate to C:\Users\username\AppData\Local\JetBrains\Installations\dotCover01. Then, launch dotCover.RemoteCoverageServer.exe and connect to the server from the menu ReSharper -> Options -> dotCover -> Remote Coverage. In this scenario all the coverage tests are running on a remote server. This can save you a vast of performance resources on your local machine.

The Customary Trial Pitch

Give the latest versions of dotTrace 6 EAP, dotCover 3 EAP and dotMemory 4.2 EAP a try! Download the common .NET tools installer and choose products to install. Please note that doing so will remove all previous installations of ReSharper and other JetBrains .NET tools from Visual Studio, plus VS2005 and VS2008 are not supported so far.

All feedback, comments, issues and suggestions are welcome in dotTrace, dotCover and dotMemory issue trackers or through the comments below.

Posted in News and Events | Tagged , , , , , , , , , | 15 Comments

Another ReSharper 9 EAP build: now with ReSharper C++

We’ve already hinted before at the fact that ReSharper for C++ Early Access Program went public. In the second ReSharper 9 EAP build we’ve added dotPeek to the install bundle, and in this latest EAP, ReSharper for C++ is also available for installation. Now, we’ve already had several separate builds of R# with C++ support, so this post covers the new, never-before-seen features that are making their appearance in this EAP.

Important note: Please be aware that the C++ support in ReSharper will constitute a separate product rather than simply an add-on to the existing ReSharper features.

  • Extract Method — this refactoring lets you factor out a part of a complicated function into a separate function. Simply pick the part of code that you want to extract:
    Extract Method refactoring in ReSharper C++
    ReSharper will then let you pick the arguments of the extracted function:
    Extract Method refactoring in ReSharper C++
    … and make the appropriate adjustments:
    Extract Method refactoring in ReSharper C++
  • Type Hierarchy — this window shows you a tree representation of all the types in a particular inheritance hierarchy:
    Type Hierarchy window in ReSharper C++
  • Improved Code Completion — plenty of improvements here; for example, enum members taken from a different namespace are shown in code completion:
    Code Completion in ReSharper C++
    Or here’s another example. Say, you have a member function declaration. If you try to call it on the object, you’ll get the following completion list:
    Code Completion in ReSharper C++
    This is an example of generative completion — after you pick the top option, ReSharper will generate the following piece of code at the caret position:
    Code Completion in ReSharper C++
  • Typedef Substitutions let you leverage ReSharper’s power to perform in-place resolution on types and simplify them:
    Typedef Substitutions in ReSharper C++
  • Support for Calling Conventions — ReSharper now has proper handling of calling conventions and correctly recognizes usage scenarios, such as e.g. the use of Boost.Bind with BOOST_BIND_ENABLE_STDCALL
  • Improved Code Generation for Template Classes — for example, in this scenario
    Code Generation for Template Classes in ReSharper C++
    the code generator for the constructor of Y looks like this:
    Code Generation for Template Classes in ReSharper C++
    and the generated code for these options looks like this:
    Code Generation for Template Classes in ReSharper C++
  • Go to Declaration now works on variables declared with the auto keyword.
  • Improved Member Resolution with support for template types in some scenarios:
    Member Resolution in ReSharper C++
  • Memory Usage has been reduced by up to one third in some scenarios.

As you may have guessed, there are plenty of other improvements in ReSharper C++ EAP. So, if you’re interested in seeing all these features in action, you know what to do – grab the EAP and give them a go!

Note that apart from an updated ReSharper C++ EAP, the latest EAP build contains a set of fixes for ReSharper 9 EAP.

Posted in ReSharper Tips&Tricks | Tagged , , | 10 Comments

Regular Expression Support in ReSharper 9

If you’ve ever used regular expressions in practice, chances are you’ve been dismayed at their cryptic nature and frustrated by having to download a separate application just to make heads or tails of them.

Well, in ReSharper 9, we are adding support for regular expressions, helping you both read regular expressions and offering helpful diagnoses of potential problems.

Expression Highlighting

To make regular expressions more readable, ReSharper now uses different colors to highlight different parts of a regular expression.

Regular Expressions highlighting in ReSharper 9

We have introduced the following colors for different parts of regular expression syntax:

  • Light Blue — character classes, anchors and quantifiers.
  • Light Green — grouping constructs
  • Orange — set constructs
  • Pink and Light Pink — escape characters (these alternate for better readability)
  • Green — comments
  • Red — used to indicate errors

In addition to the color highlighting, we also highlight matching braces in groups, group names and sets:

Matching Braces for Regular Expressions in ReSharper 9

ReSharper is capable of highlighting invalid characters and escape character sequences, and also uses different highlightings for adjacent elements so as to make the expression more readable.

Error Highlighting

It wouldn’t be ReSharper if you couldn’t get analysis of your regular expressions, would it? That’s why, in ReSharper 9, regular expressions are checked and validated, and any errors are indicated in piecewise fashion: instead of just flagging the whole string as erroneous, ReSharper carefully highlights only the parts of the regular expression string that actually constitute an error:

Error highlighting for Regular Expressions in ReSharper 9

Some more examples of the kind of errors ReSharper can pick up on, including missing brackets or group names as well as invalid qualifiers that appear after an anchor character or a group name:

Missing Brackets highlighting in Regular Expression in ReSharper 9

Code Completion

ReSharper already provides plenty of context-sensitive code completion within string literals. For example, completion in ToString() function calls helps you enter format specifiers. So, with regular expressions, we did exactly the same thing by providing code completion for known regular expression escape sequences:

code completion for regular expressions in ReSharper 9

This form of completion is useful as a form of quick documentation, as in addition to the sequences themselves, ReSharper also shows textual descriptions.

As with other code elements, ReSharper provides the following completion mechanisms:

  • Basic completion shows elements that are available for the current scope
  • Smart completion shows the most relevant elements for the current scope
  • Double completion shows all possible elements
  • Automatic completion gets triggered after the user enters one of the \, ( or [ characters.

In addition to code completion within regular expressions, an additional benefit of ReSharper knowing about regular expressions is code completion for MatchResult objects: you now get explicit completion for group names within such a result:

Code completion for MatchResult objects in ReSharper 9

Naturally, you also get code completion within the group name string itself (i.e. Groups["<here>"]).

Escaping Quick-Fix Helper

Quite often, when you write a regular expression, you want to write something like the following:

Errors with backslash in regular expression

Regrettably, this will not compile since the backslash (\) characters themselves need to be escaped, making the sequences \w and \s invalid (as opposed to \\d, which is correctly escaped). To help with this, ReSharper provides a quick-fix that turns the string into a verbatim string:

Quick-fix to turn the string into a verbatim string in ReSharper 9

Notice that the \\d from the sample code has been turned into a \d. As always, ReSharper preserves the fidelity of the strings when changing the way they are presented.

Validation Utility

Having a separate little applet that validates regular expression is still very useful, which is why ReSharper is now providing one of its own:

Regular Expressions validation utility in ReSharper 9

As soon as the input text is modified, the standard .NET regular expression engine processes the expression and attempts to match it against the test input. All the located matches are highlighted in light green right in the text editor.

If there is a match, the exact match groups are indicated in the tree on the right of the window. The tree shows matches, groups in matches and all captures for groups (if there are more than two). Furthermore, if we select any element in the tree, the corresponding part of input text and the group (if any) of a regular expression are also highlighted.

Finally, the Check lines separately lets us test several input lines independently. This option becomes available only when there is more than one line in the input box, and test each of the single lines individually.

Finally, the typical regular expression match options are available from a drop-down check list:

Regular Expression match options in ReSharper 9

The validation utility provides quick documentation for each expression option: simply hover the mouse over a question mark next to the option and you’ll get a textual explanation of what this option does:

Quick Documentation in Validation utility in ReSharper 9

To make it easy and convenient to use the Validation Utility, ReSharper now offers a corresponding context action on all regular expression strings:

Conversion to Precompiled Expression

Quite often, we use a static Regex member (e.g., Regex.IsMatch()), for example:

Context Action on all regular expression strings in ReSharper 9

At some later point, we might want to turn this static call into an instance call, i.e., to precompile the expression and save the resulting finite state machine in a static field. Of course, this is only possible if the pattern does not depend on any input data.

Why would we want to do this? The reasons are obvious:

  • We want to reuse a regular expressions in other locations in our code; or
  • We want to use a great many regular expressions through static calls. According to Regex documentation, this class only caches a fixed number of expressions, the exact amount delineated by the Regex.CachedSize variable (default value is 15).

Thus, ReSharper provides a helper action called To precompiled regex that translates a static call into a precompiled regular expression. After invoking the action, we get the following:

To precompiled regex context action in ReSharper 9

Check it out!

So here it is: Regex support in ReSharper 9. To try it out right now, give ReSharper 9 EAP a go and let us know what you think!

Posted in ReSharper Tips&Tricks | Tagged , | 7 Comments

Introducing the ReSharper 9 Early Access Program

As many of you may have noted, there’s quite a lot of things happening in the land of .NET right now. The introduction of Roslyn and C# 6, the new ASP.NET, the forthcoming release of Visual Studio 14 and many other things are afoot and, once again, ReSharper is unrelenting in its support of the new and exciting language features and frameworks.

So today we are opening the Early Access Program (EAP) for ReSharper 9. What’s in store? Let’s take a look.

TL;DR VS 14 and C#6 support, regular expressions, lots of JS/TS improvements, more bulk fixes, a revised file layout editor, new navigation actions and a new shared platform for all our .NET-related tools.

C# 6 Support

ReSharper 9 supports the ?. operator in C# 6

We already did an introductory blog post on C# 6 support so, just to recap, here are some of the things that ReSharper 9 will be aware of:

  • Conditional access support — the .? operator lets us perform chained null checks (a.k.a the Maybe monad), so ReSharper is now not only aware of the construct, but is also capable of updating your null-checking code to the new paradigm.
  • Expression-bodied members — since the notation for simple expressions has been simplified in C# 6, ReSharper now offers the option to use expression bodies instead of curly-brace-delimited constructs. This is also a bulk action, so you can apply it across the whole project.
  • Auto-properties benefit from additional support of initializer expressions, as well as an ability to get rid of private setters and get truly immutable auto-properties.
  • Support for static usings (finally, you can type Sin instead of Math.Sin), exception filters and other new C# 6 constructs.

Bulk Actions and Fix in Scope

Fix in Scope: more quick-fixes that can be applied in the entire project or solutionReSharper 9 introduces further improvements to the Fix in Scope mechanic that allows bulk non-destructive changes on large areas of code. This includes the following:

  • Bulk Import ensures that when you import a chunk of code, ReSharper now goes through the code in your solution and generates the appropriate imports for all the necessary types and members – this includes extension methods as well.
  • Redundant Code Removal now appears as a separate item, so given a single redundant this. qualifier, you can fix these qualifiers locally or globally or you can remove all redundant code in a file, project or solution.
  • Global naming fixes help you rename code according to your conventions. Again, this is a bulk action, so you can fix a single location or a single file/project/solution within a single menu.
  • Move to File/Namespace now ensures that files with multiple class declarations get treated properly.
  • Remove Regions is another bulk action that will be particularly welcome by those of us who do not like the idea of regions in our code.

Navigation Improvements

Navigation improvements in ReSharper 9: Go to ActionSome of the navigation improvements in ReSharper 9 include:

  • Go to Action (a.k.a. Universal Alt+Enter) changes the Alt+Enter shortcut to provide top-level action suggestions as well as an ability to perform a text search for a particular action.
  • Navigate to Exposing APIs is a navigation option for finding all the methods that are capable of returning a particular type.
  • Assembly Explorer enjoys tighter integration, with dedicated Navigate To options both in the editor as well as the Solution Explorer.
  • The Go to Type mechanism has been disambiguated for generic types, so while on a variable of type List<Foo>, ReSharper will ask you whether you want to navigate to List<T> or Foo.
  • Find Usages now has a configurable setting for using the Preview Tab. It also no longer blocks the UI on long-running searches.
  • The Find Results window will no longer spawn extra tabs for the same type. And finally, it’s now possible to ignore or hide particular search results.

Code Style Settings

File Layout Editor in ReSharper 9

Style settings for C# include the following new features:

  • var Usage in Declarations has been split into three separate settings (for built-in types, simple types and elsewhere) for finer-grained control over how var-related highlights and quick-fixes function.
  • Instance member qualification determines precisely which members are qualified by the this. qualifier.
  • Static member qualification settings determine whether static members should be qualified via the current type or the type they are declared in.
  • All three aforementioned settings are also available as Code Cleanup profile elements.
  • Finally, a brand new GUI-based File Layout Editor — no more editing a cryptic XML file by hand!

Regular Expression Support

ReSharper 9 supports regular expressionsReSharper now understands regular expressions, so to make heads or tails of them, you might no longer need to have a separate application by your side. Here’s what it supports:

  • Syntax Highlighting for regular expressions, including piecewise highlighting of errors.
  • Code Completion helps you pick the wildcards for an expression. There is a special code completion feature for regular expression groups, too!
  • An Escaping Quick-Fix helps you quickly adjust wildcard backslashes to C# style by turning the string into a verbatim string.
  • A separate Validation Utility lets you quickly check input against a regular expression and get an immediate view of the matches and groups. As you might expect, the utility is highly configurable.
  • Options for Conversion to Precompiled Expressions let you optimize performance by turning ordinary regular expression invocations into static Regex instances.

TypeScript and JavaScript Improvements

ReSharper 9 improves TypeScript and JavaScript supportHere are some of the improvements introduced for the TypeScript language:

  • New Highlighting and Quick-Fixes now cover over 270 different types of errors.
  • New Refactorings include Introduce Field, Copy Type, Move Refactorings (move type to module/file, move into matching files, move to folder), Rename File as well as the Import of Types for Pasted Code.
  • Code Generation for TypeScript now supports implementing interfaces/generating missing members as well as generating constructors and overriding members, too.
  • Live Templates were improved to support two new scopes — Module Member and Type Member. ReSharper also comes with live templates for common TypeScript entities, such as classes, enums, interfaces and modules.
  • Parameter Info now supports not only function arguments, but generic arguments as well.
  • Specialized Signatures are now fully supported.

In addition, ReSharper also offers automated JavaScript to TypeScript conversion as well as initial support for ASP.NET vNext.

Unified Installer

We plan to offer a single unified installer for all our .NET products (ReSharper, dotTrace, dotMemory, dotCover, dotPeek). When installing, you will be able to pick which products you want, and the installer will do the rest. Also, behind the scenes, all our products now operate on a shared platform, which saves resources when several products are running at the same time.

Please note that the initial EAP build we’re posting will only offer installation of ReSharper itself; it will also remove all previous installations of ReSharper and other .NET tools, and will not support VS 2005 or 2008.

And a Few More…

Here are just a couple more features that were added or improved:

  • Visual Studio 14 support is here, as you would expect.
  • Switching features on and off has never been easier with a dedicated option page which lets you control which parts of your code ReSharper actually affects. Current options include support for Unit Testing, MsBuild and NAnt, CSS, JavaScript and TypeScript as well as Internationalization.
  • Debugging of decompiled code now works in ReSharper. Of course, you can also debug decompiled code using dotPeek.
  • ReSharper’s Architecture Tools now include an ability to generate a Type Dependency Graph. This form of visualization is great for finding out what code depends on a particular type, and what the type itself depends on. This diagram integrates with other ReSharper’s features, for example navigation result sets can now be shown as a Type Dependency Graph via the Alt+ shortcut.

This sums up what we have in store for the first EAP build but we’ll be adding more changes further on. We invite you to download ReSharper 9 EAP and give it a go!

Oh, and as always, let us know what you think and please report any issues you encounter — thanks!

Posted in ReSharper Tips&Tricks | Tagged , , | 36 Comments

ReSharper 8.2.3 Is Available

A new ReSharper maintenance release is now available. We recommend you to download and install ReSharper 8.2.3 in case you were unable to use previous bug-fix updates (8.2.1 and 8.2.2) due to expired subscription, although your subscription was valid for upgrading to 8.2 (expired after March, 21).

In addition to solving the upgrade issue, this update contains a fix to a problem with Go To Implementation on method or interface not working properly.

Stay tuned since more good news are just around the corner!


Get ReSharper

Posted in News and Events | Tagged , | 13 Comments

dotMemory 4.1 is Released: 6+ Reasons to Upgrade

Today we are thrilled to introduce dotMemory 4.1 with a new batch of .NET memory profiling goodies regarding automatic inspections, profiling process control, GC roots data, and more. Please welcome dotMemory 4.1, bringing you more rigorous, convenient and beautiful profiling experience.
dotMemory 4.1 splash screen

Why upgrade to dotMemory 4.1? For at least 6 reasons:

1: Disable/Enable collection allocations on the fly.
To profile certain functionality of your app without slowing down all of its other areas, try disabling allocations collection directly from the real-time profiling control view. For your convenience allocations collection period is marked by red line on a timeline.
Collection Allocations

2: Get more data on GC roots.
Starting from this update, dotMemory shows you the name of the field through which a static object is referenced. Later we plan to publish a good read on GC roots basics, so stay tuned.
Named static reference

3: Detect more common issues in a single click.
To help you focus on what really needs your attention, we’ve added a new automatic inspection that finds String duplicates and shows the related memory waste. Two more recently added automatic inspections, both related to WPF, were announced earlier in v4.0.10.
String duplicates inspection

4: Copy, save and share profiling results.
Simply press Ctrl+C to copy current analysis results to the clipboard. Selection and copying of multiple rows is supported for all “Type List” views, all nicely formatted and ready to be compared or shared.
Formatted copy of analysis results

5: Enjoy new restyled UI icons. Our notion of profiling is that it should be clear, productive and even beautiful. That’s why this update features new great-looking UI icons for your viewing pleasure.
Refreshed UI icons

6: Name your analysis. Easily order and manage multiple memory investigations by providing your analysis tabs with custom names. Never again get lost in loads of various unnamed analyses.
Custom analysis name

+: Even more reasons?
To get the full list of enhancement and fixes, please see the release notes.

Discover all new features introduced in dotMemory 4.1 in this short Overview Demo.

Download dotMemory 4.1 and try out all the new things shipped with this update. Learn more about dotMemory 4.1 on the What’s New page. A free trial version is available for 10 actual days of use (even if they are non-consecutive). Note for existing customers: To use this update, you will need an active subscription.

Feel free to share any feedback you may have. Ask questions on the discussion forum, report bugs and feature requests to our issue tracker and/or leave comments on this blog post below. Follow @dotMemory on twitter to stay tuned about state of the art in .NET memory profiling. And to raise your skills in spotting .NET memory issues with dotMemory, watch this series of video tutorials by Maarten Balliauw, JetBrains Technical Evangelist.

Profile with pleasure!
dotMemory team

Posted in dotMemory Tips&Tricks, News and Events | Tagged | 1 Comment

Introducing dotMemory Video Tutorials

Great news for .NET memory investigators, with the help from our technical evangelist Maarten Balliauw we have prepared a series of short videos that cover some of the core features of dotMemory.

dotMemory

These video tutorials should be a good starting point for users who are new to dotMemory and just starting to explore its functionality. It is focused around core features available in dotMemory, explained in short videos of 2-4 minutes each. You can learn basic concepts of .NET memory management, profiling workflow, analysis techniques and more.

32 minutes and 11 videos to watch:

Stay tuned! Subscribe to JetBrains YouTube channel and follow @dotMemory on Twitter to be notified when new videos arrived.

Maarten BalliauwMaarten Balliauw is a Technical Evangelist at JetBrains. His interests are all web: ASP.NET MVC, PHP and Windows Azure. He’s a Microsoft Most Valuable Professional (MVP) for Windows Azure and an ASPInsider. He has published many articles in both PHP and .NET literature such as MSDN magazine and PHP architect. Maarten is a frequent speaker at various national and international events such as MIX (Las Vegas), TechDays, DPC and others..

Enjoy the show!
dotMemory Team

Posted in dotMemory Tips&Tricks, How-To's | Tagged | 2 Comments