ReSharper Ultimate 2016.1 (formerly 10.1) EAP 6
Hello everyone. This week we have published a new EAP build of ReSharper Ultimate 2016.1 (formerly referred to as ReSharper Ultimate 10.1), bringing new fixes and improvements.
(If you’re wondering why a sudden change of versioning, please see JetBrains Toolbox — Release and Versioning Changes.)
Below is what we have added in this latest build.
Out-of-the-box xUnit.net support
The xUnit.net test framework has seen a large rise in popularity recently, including being the framework of choice for Microsoft’s cross platform, open source .NET Core project, and is the officially supported way of running tests for DNX projects.
While ReSharper has had support for xUnit.net for many years, it has always required installing a separate extension. Starting with EAP 6, ReSharper now provides support for xUnit.net directly in the product. This means ReSharper will discover your tests, and allow you to run and debug them, right from the editor, without requiring any extra extensions.
Furthermore, ReSharper Ultimate users will also be able to profile tests, get code coverage and use xUnit.net in Continuous Testing sessions.
One thing to note is that this build does not yet support running tests for DNX projects, this will hopefully be included in a future build.
New code style features
There are two new features to further extend the level of detail of your code style. As usual with code style, the new features are configurable and can be applied as part of code cleanup.
Using named/positional arguments
Consider the following method call:
AddCheckbox(true, true, "AutoFill", null);
When you read this code, you have to stop and examine the method signature to understand what happens here. With named arguments, the call becomes much clearer:
AddCheckbox(enabled: true, value: true, label: "AutoFill", tooltip: null);
Now, if you prefer to have named arguments for specific types, you can do so with a little help from ReSharper. In the Code Editing | C# | Code Style page of ReSharper options, define for which types of parameters you prefer to use named arguments, and the corresponding suggestions will be added to the list of quick-fixes:
In addition, even if you do not have any style preferences for arguments, you can always press Alt+Enter on any named or positional argument and choose to add or remove the argument name.
Braces for single-line statements
C# specification allows you to safely omit braces around single nested statements in some parent statements, e.g.
foreach, etc. However, code style guidelines may differ in this regard: some consider the braces here as a requirement, some consider them redundant.
Whatever style you prefer, ReSharper now helps you have consistent use of braces throughout your code base. Preferences for each kind of code block can be configured separately in a code style options page, and ReSharper makes sure to respect these preferences:
Here is the full list of fixes for ReSharper in this EAP build.
This build brings some bug fixes and a few UI improvements to the Continuous Testing Session window. Quick search results are now highlighted in the coverage tree, and a button is added to explore the stack trace of the selected test in Stack Trace Explorer:
dotMemory Unit 2.2
There is another small improvement that have to do with dotMemory Unit. While only constant values can be used when initializing attribute properties, there was a problem of defining user-specific directories for
DotMemoryUnitAttribute.Directory property when saving workspaces. Now there are three new constants that evaluate to
%LOCALAPPDATA%. You can either use the constants from the
SpecialDirectory class, e.g:
[DotMemoryUnit(Directory = SpecialDirectory.User + "MySubDirectory")]
or simply write one of these constants in angle bracketes (
[DotMemoryUnit(Directory = @"<User>/MySubDirectory")]
The mandatory call to action
If you haven’t done it already, please download the latest ReSharper Ultimate 2016.1 EAP build.
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.…