'IHtmlHelper' does not contain a definition for 'EJS' when trying to add component

Hello,

When I try to add a diagram control into my page I get the following error :

Error CS1929 'IHtmlHelper<dynamic>' does not contain a definition for 'EJS' and the best extension method overload 'HtmlMVCExtension.EJS(HtmlHelper)' requires a receiver of type 'HtmlHelper' 



This is the source code 


<div id="diagram-space" class="sb-mobile-diagram">                @*Initialize Diagram control.*@                @(Html.EJS().Diagram("diagram").Width("100%").Height("600px")                        .GetNodeDefaults("nodeDefaults").GetConnectorDefaults("connectorDefaults")                    .DataSourceSettings((DiagramDataSource)ViewBag.DataSourceSettings)                    .Layout(l => l.Type(Syncfusion.EJ2.Diagrams.LayoutType.HierarchicalTree).VerticalSpacing(40))                    .SelectionChange("selectionChange").SourcePointChange("connectionChange").TargetPointChange("connectionChange").SetNodeTemplate("setNodeTemplate")                    .SnapSettings(s => s.Constraints(Syncfusion.EJ2.Diagrams.SnapConstraints.None)).Render()                )            </div>

This is obviously a configuration problem but I can't find where the reference is missing, all Nuget packages are up to date.

Have you an idea to fix the problem?

Thanks.

1 Reply

AM Arunkumar Manoharan Syncfusion Team July 22, 2021 02:10 PM UTC

Hi Axel,  
We used your code and checked and it’s working fine on our side, and we have made a sample and attached the sample link. If the issue still persists on your side, please replicate the reported issue in the shared sample. For more information, please check the sample link. 
  
Regards,   
Arun.  


Loader.
Up arrow icon