Visual Studio 2022.
Blazor Server app.
Created a Components folder under my WebApp folder. Created a .razor compnent - a dialog box. Reference this dialog box, no issues, works as expected.
Now, when I create another .razor component in the Components folder, or anywhere else,
VS 2022 intellisense fails to recognize the other component. Asking for a @using at the beginning of the page.
I've tried copying the current, working component but no luck.
Also, if I rename the working component file, it ceases to function, however, I do not find or recall ever registering or including the first component anywhere.
I'd rather not just have one component for all of my very different dialog needs.
This is well known issue in Visual Studio that intellisense fails to recognize components or razor syntax is not working. There have been similar posts about this topic for example : Blazor broken syntax coloring
They sometimes post patches that address this problem, but this bug still happens. It's hard to tell if the issues are connected. However you should be able to still build the project despite visual studio showing errors.
Here is what I usually do when it happens to me (may not work for you).
I hope this steps will help you.