Visual Studio + ReSharper treating some Razor statements as errors

Viewed 152

Current setup: Visual Studio 2015 Professional and ReSharper Ultimate 2017.2.2.

I've started looking into ASP .NET MVC and I've found that ReSharper has been treating some Razor statements as errors.

For example, this is the Login.cshtml file that is autogenerated in an MVC project with individual accounts authentication.

Razor lines with errors.

The error for the line

@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })

is

The type arguments cannot be inferred from the usage. Try specifying the type arguments explicitly.

Weirdly, only some lines are considered errors. The code compiles and runs fine, I'm able to use the registration/login system the project generated fine. Its getting annoying seeing '72 errors in 17 files' in the bottom right when nothing is actually wrong.

Any ideas on how to remove these errors?

0 Answers
Related