When I open my Blazor solution in Visual Studio, Intellisense will show false errors for references to Blazor components, and will successfully compile.
For example, in many of my classes I inject ILogger<BlazorComponent>
that takes a component to log about, in this case, my Details.razor
component:
public partial class DetailsBase : ComponentBase
{
[Inject]
protected ILogger<Details> Logger { get; set; }
// etc etc...
}
However, Intellisense always shows a not found error for Details
. It will compile successfully but the false error will remain, until you navigate to that particular file - Details.razor
in this case - and Intellisense picks it up.
These false errors clutter up my debug window and I'd like to stop them without constantly having to click to go to the file to get it recognised by Intellisense.
Is there some kind of setting I can enable that makes sure Intellisense checks these files? or anything that plays nicer with Blazor than Intellisense?
.vs
hidden folder under the solution folder and then restart your project to check whether the behavior. – Zigzagger