Blazor Server errors

I'm creating a new Blazor Server app (previously known as ASP.NET Core with Razor Components) using the new template in Visual Studio 16.3.

There's a lot of code that compiles and builds just fine, but that Resharper highlights as an error.

The main one I'm seeing is when I create a new Razor component, and use the Parameter attribute and RenderFragment class (as instructed here). Resharper highlights these in red and tells me I need to import 'Microsoft.AspNetCore.Components', but when I disable Resharper there are no errors.

And there are plenty more "errors" that Resharper highlights in the standard Blazor template before adding any code.

Is there any plan for Resharper to work properly with Blazor in the future?

5 comments
Comment actions Permalink
Official comment

Hello Craig,

 

Thank you for the feedback.

Blazor support feature is currently in progress. The issues you've described are valid for ReSharper 2019.2.2 version but I couldn't reproduce in the current ReSharper branch. You can try it yourself soon as ReSharper 2019.2.3 and ReSharper 2019.3 EAP 1 are going to be published shortly.

Also, you're welcome to follow the issue concerning Blazor support - https://youtrack.jetbrains.com/issue/RSRP-469186

Thank you.

Comment actions Permalink

Hello.

I am interested in this also. Resharper in Razor components (.razor) is slow, sometimes Intellisense doesn't work, and formatting @code blocks is bad.

Thank you,

Mike

0
Comment actions Permalink

Hello Mike,

 

thank you for the feedback.

Could you please describe the problems in detail? In which case Intellisense doesn't work and formatting is bad?

Possibly some code samples demonstrating the problems will be helpful.

Thank you.

0
Comment actions Permalink

Pressing "." on a class inside @code section doesn't do anything.

Ctrl-Alt-R/Built-in: Reformat Code moves all code inside a @code block to the left:

@code {

public Form1()
{
InitializeComponent();
}

}

I recorded a video of it if you want me to upload it somewhere.

Thank you,

Mike

0
Comment actions Permalink

Hello Mike,

 

Yes, some video demonstrating the specified behavior will be helpful.

You can share it via "submit a request" form at the top of the page.

Thank you.

0

Please sign in to leave a comment.