Initial Blazor support in ReSharper and Rider 2018.2 EAP

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!

About Matthias Koch

Matthias is a passionate C# developer and likes to talk about clean code, testing and tooling in general. Much of his spare time in the last years was devoted to his very own open source projects, including NUKE. He is working at JetBrains as developer advocate for the .NET department. Follow him on Twitter.
This entry was posted in How-To's and tagged , , , , , , . Bookmark the permalink.

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

  1. Stefan de Vogelaere says:

    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.

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

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

  4. Alexander says:

    Not all directives. @implements is not supported

Leave a Reply

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