Syncfusion controls recognised in some razor components but not others.

In this forum post I've stated that it is for the TreeView control. It's actually for any Syncfusion control (but "Any" wasn't an option in the dropdown list).

I've created a Blazor Server solution in Visual Studio 2022 v17.10.1 and for some mind-boggling reason, I can create one razor component and have Syncfusion controls work fine and then create another razor component - in the same solution - and Syncfusion controls "aren't recognised" (as Syncfusion controls)!

I can't find any other posts on this in the forum so I assume it's something very obvious which I'm missing. But I'm blind to it.

I've attached two screen shots of my solution. Both have exactly the same code and markup. But in one, the Syncfusion controls are recognised and show up in green, whereas in the other they aren't recognised and show up in a pale grey or blue.

Intellisense says "Found markup element with unexpected name... If this is intended to be a component, add a @using statement for its namespace".

But the required @using statements are there.

I've had this problem for a while now and once or twice VS just seems to suddenly recognise the Syncfusion controls - after me not doing anything for a day or two. But that's hardly an ideal solution.

Any thoughts you have on this would be greatly appreciated.


Attachment: same_code_but_one_recognised,_the_other_not_eca8fdc7.zip

2 Replies

CG Clive Gray June 3, 2024 03:35 PM UTC

Okay so it turned out to be the oddest thing - and nothing whatsoever to do with Syncfusion!

When I looked at the two screenshots I took, side by side, I noticed that the VS Navigation Bar was entirely blank on the one which didn't work.

I even didn't know it was called the Navigation Bar until I Googled it! But that's the three drop down lists at the top of the editing window. From left to right it shows the Project Name, File Name and then lists the variables and methods. Never noticed it blank before.

So I Excluded the razor component from the Solution and then Included it again and the Navigation Bar then displayed the Project Name. A few moments later it picked up the File Name and variables and methods too.

Absolutely no idea why that's happening. I didn't cut and paste the razor component into the Project (for example). I "Added" it as normal in the Solution Explorer - so, odd that it got "lost" somehow.

Still, all's well that ends well :)



SS Shereen Shajahan Syncfusion Team June 4, 2024 06:58 AM UTC

Hi Clive,

Thanks for the update. Please get back to us for assistance in the future.

Regards,

Shereen


Loader.
Up arrow icon