Auto Intelligence in VisualStudio 2015 in Sitecore Project

In my Visual 2013 solution, I had an 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=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.