ReSharper Ultimate 2017.1 EAP update: Visual Studio 2017 RTM and more

We are getting closer to the release date and working hard towards providing the finest coding experience to Visual Studio 2017 RTM users. If you are already using the latest release of Visual Studio, make sure to download ReSharper Ultimate 2017.1 EAP 5 to get the best support for its new features.

We have introduced quite a lot of improvements during this EAP, and today we’ll take a look at updates in our two latest EAP builds.

.NET Core and unit testing

A month ago we published a post covering unit testing of a .NET Core apps with ReSharper and gave a detailed explanation of why it worked only in project.json based projects. Now we finally have added support for .csproj based projects. ReSharper discovers and runs MSTest and xUnit tests and supports code coverage and profiling as well as targeting multiple frameworks. There’s also DataRow support for MSTest v2.
Note, that NUnit Engine does not currently support .NET Core projects and the dotnet-test-nunit adapter doesn’t work with the new .csproj format.

Polishing support for C# 7

All in all, ReSharper’s support for C# 7 has noticeably improved in the recent EAP. We’ve added a lot of inspections to comply with the compiler, introduced new quick-fixes, and updated existing ones with new language features.

ReSharper now displays errors in tuples more accurately. For instance, it can detect typos in variable names when overriding a method or implementing an interface.
Detecting errors in tuples

C# 7 removed certain limitations to throwing exceptions, so that developers can now use throw as part of the expression. ReSharper offers a quick-fix to Join null check with assignment, which makes the code more readable by combining the assignment, the null-coalescing operator, and throw. This quick-fix can be applied to a null check in a single statement, as well as to all relevant statements within the class or constructor, whole file, whole project or whole solution.
Join null check with assignment
We’ve also updated the existing context action Convert to ‘?:’ operator and the .throw postfix template to support C# 7 throw expressions. If you apply the context action to this example code:

you can quickly convert it to this:

The .throw postfix template generates a throw statement in the expression if it’s applicable:
.throw postfix template

Angular 2 and TypeScript

ReSharper’s code completion now works for component tags and attributes, as well as for [attr., [style., and [class..
Code completion for Angular component attributes

Component attributes have received support for one of the most frequently used navigation commands, Go to Declaration, which can be invoked by pressing F12 on an attribute.

The Rename refactoring works for component tags and for ‘foo’ in [].

We’ve also introduced several bug fixes in order to enable support for the new React and moment-timezone TypeScript typings.

Code formatting

C# formatting styles were enhanced with a few new options. You can now set spaces before and inside the parentheses of ‘nameof’, and choose your preferred wrapping style for chained binary expressions.
Wrapping style for chained binary expressions

ReSharper C++

On the C++ side of things, we’ve implemented initial support for the Open Folder mode and CMake projects. In particular, you can now run unit tests in such projects. Settings for the test run can be configured on a new C++ Tests page in ReSharper options.
Unit testing options page for C++ tests

Download the newest EAP build from our Early Access page, or if you have the previous builds installed get the patch by clicking Check for Updates in the ReSharper menu.

If you encounter any issues, please let us know here in the comments or via Twitter mentioning @ReSharper. And stay tuned the 2017.1 release is coming soon!

This entry was posted in How-To's and tagged , , , , , , , , , . Bookmark the permalink.

18 Responses to ReSharper Ultimate 2017.1 EAP update: Visual Studio 2017 RTM and more

  1. Pingback: ReSharper Ultimate 2017.1 – Alles zur neuen Version

  2. Pingback: Dew Drop - March 21, 2017 (#2444) - Morning Dew

  3. Dude says:

    Will there be a code fix to reference ValueTuple from NuGet semi-automatically?

  4. Ha Duong says:

    Do you have a release date in mind please?

  5. Nolan says:

    Somewhat off of Dude, will there be a fix for ValueTuples? Currently if I define “(string Text, TimeSpan Duration) params”, I see autocomplete shows “Text” and “Duration” but when I autocomplete it converts it to “Item1” and “Item2”

  6. Julien Brousseau says:

    On the EAP 7 I’m still having problem discovering xUnit tests, with the following exception thrown during exploration:
    Message = “
    dotnet exited unexpectedly with the code (-1)
    Output stream:
    Error stream: dotnet-test Error: 0 : System.InvalidOperationException: E:\\project.json does not exist.
    at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
    at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)

    ExceptionPath = Root.InnerException
    ClassName = JetBrains.ReSharper.UnitTestFramework.DotNetCore.Exceptions.ProcessExitedUnexpectedlyException
    HResult = COR_E_EXCEPTION=80131500

    Looks like it’s still looking for a project.json file?

    I can discover and run the same tests fine in the VS Test explorer

    • Svetlana Emelyanova says:

      There was an issue with unit tests discovery in this EAP. It is fixed in the next EAP that will be published today.

      • Julien Brousseau says:

        Hi! I just installed this morning the EAP 8 but the exploration is still failing with the same error message…

        • Svetlana Emelyanova says:

          Have you also installed the latest Visual Studio 2017 update?

          • Julien Brousseau says:

            Yes, running build 26228.10

            The xUnit tests are discovered correctly by VS, and I can run them fine with the Test Explorer, but they don’t appear in R# Unit tests explorer

            • Svetlana Emelyanova says:

              Ok, thanks. We are investigating this issue.

            • Fedor Buyvol-Kot says:

              Hi, Julien!

              Do you have global.json file in your project folder?
              If yes, could you please temporary remove it, restart VS and open your project. Does the problem persist?

  7. Jonney Shih says:

    Hi I’m new to ReSharper, concerning intellisense, is there a way for more advanced filtering, like filtering out deprecated members and inherited base members?
    That is a much requested feature for VS and would be an a huge selling point for me.

Leave a Reply

Your email address will not be published. Required fields are marked *