kendo 配置在 asp.net 核心

kendo config in asp.net core

我不知道如何在 asp.net 核心项目中使用 kendo

我在项目中添加了 js 和 css 文件 并在我的电脑上安装了 Telerik 并引用了 dll 文件

我正在尝试使用上传文件组件,但出现了这个错误:

'IHtmlHelper' 不包含 'Kendo' 的定义,并且找不到可访问的扩展方法 'Kendo' 接受类型 'IHtmlHelper' 的第一个参数(您是否缺少使用指令或程序集引用?)

我的项目是 asp.net 核心 3.1,没有任何 web.config 文件

 <div class="demo-section k-content">
       @(Html.Kendo().Upload().Name("files").HtmlAttributes(new { aria_label = "files" }))
       <p style="padding-top: 1em; text-align: right">
         <button type="submit" class="k-button k-primary">Submit</button>
       </p>
 </div>

谢谢

打开 MVC 项目 Views 文件夹中的 _ViewImports.cshtml 文件,并向其中添加以下行:

@addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI

如果仍不能解决问题,请查看 https://docs.telerik.com/aspnet-core/getting-started/first-steps