The razor code has some red lines and if I hover over them they show completely unrelated error messages to what the actual error is. The actual error seems to be a namespace conflict, because if I fully qualify the input to AntDesign.Input, the errors disappear. I suspect it is some Microsoft.AspNetCore.Components namespace in the imports file that is conflicting. Also, if I don't fully qualify it and I hover over the input it does actually show the correct namespace, which makes this make even less sense.
The bigger problem is that I don't get useful error messages so I just spent a really long time trying to figure this out. The error messages include 'Encountered end tag "Form" with no matching start tag. Are your start/end tags properly balanced?', 'Encountered end tag "FormItem" with no matching start tag. Are your start/end tags properly balanced?', 'The "Form" element was not closed. All elements must be either self-closing or have a matching end tag.', 'Found markup element with unexpected name 'Prefix'. If this is intended to be a component, add a @using directive for its namespace.'.
So my questions are:
- Why am I not getting useful error messages?
- Why did the hover context menu give the correct namespace but it actually seems to not use that namespace?
- Is this a common problem or might there be something wrong with my visual studio settings?
- Can you give me an in depth explanation of why the error occurs?
Screenshots:Working and non working codeUseless error listHover context menu with correct namespace detection