Initial Blazor support in ReSharper and Rider 2018.2 EAP

Matthias Koch

In February, the ASP.NET team announced the experimental project “Blazor” – a single-page web app framework built on .NET that runs in the browser with WebAssembly. Blazor is great news for all web developers and those who want to try something new. Basically, it allows us to create dynamic websites without writing any piece of JavaScript. Client-side logic can simply be implemented using C#, which is then compiled to use open web standards (WebAssembly).

A brief look at Blazor

Even though Blazor is declared experimental for now, we’ve added initial support for this promising framework in both ReSharper 2018.2 EAP and Rider 2018.2 EAP. For instance, code completion includes all the possible directives, like page (routing), inject (service injection) and function (component members):
Code-completion for Blazor directives

Blazor allows to compose components from other components with simple HTML tags, which turns out to be a very flexible approach. For instance, when decorating a member with ParameterAttribute, we can set this member from any other component with a HTML attribute.

The ParameterAttribute is not yet supported, but for completeness, let’s see how this works:
Component members in function-block

Of course, we can also do more complex things, like subscribing to a button’s onclick event and execute a delegate – an actual .NET method where we can use all the C# language magic:
OnClick event handler implemented in C#

We are looking forward to support more Blazor features as the framework continuous to evolve.

Download ReSharper 2018.2 EAP now! Or give Rider 2018.2 EAP – our cross-platform IDE – a try! We’d love to hear your feedback!

Comments below can no longer be edited.

9 Responses to Initial Blazor support in ReSharper and Rider 2018.2 EAP

  1. Stefan de Vogelaere says:

    July 17, 2018

    Does not seem to work.
    Downloaded latest EAP and installed latest templates

    dotnet new -i Microsoft.AspNetCore.Blazor.Templates

    Started a new Standalone application.

    Building -> Invalid option ‘7.3’ for /langversion
    If I change 7.3 to latest I get build errors.

    • Matthias Koch says:

      August 2, 2018

      Hi Stefan,

      I couldn’t reproduce this issue. Everything builds as normal for me. Could you please provide more information with an issue on https://youtrack.jetbrains.com/newIssue?project=RSRP

    • Tyler Hartwig says:

      August 6, 2018

      I was able to get this build error to go away by switching the MSBuild version to use the dotnet version

      • Hans Peter says:

        September 8, 2018

        May I know how did you do that?

        • Tobias Punke says:

          October 21, 2018

          Settings -> Build, Execution, Deployment -> Toolset and Build -> Use MSBuild version

          This dropdown menu provides you the possibility to change away from the crappy Mono BS. This piece of utter crap does not work for me in many cases. It’s designed to compile “Hello World”. Everything else will result in a Visual Studio experience 🙂

          https://imgur.com/a/WpWaJcL

  2. The Morning Brew - Chris Alcock » The Morning Brew #2624 says:

    July 18, 2018

    […] Initial Blazor support in ReSharper and Rider 2018.2 EAP – Matthias Koch […]

  3. Dew Drop - July 18, 2018 (#2768) - Morning Dew says:

    July 18, 2018

    […] Initial Blazor support in ReSharper and Rider 2018.2 EAP (Matthias Koch) […]

  4. Alexander says:

    August 1, 2018

    Not all directives. @implements is not supported

Subscribe

Subscribe to .NET Tools updates