我刚刚通过创建了一个新的blazor项目
dotnet全新blazorhosted
并打开FetchData.cshtml
,但是VS向我抛出了9个错误。
当然整个项目都可以编译并且可以正常工作,但是很烦人
如何禁用.cshtml
文件的显示错误?
Visual Studio 2019预览版
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