C# 7.0 and 7.1 support in ReSharper – Async main

ReSharper support for C# 7 and C# 7.1Many developers have been wishing for an async main method to be able to use async/await constructs in console-based applications. The good news is that C# 7.1 introduces support for this (spec)! ReSharper (and Rider) do so, too.

Let’s continue our blog series about ReSharper support for C# 7.0 and C# 7.1 with an episode that covers how ReSharper handles this new keyword.

In this series (we will update the table of contents as we progress):

Continue reading

Posted in How-To's | Tagged , , , , , | Leave a comment

C# 7.0 and 7.1 support in ReSharper – Expression-bodied everything

ReSharper support for C# 7 and C# 7.1Today, we continue our blog series on ReSharper support for C# 7.0 and C# 7.1. The previous post touched on throw expressions (spec) and ReSharper’s inspections, quick-fixes and context actions around these language features.

Today, let’s talk about expression-bodied methods, properties, local functions, constructors, destructors and event accessors. Or in short: expression-bodied “everything”!

In this series (we will update the table of contents as we progress):

Continue reading

Posted in How-To's | Tagged , , , , , , , | 2 Comments

C# 7.0 and 7.1 support in ReSharper – Throw expressions

ReSharper support for C# 7 and C# 7.1Let’s continue our blog series about ReSharper support for C# 7.0 and C# 7.1! We’ve already blogged about how ReSharper (and Rider) handle out variables, today we’ll look at throw expressions (spec) that are available in C# 7.0.

Throw expressions allow us to throw exceptions from almost any expression, making our code more concise and readable. ReSharper adds inspections, quick-fixes and context actions around these language features.

In this series (we will update the table of contents as we progress):

Continue reading

Posted in How-To's | Tagged , , , , , , , | Leave a comment

C# 7.0 and 7.1 support in ReSharper – Out variables

ReSharper support for C# 7 and C# 7.1Back in February, we wrote a State of the union about ReSharper C# 7 support, based on ReSharper 2016.3. Since then, a number of improvements have been made, both to C# as well as ReSharper (and Rider, which gets language support updates from ReSharper for free).

ReSharper 2017.1 and 2017.2 both bring better support for C# 7.0 and C# 7.1, with a number of new inspections, quick-fixes and context actions. ReSharper understands the new syntax and constructs that C# 7.0 and C# 7.1 bring, and ties them into existing and new inspections, quick-fixes, navigation and refactorings:

  • Binary literals (spec) and digit separators (spec) – see here for ReSharper features (C# 7.0)
  • Local functions (spec) – see here for ReSharper features (C# 7.0)
  • out variable declarations (spec) (C# 7.0)
  • throw expressions (spec) (C# 7.0)
  • Expression-bodied “everything” (C# 7.0)
  • async main methods (spec) (C# 7.1)
  • default literal (spec) (C# 7.1)
  • Inferring of tuple names (spec) (C# 7.1)
  • Pattern matching with generics (spec) (C# 7.1)

Let’s start a blog series on how these language features translate to ReSharper and Rider (we will update the table of contents as we progress):

Continue reading

Posted in How-To's | Tagged , , , , , , | 3 Comments

JetBrains Rider 2017.2 is released

Please welcome Rider 2017.2 RTM: this year’s second major update to the new .NET IDE.

JetBrains Rider 2017.2 is released

For a recap, here are the highlights of this Rider update:

  • Support for .NET Core 2.0: you can now edit, run, debug, test, navigate and refactor your shiny new .NET Core applications.
  • Call and value tracking: inspect where a value originates and where it’s passed next, or what call trees a method is part of.
  • MSTest support: Rider can now run unit tests that target both the classic MSTest and the newer cross-platform MSTest V2.
  • Opening individual folders or files, because not all code is in a solution or project. Alternatively, you can attach a folder to an exiting solution.
  • Multiple debugger updates including the Parallel Stacks view, lambda evaluation, and marking variables.
  • New refactorings ported from ReSharper: Transform Parameters and Invert Boolean.
  • Updates from the latest ReSharper, including improved support for C# 7.0, initial support for C# 7.1, and an assortment of code inspections.
  • Evolving F# support, including code folding, XML doc comment tooltips, and evaluating expressions on hover.
  • Unity support improvements, such as new file templates and better ShaderLab code highlighting.
  • Updates from the latest IntelliJ Platform in terms of VCS integration, JavaScript and TypeScript support, and better textual search.

Learn more about Rider 2017.2 and download the update!

Posted in How-To's | Tagged , , , , , , , , , | 3 Comments

F# support improvements in Rider 2017.2

Rider 2017.2 EAP builds come with a series of new features and improvements around F#, such as code folding, commenting with block commentdebugger expression evaluation on hover, support for XML docs in tooltips and more!

Many visible improvements were made, as well as “invisible” ones. For example, we’ve updated performance of parsing and working with the F# FCS – an optimization we are contributing back to the Visual F# compiler and tools so others can benefit from it, too.

Now let’s look at the more visible things!

Continue reading

Posted in How-To's | Tagged , , , , | 4 Comments

ReSharper Ultimate 2017.2.2 available

A new minor update for the ReSharper Ultimate family is available for download!

ReSharper 2017.2.2 fixes the annoying code completion bug with duplicate parentheses (RSRP-466206) and addresses the remaining known issues when completing сode with Tab (RSRP-466421). It also improves the null checking quick-fix behavior (RSRP-464225) and correctly resolves .NET Standard 2.0 libraries in Visual Studio 2017 version 15.4 preview 4 (RSRP-466417). See all fixes in ReSharper 2017.2.2.

ReSharper C++, dotCover, dotTrace, dotMemory, and dotPeek 2017.2.2 have been updated solely for compatibility reasons and include no significant changes.

In case you were affected by the issues mentioned above, we recommend that you download and install ReSharper Ultimate 2017.2.2.

Note to ReSharper EAP users: we’re already working on version 2017.3 and will open early access soon!

Posted in How-To's | Tagged , | 5 Comments

Support for Unity shaders in Rider 2017.2

The last couple of builds of Rider 2017.2 EAP have seen a number of under-the-hood and foundational fixes and updates to the Unity support.

Firstly, Rider will now read options such as the unsafe flag and pre-processor symbols from the mcs.rsp mono compiler response file, so Rider will now know what symbols you have defined, and analyse the correct branch in #ifdef’d code blocks. This change is exciting to us because it came from the community – yes, the Unity support is open source, and we accept pull requests!

Secondly, we’ve made significant improvements to the ShaderLab parser. We’re not just doing syntax highlighting of .shader files, but we also parse the file and build syntax trees which we can use for syntax error highlighting, and going forward, inspections and analysis. Unfortunately, our parser wasn’t complete, and could highlight correct code as a syntax error. The parser now understands the file format a whole lot better and you should no longer see incorrect code (barring the occasional bug of course). We also highlight pre-processor errors and warnings correctly.
Highlight warning preprocessor directives

Continue reading

Posted in How-To's | Tagged , | 1 Comment

Find in Path gutter and more UI improvements in Rider 2017.2

In Rider 2017.2 EAP, we made some changes to Find in Path (Ctrl+Shift+F). Search results from the same lines are now merged together. The Preview panel now has a left-hand gutter that displays line numbers, navigation icons, context actions and local change markers. This makes it easy to make changes directly from a search!
Find in Path improvements

Continue reading

Posted in How-To's | Tagged , , | 7 Comments

Rider 2017.2 EAP build 3

We’ve got another fresh EAP build for you: get Rider 2017.2 EAP 3!

Rider 2017.2 EAP - build 3 - Early Access Program

Here’s the list of this build’s highlights:

  • Better npm integration: Rider opens the npm tool window and offers to run npm install on opening a solution that contains a top-level package.json file.
  • tsconfig.json is now detected and taken into account when analyzing TypeScript files.
  • Call Tracking and Value Tracking actions are now directly available from the Alt+Enter menu on member and parameter declarations.
  • Import and export of all global settings is available, including both settings coming from ReSharper and the IntelliJ platform.
  • Solution-wide analysis (SWEA) is automatically paused during NuGet restore.
  • Improved Unity support, including better highlighting in .cginc files and injected Cg fragments in .shader files.
  • Better presentation of paths to MSBuild, Mono and .NET Core in Rider settings (Build, Execution, Deployment | Toolset and Build).
  • Performance stabilization (in progress).

If you want to glance through the list of bugs fixed, here’s the list for you.

Please download Rider 2017.2 EAP 3 and give the new build a try!

Posted in How-To's | Tagged , , , , , | 7 Comments