Bug Fix Update to ReSharper Ultimate is Available

Hello everyone,

Right after Build 2015, we published ReSharper 9.1.1 Release Candidate with Visual Studio 2015 RC support, and today we invite you to download and try ReSharper 9.1.1 RTM along with ReSharper C++ 1.0.1 and corresponding updates to ReSharper Ultimate tools.

This maintenance update for ReSharper is mostly notable for:

  • Support for Visual Studio 2015 RC. If you’re among early adopters of the newest Visual Studio 2015 builds, please download ReSharper 9.1.1 and let us know if you encounter any problems.
  • Per-machine installation, that can be very handy when several users share a single machine and ReSharper should be available for all of them.
  • 100+ hot fixes in code completion, source templates and other areas. Here’s the full list of fixes and changes included in ReSharper 9.1.1 for your reference.

Please note that ReSharper 9.1.1 doesn’t provide full support for ASP.NET 5 Beta 4 yet. Most of the features are on board, but there are some areas we are still working on. Stay tuned for further updates on ASP.NET vNext support in ReSharper.

ReSharper C++ 1.0.1 receives lots of important improvements as well:

  • Improved code completion including an option to replace “.” to “->” when completing a member.
  • Find Code Issues is now available from Solution Explorer context menu. It brings up Inspection Results window with all ReSharper C++ code highlights, like code quality issues, redundancies and code improvement suggestions. Having all of them in one window is easier than navigating through your code files to find and fix issues.
  • Access specifiers are now represented in a tooltip.
  • Semantic colour highlighting is now turned on by default.
  • Better performance when working with Boost libraries.
  • For the full list of fixes please take a look at release notes.
Posted in News and Events | Tagged , , | 12 Comments

ReSharper Unified Installer. Why?

The ReSharper 9 release introduced a special ReSharper Ultimate bundle. In addition to ReSharper and ReSharper C++, this bundle includes our other JetBrains .NET products: dotCover, dotTrace, dotMemory, and dotPeek.

What made this bundle possible? In the pre-Ultimate era, customers using multiple JetBrains .NET tools together experienced serious performance issues. For ReSharper 9, we worked on a ‘shared platform’ to eliminate this performance overhead. This decision also led to the following:

  • All .NET products are now released on the same day.

  • ReSharper 9 and other shared-platform tools cannot be installed side-by-side with their predecessors onto the same Visual Studio instance. For example, after you installed dotCover 3.0 with switched on VS integration, you would find ReSharper 8 uninstalled. Unpleasant, but unfortunately inevitable.

  • Now, there is only one unified installer for all JetBrains .NET products. Whether you get ReSharper Ultimate, ReSharper, dotTrace, dotMemory, or dotCover, you will download the same installer (though it has different names depending on the product).

The latter consequence, in turn, created another concern. Even if the downloaded installer implies the installation of a single product (say, dotCover), it will contain installation options for our entire .NET product lineup.

Unified Installer

You may ask? “What are all these options for? What can/should I install?“. Of course, you can select just the tool you’re interested in and skip everything from the Available Products section. However, we recommend that you try installing all. Now let us explain why:

  1. No problems with trial licenses
    Having all these Available Products in the installer doesn’t mean you have licenses to the corresponding tools. In fact, the installer is absolutely unaware of this as applying a license is a post-installation step.
    Nevertheless, even if you don’t have a license to a particular tool, that’s OK, as any installed tool automatically gets a trial license. So, you’ll have from 5 to 10 days to give it a try.
  2. No annoying license notifications
    Even after the trial license expires, it will NOT bother you with notifications when Visual Studio starts up (this was really annoying in previous versions). The notification will be shown only in case of an explicit action, e.g. after you try to run profiling with an expired dotTrace license.
  3. More comprehensive development experience 
    This is a good opportunity to try all of the tools and decide whether you need each one in your work. For example, many developers neglect profiling their apps, not realizing that one profiling session may be all that’s needed to reveal a severe yet easily fixable bottleneck.
    Our vision of ReSharper Ultimate is that of a single product that covers most needs a .NET developer may have, rather than a set of separate products. In line with this vision, in ReSharper 9 we discarded separate .NET tool menus. Now, ReSharper’s menu is the only starting point for all your activities with all JetBrains .NET tools:
    R# Menu
    Of course, this is just the beginning and we plan to make this integration even deeper.
  4. Almost no performance penalties
    As we mentioned earlier, it doesn’t matter how many JetBrains .NET tools are currently installed in your Visual Studio. Thanks to the shared platform, there are virtually no performance costs. Nevertheless, if you don’t need a particular tool for your project, you can reduce its impact to zero by disabling it in ReSharper’s Products and Features:
    R# Products and Features

We hope this post answers most of the questions you may have had about the installer. If not, please post them in the comments below. Thanks!

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

ReSharper 9.1.1 RC and Matching ReSharper Ultimate Update for Visual Studio 2015 RC

At Build 2015, Microsoft has just announced a new Release Candidate drop of Visual Studio 2015.

For those of you who are migrating to the new Visual Studio 2015 build, please download ReSharper 9.1.1 RC and accompanying updates to other ReSharper Ultimate tools.

Apart from support for the latest drop of Visual Studio 2015, the new ReSharper Ultimate update adds per-machine installation, introduces hot fixes in code completion and source templates, as well as lots of improvements in ReSharper C++.

Note that ASP.NET 5 Beta 4 is not supported so far but the final 9.1.1 release in a few weeks will add support for that as well.

By the way, JetBrains is at Build 2015 with a stand. If you’re at the event, come by and say “hi” or discuss the present and future of JetBrains tools for Visual Studio.

Speaking of Build 2015, Microsoft has also announced Visual Studio Code which is a cross-platform code editor with support for .NET applications. In case you’re wondering, we currently have no plans to integrate with this editor since it’s not extensible.

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

Analyzing ineffective memory usage with dotMemory

Memory issues in .NET apps can be generally divided into 1) leaks, 2) large memory traffic, and 3) ineffective memory usage. In this blog we’ve written extensively about how dotMemory helps you deal with the first two problems. Now it’s time to talk about analyzing ineffective memory usage, especially since dotMemory 4.3 introduces a new feature that can help really fight this issue.

Before we move on, let’s agree on some terms. What is ineffective usage? When your app consumes more memory than it should, or could, we call this ineffective. Sometimes you just “feel” that a particular algorithm consumes too much, but nothing seems to explain why it does. That’s when you should use a memory profiler.

Assume you’ve done the profiling and taken a memory snapshot. What next?

There are two main analysis approaches that may be combined or used independently. Start by answering the following two questions:

  • What methods allocate the most memory?

  • What objects retain the most memory?

What Methods Allocate Most of the Memory?

This task is typically solved with the help of a call tree. Most memory profilers have a special call tree view for determining the calls that allocated the largest amounts of memory. Doesn’t sound too complicated, does it? But in fact, even for mid-size projects digging into the tree may become a headache.

Call Tree

Of course, this algorithm is applicable to dotMemory as well. However, since version 4.0 we offer a much easier way called Call Tree as Icicle Chart.

The idea behind the chart is simple – it’s a graphical representation of the call tree. Each call is shown as a horizontal bar whose length depends on the size of objects allocated in the call’s subtree. The more memory allocated in the underlying subtree, the longer the bar. The bar’s color value serves as an additional indicator – the more memory allocated by the call itself, the darker the bar.

Call Tree Icicle Chart

So instead of looking at lots of numbers, start your analysis by opening the Call Tree as Icicle Chart view. In just a glance you can match a certain call with the amount of memory it allocates.

For example, the following chart shows the same data as the Call Tree table in the GIF above. Notice how there’s no need to dive into the call tree: main memory allocations can be seen instantly.

Icicle Chart Example

Of course the chart is interactive: just click a call to see its call stack. Use the Shift+click combination to zoom into the chart and examine the call chain in more detail.

Icicle Chart

Who Retains the Memory?

Understanding how memory is retained in your app is essential for successful optimization. For example, you know that a major part of memory in your app is consumed by strings. Nevertheless, most likely, the subject of your optimizations is not these strings by themselves but the data structures that store them. That’s why “Who retains the memory?” is the next big question when analyzing ineffective memory usage.

Objects that exclusively retain other objects in memory are called dominators. Earlier dotMemory versions offered just one way of analyzing app dominators – the Group by Dominators view, which shows the tree of dominators sorted by retained memory size:

Group By Dominators View

Since version 4.3, dotMemory offers a new “visual” way of analyzing dominators: the Sunburst Chart. In this view, the dominators hierarchy is shown on a sunburst chart. The more memory a dominator retains, the larger the central angle.

Dominators Chart

A quick look at this chart shows what objects are crucial for your app and helps you evaluate the largest structures.

Sunburst Chart

If you click on a particular dominator, the Domination Path on the right will show you the retention path of this dominator. Double-click on a dominator to zoom into the chart and see the objects retained by this dominator in more detail.

Our experience shows that Dominators chart is also very effective when you need to quickly evaluate how a certain functionality works in your app. For example, below are two charts built for an image editor application: the first one was plotted before anything is done in the app, and the second one reflects memory usage after the user has applied an image filter.

Example of Two Dominators Charts

After some time, if you profile your app constantly, you’ll even be able to “see” not only how your app works, but even how particular changes in code affect memory usage.

Thanks for reading! We hope this post was helpful. Give dotMemory 4.3 a try and explore the Dominators and Call Tree charts.

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

TypeScript and ECMAScript 6 in ReSharper 9.1

As you may know, the working draft of ECMAScript 6 standard has reached the Release Candidate stage. TypeScript, starting with version 1.4, aligns more closely with this new standard while adding some new features of its own. We on the ReSharper team follow the development of both technologies closely: ReSharper 9.1 already provides full support for TypeScript 1.4, as well as initial support for ECMAScript 6 and TypeScript 1.5.

ECMAScript 6 features

ReSharper 9.1 fully supports the following ECMAScript 6 features:

Template strings

ReSharper understands template strings and tagged template invocations and provides support for them in its code assistance features.

Rearrange code works for template string arguments:

es6_templates_rearrange

Parameter info for tagged templates invocations:

es6_templates_param_info

Create from usage allows you to create functions from tagged template invocations:

es6_templates_create_from_usage

In addition, ReSharper now provides a refactoring for introducing a variable from a selected substring and adding a new template argument for it:

es6_intro_var_demo

Of course, ReSharper will also suggest converting your string-expression concatenations to template strings where possible:

es6_convert_template_demo

2) Lexical, or block-scoped, declarations

ECMAScript 6 introduces the notion of block-scoped declarations, let and const. These declarations, unlike the function-scoped var, are available only within the lexical block-like construct in which they are embraced.

ReSharper provides support for such declarations, as well as inspections and bulk quick-fixes which enable you to convert your var declarations to let and const, if possible. After the conversion it will suggest moving some variables closer to their usages:

es6_block_scope_demo

Also, the Introduce Variable refactoring now lets you choose variable type:

es6_intro_var_kind_demo

3) Lambda expressions

ECMAScript 6, similar to TypeScript, now has lambda expressions. ReSharper supports them and provides a context action to convert between lambda representations:

es6_demo_lambda

4) Destructuring: bindings and destructuring assignments

ECMAScript 6 introduces destructuring assignments and variable declarations. That means that you may provide a pattern to assign a specified path from the assignment source to some variable or expression. ReSharper 9.1 now supports this feature.

es6_destructuring_2

Note that Visual Studio doesn’t currently support all standard options for destructuring declarations and assignments, meaning that valid ECMAScript 6 code may be red in Visual Studio:

es6_false_positive_vs

5) New numeric literals

ECMAScript 6 introduces a new kind of octal literal as a 0O + number, and binary literals as 0B + numbers. As with the other numeric literal types, ReSharper provides you with an option to convert between these forms and their decimal representation.

es6_literals

As ECMAScript 6 is a huge extension over its predecessor, it’s taking us more time to polish features for it. At this time, ReSharper offers initial support for some of the new ECMAScript features, including for-of loops, computed property names, generators, class declarations, and modules.

es6_keyword_completion

We’re hard at work to bring you full support for ECMAScript 6 in the next versions of ReSharper. Stay tuned.

Oh, and please note that ECMAScript 6 support should be explicitly enabled in ReSharper options:

es6_set_level_demo

TypeScript 1.4

TypeScript 1.4 brought several new features which ReSharper now fully supports.

Union types represent a notable extension of TypeScript’s type system. With their help, you can avoid losing type information for entities which cannot be represented by a single type.

ReSharper 9.1 provides full support for union types code generation, quick-fixes and context actions. For example, implemented members now use union types whenever possible, and you may specify corresponding union types explicitly for variables which have ‘any’ type.

ts14_unions

Union types are accompanied by type guards, which allow you to limit the variable type in a scope surrounded by a type check. ReSharper 9.1 supports them too:

ts14_guards

TypeScript 1.4 also introduced type aliases, for providing your own names for complex type combinations. As an extra bonus, ReSharper substitutes them with the aliased type in contexts where the corresponding type alias is not available.

ts14_type_alias

And finally, lexical declarations and template strings were integrated into TypeScript 1.4, and they are supported by ReSharper to the same extent as for plain ECMAScript 6.

ts14_es6

TypeScript 1.5

TypeScript 1.5 is coming, representing an even bigger step forward compared to ECMAScript 6 support. ReSharper is catching up with the new features introduced into the language.

Destructuring variable declarations and assignments are supported:

ts15_destructuring

ReSharper is also aware of ES6-style export and import declarations, and provides familiar assistance to what you had with TypeScript’s own exports and imports:

ts15_new_imports

Starting with TypeScript 1.5, it’s no longer possible to use TypeScript-style exports and imports when targeting ECMAScript 6. No problem! ReSharper will help you migrate your code to adhere to this new requirement:

ts15_convert_obsolete_constructs

TypeScript 1.5 also introduces the notion of well-known symbols from ECMAScript 6, and they are fully supported, too:

ts15_well_known_symbols

And finally, the for-of loop is supported:

ts15_forof

Note that TypeScript 1.5 support in ReSharper 9.1 is still experimental and has the following technical limitations:

  • Simultaneously exporting “default” and other elements from a module is not currently supported by ReSharper 9.1.
  • Using ECMAScript 6 specific features requires you to add “lib.es6.d.ts” file to your solution. For use with ReSharper it should be renamed to “lib.d.ts”.
  • Decorators are not currently supported.

All these technical limitations will be addressed in the next version of ReSharper, which is expected to provide full support for TypeScript 1.5.

Posted in How-To's, ReSharper Tips&Tricks | Tagged , , , | 12 Comments

Understanding how SQL queries impact app performance, with dotTrace 6.1

Application performance depends on a huge variety of factors: code design, web server performance, possible network lags, and so on. Effective execution of SQL queries is an additional concern. Naturally, you want your profiler to cover as many of these performance aspects as possible.

In dotTrace 6.1 we introduced the long-awaited ‘SQL queries profiling’ feature. Now you can get exact data on how long a particular query took to execute, as well as what method ran the query.

Important notes:

  • SQL queries can be profiled only in the Timeline profiling mode.

  • The feature is available not only when profiling standalone applications, but also when you attach dotTrace to an already running process.

  • The following data providers are supported: SQLClient, OLE DB, Entity Framework, and ODBC.

  • As dotTrace uses ETW for collecting SQL events, profiling overhead is minimal. SQL query time is measured very accurately.

Now, let’s take a look at how it works.

How This Works

The only change you’ll notice in the UI is the new SQL Client filter in Interval Filters. Your workflow in Timeline Viewer is still straightforward: after profiling your app, you can start by looking at the Interval Filters.

Interval Filters

In our example, the app works with SQL for 497 ms. Let’s investigate how.

SQL Client Subfilters

Once the SQL Client filter is on, two more sub-filters appear: SQL Client: Connection String and SQL Client: Command. The first one is helpful in case your app uses several SQL connections. The second one shows how SQL Client time is distributed among particular SQL queries. In other words, it shows how long a particular query took to execute.

As query contents may be long, investigating them in the small Filters window could be problematic. That’s why we added a separate SQL Queries window which formats queries for a more convenient view:

SQL Queries Window

After you find a problematic query, the next step is to determine its origin, i.e. the method that called it. The SQL Queries window (like all other windows in Timeline Viewer) can work as a filter. Double-click a particular query, and all other filters (including Call Stack) will show data only for the time interval when this query executed:

Top Methods

Top Methods will show us the method that is responsible for running the query. Once you select the method in Top Methods, the Source View will show its code:

Source View

Thanks for reading! We hope you’ll find this new feature useful. Do try it on your own by downloading the latest dotTrace 6.1.

 

Posted in dotTrace Tips&Tricks, How-To's | Tagged , , | 3 Comments

C# 6.0 support in ReSharper 9.1

One of the interesting challenges in creating an IDE is tracking changes to a language as it evolves. ReSharper 9.0 shipped with early support for C# 6.0, but the language wasn’t done yet. Now that the design is stable, the recently released ReSharper 9.1 provides full support for the new language features. It obviously understands the new syntax, but also includes new functionality to take advantage of the changes in C# and to help bring your code up to date with the new language version.

In many respects, C# 6.0 is an incremental update to the language. There are no major features like LINQ or async/await. Instead, we have a number of syntax changes that reduce some of the boilerplate and ceremony of writing C#. Put together, these new features allow us to write code that is terser, shorter and easier to read.

Let’s take a look at how ReSharper supports some of these features.

Auto-properties

C# 6.0 adds two new features to auto-properties – you can make them getter only, and provide initializers for them. A getter only auto-property is different to a property with a private setter in that it is immutable. A private setter can be called from anywhere else in the class, but a read-only auto-property can only be set in the constructor, or via a property initializer, much like a field can be initialized where it’s declared.

ReSharper’s inspections spot when a property’s setter is only called from the constructor, and marks the unused setter as dead code. A quick Alt+Enter, and we’ve got a read-only auto-property:

Properties with redundant setter, converted to read-only auto property

Using static

While static methods are very useful, it can get a little verbose constantly having to qualify them with their class name. The ‘using static’ feature allows you to import the class in much the same way as you import a namespace. Once imported, you can access static members of that class without having to specify the class name. ReSharper offers Context Actions to easily import a class from the Alt+Enter menu, shows when qualifying the class name is redundant, and offers bulk cleanup:

Context action to convert references to the Math static class to a using static statement and back

Conditional access expressions

This is likely to be C# 6.0’s best loved feature. Null references are a fact of life to C# developers, and “if” statements have been the only way to handle them so far. The new conditional access operator “?.” will replace many of these null checks. Unlike the normal “.” dot access operator, the conditional access operator will not throw an exception if the preceding expression is null. Instead, it returns null and stops evaluating the rest of the expression. This is going to have a huge, positive impact on your codebase.

Convert if statements to conditional access operator

And of course, ReSharper understands how this operator (and indeed, the other changes to C# 6.0) affects the control flow of your code, and can use that to warn about possible null references, or redundant conditional access:

Control flow analysis of redundant conditional access operators

The nameof operator

C# is a nice, strongly-typed language. Usually, the compiler will check that we’re using valid type and member names, but this falls down sometimes, when we have to use “magic strings”, such as the argument name to ArgumentNullException, or a typename to Reflection, or property names for INotifyPropertyChanged. The compiler won’t check these values, and it’s easy to introduce errors, especially when we rename a type or member.

To help with these problems, ReSharper can resolve the argument name in ArgumentNullException, and has had extensive support for INotifyPropertyChanged since version 7. C# 5 introduced caller information attributes, and now C# 6.0 introduces a more generic mechanism – the nameof operator.

Instead of typing the name of a type or member as an opaque, constant string literal, you can now use the nameof operator and refer to the type or member as a symbol, and take advantage of C#’s strong typing, and compiler checking. If the symbol in the nameof operator is unknown, the compiler reports it as an error. And since it’s a symbol, ReSharper can include it in Find Usages, renames and will even provide suggestions to convert magic strings to usages of nameof:

Suggestion and quick fix to change magic string to nameof operator

String interpolation

This feature is intended to make it easier to format strings. On the face of it, string.Format isn’t exactly difficult, but again, it’s not type-safe. It relies on the order of format specifiers in a string, and the arguments passed being correct. If the order is wrong, the formatting is wrong, but you’ll only discover this at runtime. String interpolation provides a solution by specifying expressions inline, inside the format string. There’s no chance for mismatched specifiers and arguments, and no excuse for getting things in the wrong order.

ReSharper provides an inspection to convert string.Format calls to string interpolation, and naturally provides code completion and find usages and rename for members used in the expressions inside the interpolated strings:

Convert to interpolated string, show code completion and rename inside string

Expression-bodied members

Another feature designed to reduce the amount of boilerplate in your code. You can now define simple properties and methods using a lambda-like syntax, rather than wrapping the code in braces and newlines. They’re exactly the same as regular methods and getter only properties, but take less keystrokes. And, yes, we mean Alt+Enter.

Convert getter only property to expression bodied member

The real power of these features comes out when we combine them. Take this example. ReSharper shows us a suggestion that the null check can be replaced by the conditional access operator. Alt+Enter can quickly fix this up for us, and give us a simple return statement. Alt+Enter again invokes the “To expression body” context action, and we’ve now very quickly moved from a multi-line method to a simple, readable, single line method:

Putting it all together. Null propogation, inline variable, to expression bodied member

But what happens if you’ve got a C# 5.0 project, and you want to use the lovely new C# 6.0 features? By default, ReSharper won’t allow or suggest using new features for a project targeting an older version of the compiler. You can change the supported language level in the Properties window when the project is selected in Solution Explorer. Or take the easy route – if ReSharper complains that you’re using a newer feature, just use Alt+Enter to change the supported language level:

Enable language level from alt-enter

And of course, ReSharper understands the other changes to C# 6.0, such as dictionary initializers, exception filters and using await in catch/finally. The new C# 6.0 support requires Visual Studio 2015, and ReSharper 9.1, part of the ReSharper Ultimate suite of .NET tools.

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

Introducing ReSharper C++

Throughout its 11-year history, ReSharper has focused primarily on the .NET state of affairs. This commenced with support for C#, then VB.NET, and has slowly encompassed both the desktop (WinForms, WPF) as well as web (ASP.NET, HTML/CSS/JS/TS) languages and technologies.

Now, we are happy to announce the release of ReSharper C++ — a new product specifically targeted at modern C++ developers. Without wasting any more time, let’s talk about some of the features coming your way in this initial release.

Live Templates and Code Generation

ReSharper’s powerful Live Template ecosystem has been adapted to C++. This means that C++ benefits with support from the following:

  • Live templates act like Visual Studio’s snippets but are much more context-sensitive, offering hints as well as programmability options.
    Live templates in ReSharper C++
  • Surround templates let you pick a chunk of code and then surround it with a block of code such as an if or try-catch statement. Surround templates are instantly available on any selection via Alt+Enter:
    Surround templates in ReSharper C++
  • File templates let you generate either individual files or, indeed, several files at the same time. For example, the Class template can generate both the header and CPP files in one click.

In addition to generating code via live templates, ReSharper C++ supports quite an extensive Generate menu. Here’s a visual of some of the things you can generate:

Generate menu in ReSharper C++

Refactorings

An ability to change the structure of code while preserving correctness is ReSharper’s calling card, so here are some of the refactorings that are available out of the box:

  • Rename — this refactoring lets you seamlessly rename a symbol (e.g., a macros, a class or a field name) throughout the entire project. ReSharper automatically updates all usings of the symbol.
  • Introduce Variable — this refactoring lets you select a part of a calculation and introduce a new variable for it:
    Introduce Variable refactoring in ReSharper C++
  • Extract Method lets you extract a calculation into a separate function:
    Extract Method refactoring in ReSharper C++

Search & Navigation

ReSharper C++ lets you quickly navigate large code bases by providing the following navigation mechanisms:

  • Go to Everything lets you quickly find a particular entity (class, class member, file or folder name) in the entire solution. You can also filter the result set with Go to Type, Go to File or Folder and Go to Symbol.
  • Go to File Member lets you quickly find a member within the file you are currently working with.
  • You can Go to Base/Derived classes or class members and also quickly Go to Definition.
  • Go to Related Files lets you navigate to files related to your current position. This may involve, for example, a file with a declaration related to a definition you are working with, or an included file. Additionally, ReSharper supports an option to switch between header and source files.
  • Navigate to Specializations lets you find all the instances where a template is specialized:
    Navigate to Specializations in ReSharper C++

The Find Usages quickly finds all the locations where a particular symbol is used. It gives you a preview of what’s been found, with plenty of filtering and navigation options:

ReSharper provides plenty of contextual navigation, too. Pressing Alt+Enter on a symbol offers various navigation options:

Contect actions in ReSharper C++

In addition to the direct navigation facilities, ReSharper also provides a couple of tool windows for helping you navigate complex code bases. These include the File Structure window, which visualizes and helps you quickly navigate the structure of the currently opened file:

File Structure window in ReSharper C++

Another useful window is the Inheritance Hierarchy window which, as the name suggests, helps you quickly visualize the inheritance tree for a particular type:

Inheritance Hierarchy window in ReSharper C++

Finally, ReSharper provides general-purpose navigation options such as Go to Next/Previous Member, Go to Next/Previous Issue, and others. You can also jump to the containing declaration.

Code Analysis

As soon as you open up a C++ solution in Visual Studio, ReSharper starts analyzing your code and offering hints and suggestions. These may include things like having to add a namespace prefix and an #include statement:

Code Analysis in ReSharper C++

If you have a declaration without a definition, ReSharper will let you know, and will help you generate a definition – whether inline or in an implementation file:

Generate definition in ReSharper C++

If you are using a function such as printf(), ReSharper can check the arguments for you and offer fixes there, too:

printf() argument check in ReSharper C++

Macros and Templates

ReSharper processes macros and templates in their entirety, ensuring that the results of analyses always reflect the correctly postprocessed code. This lets it do some other things: for example, you can inline macro definitions:

Inline macro definitions with ReSharper C++

The same ideas of fidelity go towards macro evaluation: you can write a static_assert and ReSharper will instantly check this assert and complain if it doesn’t work:

static_assert checking in ReSharper C++

Conclusion

We have a video with a live demonstration of all of these features in action. Check it out:

With all that said, we invite you to check out ReSharper C++! It is bundled as an optional component of the ReSharper Ultimate installation — you can get a 30-day trial version here. Enjoy!

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

Updating from previous versions of ReSharper to 9.1 from within Visual Studio

Hello everyone,

Due to an unforeseen technical issue, updating from ReSharper 9.0.1 or ReSharper 9.1 EAP builds to ReSharper 9.1 RTM fails if you try to update from within ReSharper (via ReSharper | Help | Check for Updates). We apologize for the inconvenience that this issue might cause you and recommend the following workaround:

  1. Download ReSharper 9.1 RTM (full or web installer) from the web site
  2. Run the installer. It will automatically detect whether you have previous versions installed.
  3. If the Update option for ReSharper is not pre-selected, select it and proceed with the upgrade installation.
  4. Forgive us.

We hope that you enjoy the latest update despite this issue.

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

Meet ReSharper 9.1, ReSharper C++ 1.0, dotTrace 6.1 and more ReSharper Ultimate product updates

We’ve just finalized a joint update to our .NET tools, added the first ever public version of ReSharper for C++, and as a result, the new release of ReSharper Ultimate is now available for download!

Specifically, this update consists of ReSharper 9.1, dotTrace 6.1, dotCover 3.1, dotMemory 4.3, dotPeek 1.4, and ReSharper C++ 1.0, a new product to join the ReSharper Ultimate family.

ReSharper Ultimate update

In addition to 770+ fixes, ReSharper 9.1 highlights include:

  • Improved support for Visual Studio 2015 and .NET 4.6. ReSharper 9.1 integrates actions based on Visual Studio Roslyn, so when you want to make changes to your code, you can choose either ReSharper or Visual Studio to do it for you, from the same list of Alt+Enter actions:
    Visual Studio actions in ReSharper menu
  • Better C #6.0 support that makes it easier to migrate an existing codebase to C# 6.0. In addition to such language constructs as static usings and exception filters, we’ve added support for string interpolation and the nameof() operator. To simplify the process of migrating your projects to C# 6.0, ReSharper now offers quick-fixes to transform your code in the scope of a file, project or the whole solution.Quick-fix to use nameof operator
  • JavaScript and TypeScript support improvements including JSDoc support, as well as improved TypeScript 1.5 and EcmaScript 6 support and full support for TypeScript 1.4.
  • New Evaluate expression context action that allows previewing the results of your code execution right in the editor. You can learn and play with most of .NET base class library APIs without even running your application. ReSharper can evaluate nearly full set of C# expressions, including LINQ and some new C# 6.0 constructs, so you get REPL-like experience directly in the code editor. Evaluate expression context action
  • Improved code completion: we’ve implemented a new mechanism that lets you order items by relevance so that the best fitting options are suggested higher in the code completion popup list.
  • Find types on NuGet. Copy-pasting code from StackOverflow has never been easier: When you have a type or namespace used inside your project that can’t be resolved to referenced libraries or packages, ReSharper can now search for this type or namespace in the NuGet package gallery, display the list of matching packages and easily download and install the package that you choose. As most great things about ReSharper, the search on NuGet starts with pressing Alt+Enter:
    Obtaining references from nuget.org in ReSharper 9.1
  • New Source Templates that can be created anywhere in the code of your project as extension methods and might be very handy in case you need to produce some repeatable code that is only relevant in your current project or solution.
    Source Templates in ReSharper 9.1

The other .NET tools in ReSharper Ultimate have been enhanced as well:

  • dotCover 3.1 enhances MSTest and WinStore tests support and ships numerous fixes for console tools.
  • dotTrace 6.1 receives the long-awaited SQL queries support in Timeline profiling: Now you can determine exactly how long a particular query executed for and what method ran the query.
  • The rich set of informative views in dotMemory 4.3 is extended with Dominators sunburst chart. With just one glance at the dominators’ hierarchy, you know what objects are crucial and how memory is retained in your application.
    Sunburst chart in dotMemory 4.3
  • Welcome dotMemory Unit framework — state-of-the-art .NET memory monitoring. Extend your unit testing framework with the functionality of a memory profiler. Please check more details in our recent blog post.
  • dotPeek 1.4 adds support for Visual Studio 2015 and C# 6.0.

In addition to these upgrades to our .NET tools, we are rolling out the inaugural release of ReSharper C++. A separate product for C++ developers who work in Visual Studio, ReSharper C++ inherits most features of ReSharper including its powerful navigation, coding assistance and code generation. To learn more, please visit the ReSharper C++ web site and watch out for new blog posts.

In terms of licensing and upgrades, there are several options available:

  • ReSharper 9.1 is a free upgrade for you if you have a valid ReSharper upgrade subscription or a per-major-version license to ReSharper 9. Updates to dotMemory, dotTrace and dotCover are free if you have a valid upgrade subscription to the respective product or to ReSharper Ultimate.
  • ReSharper C++ can be purchased as a separate license or as part of ReSharper Ultimate. For pricing and licensing options, see ReSharper C++ Buy page.
  • You may purchase a single license for ReSharper Ultimate, which includes ReSharper, ReSharper C++, dotTrace, dotCover, and dotMemory. Learn more about ReSharper Ultimate.
  • If you need a formal quote or any other assistance, you are welcome to contact JetBrains sales.
Posted in News and Events | Tagged , , , , , , , | 28 Comments