In my Visual 2013 solution, I had an Asp.net MVC 5 Sitecore Project, I found that in the View (.cshtml) Page is intillence not working at all for Sitecore Helper class. But in the controller the intellince was working fine. I read in many blog after restarting Visual Studio this problem goes away, But my intellience problem didn’t fixed.
Below is the resolution which i found, and is working in my project.
1) Include the Sitecore Web.Config file in your project.
2) Include the Sitecore /Views/Web.Config file in your Views folder.
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add namespace="Sitecore.Mvc" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
3) Ensure Sitecore.Kernel.DLL and Sitecore.Mvc.DLL are referenced in your project, and are set to CopyLocal=true.
Note:- If we make copylocal=true, at the time of Publishing Website, this dll get published.Inorder to avoid this we can make changes in TDS Project, Where we can exclude all the Sitecore.*.dll
By doing this the DLLs are copied to the project’s bin directory, but they’re not published in website Bin Directory.