6

I just created new blazor project via

dotnet new blazorhosted

and opened FetchData.cshtml, but VS threw 9 errors at me.

Of course whole project is compiling & works fine, but it's very annoying

How can I disable showing errors for .cshtml files?

Visual Studio 2019 Preview

Severity    Code    Description Project File    Line    Suppression State
Error   CS0103  The name 'forecasts' does not exist in the current context  Blazor.Client   FetchData.cshtml    27  Active

Error   CS0115  'Template.ExecuteAsync()': no suitable method found to override Blazor.Client   FetchData.cshtml    1   Active

Error   CS0229  Ambiguity between 'Template.__o' and 'Template.__o' Blazor.Client   FetchData.cshtml    1   Active

Error   CS0229  Ambiguity between 'Template.__o' and 'Template.__o' Blazor.Client   FetchData.cshtml    1   Active

Error   CS0229  Ambiguity between 'Template.__o' and 'Template.__o' Blazor.Client   FetchData.cshtml    1   Active

Error   CS0103  The name 'page' does not exist in the current context   Blazor.Client   FetchData.cshtml    4   Active

Error   CS0103  The name 'inject' does not exist in the current context Blazor.Client   FetchData.cshtml    5   Active

Error   CS0103  The name 'forecasts' does not exist in the current context  Blazor.Client   FetchData.cshtml    11  Active

Error   CS0103  The name 'functions' does not exist in the current context  Blazor.Client   FetchData.cshtml    37  Active
4

0 回答 0