Completed
Last Updated: 13 Jun 2024 14:59 by ADMIN
Release 2024 Q3 (Aug)
Bill
Created on: 15 May 2024 10:44
Category: UI for ASP.NET MVC
Type: Bug Report
2
Bundling the kendo js files results in an error

Bug report

Bundling the Kendo js files in an ASP.NET MVC application throws a NullReferenceException error. Reproduced with versions 2024.1.319 and 2024.2.514. The bundling works without exceptions in version 2023.3.1114.

Reproduction of the problem

  1. Add the following bundle to the BundleConfig.cs file:
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
        "~/Scripts/kendo/2024.2.514/kendo.web.min.js",
        "~/Scripts/kendo/2024.2.514/kendo.aspnetmvc.min.js"
));

Instead of kendo.web.min.js you can use kendo.all.min.js with the same result.

  1. Render the scripts in the _Layout.cshtml's head element after jQuery by calling:
@Scripts.Render("~/bundles/kendo")

Current behavior

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Workaround:

Use bundles.Add(new Bundle("~/bundles/kendo") instead of bundles.Add(new ScriptBundle("~/bundles/kendo")

Expected/desired behavior

No exception is thrown when bundling the Kendo script files.

Environment

  • Kendo UI version: 2024.2.514
  • jQuery version: x.y
  • Browser: [all ]
0 comments