Package Syncfusion.EJ2.Blazor is installed, But namespace is not found

I installed  Syncfusion.EJ2.Blazor in a project and can see it in the list of packages, But when I want to add the namespace: @using Syncfusion.EJ2.Blazor; in the _imports file it says: The type or namespace name 'Blazor' does not exist in the namespace 'Syncfusion.EJ2' (are you missing an assembly reference?) how to resolve this?
Also Syncfusion.Blazor get me the same error.

4 Replies

MA maz April 27, 2020 12:12 PM UTC

Using Syncfusion Essential Studio project Template, I created a Syncfusion Blazor server side project and added all controls to it, Then I registered my community license key in the startup file, Most of the controls in the template are working, But RichText editor doesn't work and That is the main component I need. When I navigate to RichText Editor page it shows a textarea and the text inside the control shows as plain text on the page. How to correct this?


IS Indrajith Srinivasan Syncfusion Team April 28, 2020 10:31 AM UTC

Hi Maz,

Greetings from Syncfusion support,

We have validated your reported queries and below are the responses for it.
 
 
Query 1: “I installed Syncfusion.EJ2.Blazor in a project and can see it in the list of packages, But when I want to add the namespace: @using Syncfusion.EJ2.Blazor; in the _imports file it says: The type or namespace name 'Blazor' does not exist in the namespace 'Syncfusion.EJ2' (are you missing an assembly reference?) how to resolve this?“

We have changed the namespace of Syncfusion components with the Nuget versions higher than 18.1.42. With using these versions namespace for the Blazor package is @using Syncfusion.Blazor.
 

Release Notes: https://blazor.syncfusion.com/documentation/release-notes/18.1.42/#common

Query 2: “Most of the controls in the template are working, But RichText editor doesn't work and That is the main component I need. When I navigate to RichText Editor page it shows a textarea and the text inside the control shows as plain text on the page. How to correct this?“

We have created a project using the project template for Rich Text Editor which works fine. We suspect the styles are not referred hence these type of issue occurs. We have also prepared a sample based on your requirements with the latest Nuget version.

Style reference in the _Host.cshtml file
 
 
<link rel="stylesheet" rel='nofollow' href="_content/Syncfusion.Blazor/styles/bootstrap4.css" /> 
 
 
 

Can you please check the above sample and let us know if you face any difficulties?

Regards
Indrajith
 



MA maz April 28, 2020 07:20 PM UTC

Yes the error was from styles, The automatically generated styles was:
<link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/blazor/18.1.45/bootstrap4.css" />
That I replaced with:
<link rel="stylesheet" rel='nofollow' href="_content/Syncfusion.Blazor/styles/bootstrap4.css" />
And the richtexteditor then showed, Also I had to replace all Ejs in the project with Sf and replace EJ2 with empty,  using find and replace, I wonder how in the first place the project compiled and many controls were showed!


IS Indrajith Srinivasan Syncfusion Team April 29, 2020 09:08 AM UTC

Hi Maz, 
 
Thanks for the update, 
 
We are glad that your reported issue is resolved. If you are using the version higher than 18.1.42, use the namespace and control name as mentioned. The project will be compiled without any errors. 
 
Regards, 
Indrajith 


Loader.
Up arrow icon