Setting up Kendo

Even though I used the Nuget package manager to install Kendo in my web project, it didn’t work as I would expect. It failed to add a reference to the dll and it doesn’t setup the web.config files and BundleConfig.cs. It is probably a good thing it doesn’t mess with my web.config and BundleConfig.cs…. Anyway to get it running properly after running the Nuget package manager to install, you need to follow the instructions here: http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/introduction

If you are working with Areas in an MVC app, then you’ll need to edit the web.config file in each area that uses the controls. If using the Razor rendering engine then you edit the web.config in the Area/Views folder by adding

 

<system.web.webPages.razor>
<host factoryType=”System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ />
<pages pageBaseType=”System.Web.Mvc.WebViewPage”>
<namespaces>
… (existing namespaces) ….
<add namespace=”Kendo.Mvc.UI”/>
</namespaces>
</pages>
</system.web.webPages.razor>

 

and

 

<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”System.Web.Helpers” publicKeyToken=”31bf3856ad364e35″ />
<bindingRedirect oldVersion=”1.0.0.0-2.0.0.0″ newVersion=”2.0.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”System.Web.Mvc” publicKeyToken=”31bf3856ad364e35″ />
<bindingRedirect oldVersion=”1.0.0.0-4.0.0.0″ newVersion=”4.0.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”System.Web.WebPages” publicKeyToken=”31bf3856ad364e35″ />
<bindingRedirect oldVersion=”1.0.0.0-2.0.0.0″ newVersion=”2.0.0.0″ />
</dependentAssembly>
</assemblyBinding>
</runtime>

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s