ReSharper has always wanted to make you more productive with your code. We already provide great tools for navigation and code completion, refactoring, inspections and running unit tests.
But how can we improve on what we’ve got?
How can we really help you, our customer, develop great solutions for your customers?
With Office 2003 hitting end of support, the answer was obvious – a much loved icon was also being retired.
We’ve offered him a job.
That’s right, Clippy is coming to ReSharper. And this isn’t just an announcement – you can download and install him right now, from the Extension Gallery (in Visual Studio, select ReSharper –> Extension Manager –> Online, search for “clippy”). Clippy supports ReSharper 8.1 and the recently released 8.2 (which is a free upgrade – grab it now!)
In the same way that he has provided help to millions of customers of the phenomenally successful Office suite, he can now live out his retirement helping developers produce the best code they possibly can, as quickly as they can.
He’ll help you navigate, he’ll help you refactor, he’ll help you generate code:
He’ll even help you run your tests!
Once you’ve installed the extension, there’s nothing more you need to do. Just open a solution, start working and Clippy will appear, ready and willing to help.
Download today, give him a go and let us know how you get on!
dotMemory 4 offers a lot of new functionality that helps you optimize memory usage in your applications, find memory leaks, and address other types of memory issues like never before.
Let’s have a closer look on features you can already try on:
Powerful automatic inspections
To ease your task, dotMemory automatically scans your snapshot for most common types of memory issues. These inspections can be a great starting point in analyzing a snapshot if you’re not sure where to begin.
Easy and comprehensive UI
While memory profiling has the reputation of being for pros only, dotMemory’s unique user interface lowers that entry barrier dramatically. You can start memory issues investigating straightforward.
Timeline view with real-time data collection
In order to monitor memory consumed by your application, get snapshots and drop them to compare in one click.
Multiple views on data
Examine objects in the heap from multiple views. Want to know how objects relate to each other? What objects do they reference and through what fields? Which calls created these objects? No problem! dotMemory has a view for everything.
Comparing memory snapshots
Comparing two snapshots is the main way to find objects that are causing a memory leak. Use the comparison view to find out how many objects were created between snapshots and how many objects were collected.
Analyzing memory traffic
Excessive allocations and garbage collections may imply significant memory management overhead. Use the traffic view to understand what objects are created/collected most intensively in your app and what functions are causing this memory traffic.
Profile apps not only on your local computer but on any computer in your network or on the Internet. Remote profiling is especially helpful when you need to profile a web app on a production server.
Picking the right moment to get a snapshot is very important for memory analysis. Use the dotMemory API calls to take snapshots at exact places of your code.
Support for various .NET applications
Profile apps based on .NET Framework 2.0 to 4.5.1, Silverlight 4, Silverlight 5, Windows Store and IIS applications.
Visual Studio integration
dotMemory integrates with Visual Studio so you can start a memory profiling session right from the IDE, whenever you need.
For a more detailed overview of dotMemory 4 Beta functionality, please check the brand new dotMemory 4 website. That’s right, dotMemory now has a dedicated website, albeit still in Beta.
By the way, the resources available for you to know dotMemory 4 even better:
Here’s why these updates can be attractive to you:
As you might have already heard, lately we’ve been working on improving your TypeScript coding experience with ReSharper. Here’s a quick overview of what we’ve done in this regard:
ReSharper 8.2 significantly expands TypeScript support with smart completion, Create From Usage quick fixes and Import Module context action, navigation combos, naming settings, support for generics and compiler defined errors highlighting. For details on these features, please see an earlier post, More TypeScript support in ReSharper 8.2.
Other enhancements including Quick Documentation fixes (including a fix to an epic bug that could be easily qualified as the best way to hang and crash Visual Studio), a long-awaited fix for the red code problem with Xamarin installed and another 140+ fixes.
Please note that not all ReSharper plugins are ready for 8.2 and if you’re using plugins, you’ll see update notifications from the Extension Manager as new updates become available.
dotCover 2.7 & dotTrace Performance 5.5.4
With this minor update dotCover receives a standalone test runner which can be most useful for running manual tests outside Visual Studio, as well as for analyzing coverage snapshots.
Both dotCover 2.7 and dotTrace Performance 5.5.4 provide integration with the updated ReSharper 8.2.
In terms of license eligibility, here’s a way to check if your licenses will work with these updates:
ReSharper 8.2 is a free upgrade for all personal and academic licensees who are eligible for ReSharper 8.0. It’s also a free upgrade with all commercial per-major-version licenses to 8.x, and with commercial subscription-based licenses purchased or renewed on March 21, 2013 or later.
dotCover 2.7 is a free upgrade for all licensees who have purchased or renewed their licenses on March 21, 2013 or later.
dotTrace Performance 5.5.4 is a free upgrade for all dotTrace Performance 5 licensees.
When we announced TypeScript Support in ReSharper 8.1, we promised you a lot more to come. It’s time to deliver on that promise. Here are some of the things we’ve added in ReSharper 8.2:
Support for generics as well as many improvements to ReSharper’s type resolution mechanisms.
Create from usage lets you start using code constructs first and create them later.
This mechanism supports creation of many different constructs such as creation of modules or enum members from usage. ReSharper now also honors Member Generation settings for usage-generated TypeScript code.
Compiler-defined errors (only syntax errors, for now) are highlighted. These errors are accompanied with over 50 quick-fixes:
Naming support has been added: ReSharper will now check your code against the TypeScript naming settings:
and will offer to fix things for you:
Navigation up and down the inheritance hierarchy (Alt+Home and Alt+End respectively) now works for both type declarations as well as type members.
Support for modules in navigation (Go to Symbol Shift+Alt+T/Go to Everything Ctrl+T):
The Import Module context action lets you automatically add the right import statements when an external module is used:
Smart completion support (Ctrl+Alt+Space): ReSharper can filter out a completion list leaving only structurally compatible subtypes, as shown below:
Jasmine support, including support for version 2.0:
To add support for Jasmine via TypeScript, simply include both original Jasmine (jasmine.js) as well as the DefinitelyTyped package (jasmine.d.ts) and then reference the .d.ts file via the <reference> construct, and you’re good to go. Your project will likely look something similar to this:
As always, we aim to deliver additional new features (and improvements to existing ones) in the near future. Meanwhile, we hope you enjoy this update that is available starting ReSharper 8.2 EAP. Until next time!
One of the most popular questions we’re facing as soon as we push a new release is whether it works faster than before.
ReSharper performance has a ton of dependencies related to hardware, Visual Studio configuration (including other installed extensions as well as native VS components like XAML Designer) and ReSharper’s own configuration. Nevertheless, the team always finds ways to improve the product’s performance. This is an ongoing process across all our releases, and 8.x is no exception.
Let’s take a look at where exactly ReSharper 8.x became faster: overall UI responsiveness, coding assistance, code analysis, and unit testing. No mile-length lists*, just highlights.
When the auto-completion pop-up takes seconds to appear, I get the urge to smash the monitor or throw my keyboard across the room. Can you blame me? Well, since the coding assistance improvements in ReSharper 8.x I’ve gotten way more peaceful, and hopefully you will too.
Lower Impact on Typing
All phases of code completion have become interruptible. What does this mean for you? Typing should be much smoother now as it doesn’t interfere with coding assistance.
Faster Displaying of Lookup Items in Pop-Ups Now we cache all lookup items in Intellisense, meaning it works faster on the second run and all subsequent ones. For example, here are two call stacks taken with dotTrace for ReSharper 7 and ReSharper 8 correspondingly. Both reflect the second run of an auto-completion pop-up showing a list of graphic files available for selection within the project. VS 2012 with ReSharper 7 VS 2012 with ReSharper 8 Thanks to caching introduced in ReSharper 8, the method that gets the results completes 16 times faster.
Code analysis is also an area we consider to be crucial from the performance perspective. Even though solution-wide analysis is carried out in the background, poor performance here can lead to noticeable lags in Visual Studio. That’s why we’ve made some tweaks in this area.
Optimized Solution-Wide Analysis
Solution-wide error analysis (SWEA) now utilizes the CPU much more efficiently. As a result, SWEA is finished a little bit faster, especially on complex solutions. What is more important, solution-wide analysis has a lower impact on the UI, thus improving its responsiveness.
On the screencasts below, you can see how typing performs in ReSharper 7 and 8 at the same stage of solution-wide analysis. VS 2012 with ReSharper 7 VS 2012 with ReSharper 8
It’s no secret that most of these problems are related to numerous tasks that ReSharper is doing in the background. These background tasks became our main target for optimization in 8.x releases.
Faster Solution Building / Loading We’re constantly working to reduce ReSharper’s impact on the performance of Visual Studio’s native features. As our tests show, Visual Studio with ReSharper 8.x builds a solution up to two times faster than Visual Studio with ReSharper 7. Moreover, VS with ReSharper 8.x loads a solution nearly 20% faster.
Faster Caching ReSharper loads its caches much faster now. Among many improvements here, we optimized the way ReSharper works with its database that stores caches. The database (and your hard drive) is now accessed far less frequently.
As a result, there are no lags when typing while the caches are being loaded. Exact numbers are difficult to evaluate as they are highly dependent on solution complexity.
Optimized Memory Usage We did our best to minimize memory traffic in main ReSharper usage scenarios. This should significantly lower the number of cases when Visual Studio UI hangs for a moment and then continues working. For example, consider such a common operation as Find Usages. The diagrams below show memory traffic (for ReSharper 7 and 8 correspondingly) when searching for all string usages in a large project. VS 2012 with ReSharper 7 VS 2012 with ReSharper 8 As you can see, the traffic in ReSharper 8 has dropped 15%. As we said before, large memory traffic causes excessive Garbage Collections which, in turn, lead to UI freezes (true for GCs longer than 200 ms). If you want to know how we fight such bottlenecks, it’s a combination of the Timeline view* in dotTrace and a new dotMemory tool (yep, we’re strong dogfooding followers). Timeline in dotTrace allows detecting all UI freezes (yellow stripes on the timeline diagram show Blocking GC) while dotMemory lets us determine exact objects that cause the traffic.* (This view will be available in the upcoming dotTrace 6.0.) The snapshot was taken when typing during solution-wide analysis.
The unit testing subsystem was also redesigned for ReSharper 8 to eliminate the key annoying lag that users complained about in ReSharper 7.
Faster Start of Unit Tests
We’ve entirely reworked the way ReSharper runs tests. ReSharper 7 took a lot of time (whole seconds) before the tests were actually run. In ReSharper 8.x, it’s no longer a problem: tests are run almost instantly. VS 2012 with ReSharper 7 VS 2012 with ReSharper 8
Your Help is Invaluable in Improving ReSharper’s Performance
Of course, we would never be able to find all these issues without the ReSharper community. Yes, we mean you, our valued customers and fans!
The main problem when fighting performance issues is that they are very hard to test and reproduce. The thing is, they are very sensitive to the environment: the complexity of your solution, installed Visual Studio plugins or NuGet packages, system components, and other factors. For obvious reasons, we are unable to test ReSharper on all possible environment combinations. And that’s where you can help us tremendously.
If you suspect ReSharper may be slowing down your work in Visual Studio, follow these steps to make sure that ReSharper is indeed the culprit. If it is, run the built-in dotTrace profiler (go to ReSharper | Help | Profile Visual Studio), profile Visual Studio and send a performance snapshot our way. We will look at your performance snapshot, locate the bottleneck and do our best to fix it.
As outlined above, we made a lot of performance optimizations to bring you the improved ReSharper 8.x. But of course we’re not stopping there. For ReSharper 9, we plan to do a lot more work in terms of improving performance. Stay tuned!
In this webinar we explore the new dotMemory 4 memory profiler. We share our view on why one may want to use a memory profiler and show how easy it is to use dotMemory to find and solve memory issues.
Even if your program is just a few lines of code, .NET’s runtime will create a number of objects in memory. Are all objects being destroyed by the garbage collector? Or is there a potential memory leak? And why is the application seemingly slow when having lots of objects in memory? Find out in this webinar.
Below are select questions and answers from our webinar:
Has dotMemory 4 been released already? No, not yet. We currently have an EAP version available for everyone to try. Do give us feedback if you’re using it! The final release will be there around the end of April.
Can dotMemory profile .NET 4.0 applications? Yes it can! dotMemory allows memory profiling of applications written in .NET (all versions up to 4.5.1) and Silverlight, as well as Windows Store applications.
Maarten 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.
Do you recall how we announced that ReSharper was going to support C++ last summer? Well we’re still serious about that: as serious as the folks who are working next door on a separate, cross-platform, IntelliJ-based C++ IDE.
We’ve been running private ReSharper C++ Early Access Program (EAP) for several months now. Out of 1200+ developers who subscribed to receive private builds, over 600 did in fact receive them. Great thanks to all subscribers who, by virtue of submitting info about their development environments, helped us significantly in sorting out what to support in a priority fashion and what to leave in the backlog for now.
As we now have a sufficiently good idea of how devs are working on C++ in Visual Studio, there’s little sense to keep the gates closed. That said, we’re now opening ReSharper C++ EAP to the public.
Before you go and download and play with the latest EAP build though, you should totally read the following and mind the limitations that are inherent to the current state of ReSharper C++ EAP. Here are the things you should know about ReSharper C++ EAP.
What is supported
C, C++03 and a part of C++11
Code bases up to 40Mb
Most Boost libraries
What is not supported
Code bases exceeding 40Mb
Microsoft libraries including MFC, ATL and WTL
Certain C++11 features including variadic templates, raw string literals and trailing return types. Lambdas are supported partially
An array of MS preprocessor extensions
An even wider array of MS C++ extensions
If you’re not sure if a C++11 feature or an MS C++ extension that you’re using is supported, the ReSharper C++ EAP page contains a full list of known issues and unsupported items, which you’re highly encouraged to examine before you decide to download and install an EAP build.
We’ve been working hard on fixes and especially on improved TypeScript support, and we’ve decided that the number of new features should be a whole new version, and not just a maintenance release. We’ll publish a blog post soon taking a look at some of the changes.
As ever, with a new minor release, we’ve got some changes to APIs, which means existing plugins need to be updated. Plugin devs can find some guidance on our resharper-plugins Google Group.
You can download ReSharper, as well as the ReSharper Command Line Tools from the ReSharper 8.2 EAP page. Give it a go, let us know how you get on.
The recording of our February 13th webinar with Igal Tabachnik, ReSharper Secrets, is now available on JetBrains YouTube Channel.
In this session you will learn about ReSharper hidden gems, powerful annotations and 3rd party plugins to help you become a true ReSharper ninja!
Watch as Igal takes you behind the scenes of ReSharper and shows you how to use this knowledge in your own code, to get even more out of ReSharper. The intended audience is intermediate-to-advanced ReSharper users.
We received a lot of questions during the webinar and we’d like to use this opportunity to include the most frequently questions, as well as those we didn’t have a chance to answer during the webinar.
Q&A on Igal’s Visual Studio setup and ReSharper plugins that he uses
Q: Where does that “number of references” annotation in Igal’s Visual Studio come from? A: It is called CodeLens. This feature is a part of Visual Studio 2013 Ultimate but is not included in any of Visual Studio’s lower-end editions. Addressing a related question, no, we’re not planning to replicate the functionality of CodeLens in ReSharper.
Q: What ReSharper plugins does Igal use? A: He uses a whopping 14 of them! Here’s the full list:
If you’re using ReSharper 8.0 or above, go to ReSharper | Extension Manager to install any of these plugins.
Q: What was the tool that changed .var into a variable assignment? A: This cool plugin is called Postfix Templates. If you want to have it installed, go to ReSharper | Extension Manager | Online and search for postfix. If you’re ready to contribute, here’s the plugin’s github repo.
Q&A on code annotations
Q: Does using ReSharper’s code annotations have any performance impact? A: No. They are just attributes, thus they do not affect your compiled assembly’s performance. As for ReSharper performance, the attributes are cached and the analysis is run even without attributes, so there is no performance difference there.
Q: What do I need to do exactly for importing the annotations? A: There are two options. First, you can paste the source code of JetBrains annotations into your project. To do that, go to ReSharper | Options | Code Annotations | Copy default implementation to clipboard. Paste that into a new file, and you’re done. The second option is to reference a library called JetBrains.Annotations.dll that you can take from ReSharper’s installation folder.
Q: Can I have a single annotations file in the entire solution, or is Annotations.cs created for every assembly/project you create? A: You are free to put Annotations.cs in a shared assembly, as long as it’s referenced.
Q: Do I need to ship the library containing annotations with my code? A: If you add annotations by referencing JetBrains.Annotations.dll, then yes, you’ll need to ship the dll with your application. If you add them as a source file, they are compiled in your assembly, and there are no extra references to ship.
Q: What if a project uses ReSharper annotations, but another developer does not have ReSharper installed? Do these annotations work for them? A: No, the warnings and analysis are provided by ReSharper. The annotations essentially provide hints for ReSharper’s analysis. If you don’t have ReSharper installed, they are just attributes that no one uses.
Q: Can I make ReSharper treat everything as [NotNull] by default so that and I can use [AllowNull] instead? A: You can change ReSharper’s default assumption by going to ReSharper | Options | Code Inspection | Settings and change the value of Assume entity value can be null. The default value is optimistic (assumed to be not null) but you can change it to pessimistic (assumed to be null).
Q: Regards [Pure] can ReSharper not simply look at the method return type as not being void instead? A: No, because e.g. string.ToUpper() is a pure method. It returns a new string without changing any of the fields of the current string instance. Calling it without assigning to a variable is pointless. If we add [Pure], ReSharper will warn you that the return value is unused.
Igal Tabachnik is a software developer from Israel, who values clean code, test-driven development and continuous refactoring to reduce complexity, reduce bugs and achieve better design. He frequently speaks at local ALT.NET and Software Craftsmanship user groups. Igal is also the author of the Agent Mulder plugin for ReSharper, a plugin that helps ReSharper understand DI containers, providing navigation to and finding usages of types registered or resolved by those containers.