Async CTP Support in ReSharper 6.1
This post is about ReSharper 6.1. For other features in ReSharper 6 (both 6.0 and 6.1), please see previous posts introducing ReSharper 6:
- ReSharper 6 EAP is Open; Details on JavaScript Support
- CSS Support in ReSharper 6
- ReSharper 6 Bundles Decompiler, Free Standalone Tool to Follow
- ReSharper 6 Enhances Suggestions with Explanations
- ReSharper 6 Introduces support for JavaScript Unit Testing with QUnit
- ReSharper 6 Enhances Razor Support
- File Header Macros in ReSharper 6
- ReSharper 6.1 EAP Opens: Much more than a bugfix
- ReSharper Settings in 6.1
If there was one feature that has received ample attention in the run-up to ReSharper 6.1, it would have to be the request for async/await support. Despite the fact that this technology has not yet been finalized, community demand as well as the timely release of a preview version of Visual Studio vNext have convinced the ReSharper team to put in the effort to provide quality support for Async CTP.
And we’re not talking just about support for the keywords, either! The following is a list of some of the features that make working with the new features easy and enjoyable.
- Keyword completion — somewhat unsurprisingly,
async
andawait
are now keywords that ReSharper knows about:
- Smart completion supports
async
methods too. In the example below, ReSharper knows that anint
return type is expected, and offers appropriate suggestions.
- ReSharper enforces naming conventions for
async
methods. The “Async” suffix is configurable in the Options dialog.
- When changing your methods to become
async
, you can correct the return type of anasync
method:
- ReSharper verifies
async
propagation, so if you forget to decorate anawait
‘ing method withasync
, you will be reminded to do this:
This also works in cases where the method is anonymous (i.e., a delegate or lambda expression):
- ReSharper will also complain about the synchronous execution of
async
methods that do not contain anyawait
instructions in them:
- Finally, ReSharper comes with a set of analyses helping you ensure correct usage of
async
andawait
constructs. For example, in the screenshot below, ReSharper would complain about the fact thatref
andout
parameters are not permitted in anasync
method, as well as the fact thatnull
is not awaitable:
Finally, async
support permeates various areas of ReSharper infrastructure such as, e.g., its support in SSR (Structured Search & Replace). Overall, the async
and await
-related features have established themselves in the product, where they will stay and be improved upon until the technology’s eventual release.
Daniel says:
November 29, 2011I think the first priority is to improve dramatically the performance of 6.0.
With VS 2010 it is *appalling*, especially in js and Razor files.
On a quad-core laptop @ 2.5GHz, with 8 GB of RAM, SSD disk, it is very, very slow.
If the performance stays the same, I’m seriously considering giving up on using Resharper, even ask for a refund.
Jura Gorohovsky says:
November 30, 2011@Daniel
Apart from introducing some new features and improvements to existing functionality, 6.1 is first and foremost a bug and performance fix release. Indeed, we have received complaints on performance in version 6.0: we have already fixed over 100 performance problems, and we’re on our way to fixing ~80 more for final 6.1 release.
That said, if you have tried a 6.1 nightly build and it didn’t get any better for you performance-wise compared to 6.0, I urge you to provide us details about your performance problem as soon as possible so that we’re able to actually fix it for 6.1. We typically request a performance snapshot of VS+ReSharper in order to be able to solve a particular performance problem.
Thank you
Daniel says:
November 30, 2011I haven’t tried the 6.1 nightly because I’m rather cautious about installing software that is not RTM, but I’ll try this one.
Matt says:
November 30, 2011I’d really rather you fixed the bugs in 6.0, rather than adding support for a CTP that will probably end up changing.
You released 6.0 to a deadline, rather than when it was ready, and it shows. I ended up uninstalling it and going back to 5.1.
Jura Gorohovsky says:
November 30, 2011@Matt
Do current 6.1 EAP builds have any outstanding bugs from 6.0 that are relevant to you?
john says:
December 1, 2011Is this for C++ only or it’s work on C# and VB?
Dmitri Nesteruk says:
December 1, 2011@john
This is only for C# and VB. ReSharper currently does not provide support for C++.
phil says:
December 13, 2011Nice! Does it have some cool suggestion to use await in certain situations, for example, when handling an method returning task or something? Like foreach to linq, we get convert to async method? =)
David says:
January 4, 2012I think the performance of resharper is just fine. I’d rather see deeper analysis than faster performance.