I've been having a problem with Intellisense in Asp.Net Core and Blazor for months where it won't recognize a newly created class. I've read all the other answers about changing settings, Ctrl-J, and removing .vs folder, but none resolved the issue. Until today when I found the root.
Working in Blazor, I would create a new class <Bar />
and then try to call it from a parent <Foo />
Intellisense would mark it not found:
Error: Found markup element with unexpected name 'Bar'. If this is intended to be a component, add a @using directive for its namespace.
Of course, providing a fully qualified name did nothing to resolve the complaint. But, it compiles just fine. Clearly it is Intellisense that was doing the complaining, not the compiler. Aggravating but by no means a show stopper.
This morning, however, when I came back to my project (without shutting down or anything) <Bar />
was recognized by Intellisense. There appears to be some kind of periodic cache refresh. It would be nice to know how to force the refresh without drastic measures.
Then I made a copy of <Bar />
renamed it <BarBar />
. Of course Intellisense didn't recognize it, barked at me, and I did have the correct page name of @page "/BarBar"