HtmlHelper不包含" Kendo"的定义MVC Razor

时间:2017-08-02 11:19:59

标签: c# asp.net-mvc razor kendo-asp.net-mvc

我的视图中有这行代码:

 @(Html.Kendo().MultiSelect()
悲伤地"剑道"红色下划线。并说它错过了集会或对此的反对。 我到目前为止所尝试的内容:

View_web.config:

 <namespaces>

    <add namespace="System.Web.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Optimization"/>
    <add namespace="System.Web.Routing" />
    <add namespace="Kendo.Mvc.UI" />
    <add namespace="Project" />

  </namespaces>

使用Nuget安装了Kendo.mvc。

链接到参考图像: https://www.screencast.com/t/fpzvGfAigkWu

在我的视图中添加了脚本:

<link href="https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.common-material.min.css" rel="stylesheet" type="text/css" />
<link href="https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
<link href="https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.material.min.css" rel="stylesheet" type="text/css" />

<script src="https://kendo.cdn.telerik.com/2017.2.621/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2017.2.621/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2017.2.621/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2017.2.621/js/kendo.aspnetmvc.min.js"></script>

运行时的ErrorMessage:

    Severity    Code    Description Project File    Line    Suppression State
Error   CS1759  Cannot embed interop types from assembly 'Kendo.Mvc, Version=2016.2.616.0, Culture=neutral, PublicKeyToken=null' because it is missing either the 'System.Runtime.InteropServices.ImportedFromTypeLibAttribute' attribute or the 'System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute' 

对于我所遗漏或做错的任何建议? 抱歉我的英文。

最诚挚的问候 提前感谢您的帮助。

0 个答案:

没有答案