This is a migrated thread and some comments may be shown as answers.

Error in first porject during setting up

1 Answer 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrew Currie
Top achievements
Rank 1
Andrew Currie asked on 12 Mar 2013, 03:11 PM
Error 5 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.List<SOH.Common.Model.Patient>>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.List<SOH.Common.Model.Patient>>' could be found (are you missing a using directive or an assembly reference?) c:\VSProjects\SOH.Orthodontics\SOH.Orthodontics.Web.UI\Views\Patient\PatientResult.cshtml 5 8 SOH.Orthodontics.Web.UI

Really struggling with this error.  Please help!  Html.Kendo() in the razor view just is not recognised!  Argh!!

Added a reference to the dll and also added namespace to BOTH web.config files.  Sections below from both files.

  <system.web.webPages.razor>
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <pages pageBaseType="System.Web.Mvc.WebViewPage">
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="Kendo.Mvc.UI" />
      </namespaces>
    </pages>
  </system.web.webPages.razor>


    <pages>
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
        <add namespace="Kendo.Mvc.UI" />
      </namespaces>
    </pages>

1 Answer, 1 is accepted

Sort by
0
Andrew Currie
Top achievements
Rank 1
answered on 13 Mar 2013, 08:44 AM
By closing Visual Studio and opening it again, I appear to have fixed the issue.
Tags
General Discussions
Asked by
Andrew Currie
Top achievements
Rank 1
Answers by
Andrew Currie
Top achievements
Rank 1
Share this question
or