Visual Studio ошибки в .cshtml для нового проекта Blazor, который хорошо компилируется?как это отключить? - PullRequest
0 голосов
/ 29 декабря 2018

Я только что создал новый блазорский проект через

dotnet new blazorhosted

и открыл FetchData.cshtml, но VS выдал мне 9 ошибок.

Конечно, весь проект компилируется и работает нормально, но это очень раздражает

Как отключить отображение ошибок для .cshtml файлов?

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
...