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:
- CSS Support in ReSharper 6
- ReSharper 6 Bundles Decompiler, Free Standalone Tool to Follow
- ReSharper 6 Enhances Suggestions with Explanations
- 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,
awaitare now keywords that ReSharper knows about:
- Smart completion supports
asyncmethods too. In the example below, ReSharper knows that an
intreturn type is expected, and offers appropriate suggestions.
- ReSharper enforces naming conventions for
asyncmethods. The “Async” suffix is configurable in the Options dialog.
- When changing your methods to become
async, you can correct the return type of an
- ReSharper verifies
asyncpropagation, so if you forget to decorate an
await‘ing method with
async, 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
asyncmethods that do not contain any
awaitinstructions in them:
- Finally, ReSharper comes with a set of analyses helping you ensure correct usage of
awaitconstructs. For example, in the screenshot below, ReSharper would complain about the fact that
outparameters are not permitted in an
asyncmethod, as well as the fact that
nullis not awaitable:
async support permeates various areas of ReSharper infrastructure such as, e.g., its support in SSR (Structured Search & Replace). Overall, the
await-related features have established themselves in the product, where they will stay and be improved upon until the technology’s eventual release.
Subscribe to Blog updates
Thanks, we've got you!
Another Look into the Future with Rider’s Predictive Debugger
In the 2023.2 release cycle, we’ve introduced the Predictive Debugger in ReSharper, which gives you predictions about code paths and variables beyond the current execution pointer. We’ve written extensively about its advantages compared to alternative debugging strategies like thorough thinking, log…
Visualize Entity Framework Relationships and Additional Query Analysis in ReSharper 2023.3
A lot of teams are using Entity Framework or EF Core to work with their database. As an Object-Relational Mapper (ORM), it bridges objects in code to a relational database model, so that as a developer you don’t have to worry too much about the actual database. We all know: that’s not entirely tr…
Automatically Analyze ASP.NET Core Performance With Dynamic Program Analysis
Slow web pages may make your users or customers abandon your web application, even before they’ve had a proper look at it. You’ve likely also been frustrated working with a web application that is slow to load. The good news is that the latest versions of ReSharper and JetBrains Rider’s Dynamic P…
OSS Power-Ups: MassTransit – Webinar Recording
The recording of our webinar, OSS Power-Ups: MassTransit, with Chris Patterson, is available. This was the thirteenth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webinars.…