Error: Does not contain definition for Syncfusion and no extension method 'Syncfusion' (are you missing a using directive or an assembly reference)
Problem
“Does not contain definition for Syncfusion and no extension method 'Syncfusion' (are you missing a using directive or an assembly reference)” error occurs when you use Syncfusion in view page. That is Syncfusion is not displayed in intellisense. The following screenshot illustrates the error.
Figure 1: Error message
Reason
This error occurs when you miss namespace references in your application. That is, when necessary namespaces are not included in your application.
Solution
To resolve this issue, specify necessary namespaces when you add your Essential Tools control in your Application. It is suggested to add the following namespaces in two of the web.config files in your application for using Tools control in sample application.
1)Syncfusion.Mvc.Shared
2)Syncfusion.Mvc.Tools
Refer to the following code example.
Web.Config
<system.web> <pages> <namespaces> ... <add namespace="Syncfusion.Mvc.Shared" /> <add namespace="Syncfusion.Mvc.Tools" /> </namespaces> </pages> </system.web>
Also, add Namespaces in web.config file inside Views folder.
Web.Config
<system.web.webPages.razor> <pages pageBaseType="System.Web.Mvc.WebViewPage"> <namespaces> ... <add namespace="Syncfusion.Mvc.Shared" /> <add namespace="Syncfusion.Mvc.Tools" /> </namespaces> </pages> </system.web.webPages.razor> </code>
To add Syncfusion Tools control in your MVC application, with necessary web.config settings, refer to the following UG Documentation link:
https://help.syncfusion.com/ug/asp.net%20mvc/default.htm#!documents/howtoaddessentialtoo.htm