From https://www.telerik.com/download/custom-download# I tried to download the latest version 2024.1.130 kendo.custom.min.js file in order to upgrade the kendo plugin from Kendo UI 2022.1.412 version to the latest.
I use Asp.Net MVC and I have a custom bundler where I reference all the js files like this
bundles.Add(new ScriptBundle("~/bundle/kendo").Include( "~/Scripts/kendo/kendo.custom.min.js"));
Then in Razor Layout page I register bundles like this
@Scripts.Render("~/bundle/kendo")
but whenever I run the application I always get a NullReferenceException at the line that registers the bundle with the message "No object reference is set to an object instance."
Whenever I downgrade the kendo version or return to the previous one the application runs properly.
Any ideas why is this happening? Would you please help me solve this issue?
Thanx in Advance.
Hi Aggeliki,
As this is a minified script file, I am not able to debug it, but it will be great if you could share the complete scenario.
Please let me know which components are checked in preparing the file and if the helpers are checked as well.
I will then repeat the flow on my side and will be able to replicate the same behavior on my side.
Looking forward to hearing back from you.
Kind Regards,
Anton Mironov
Hey,
i got the same error after update to the latest kendo ui (mvc) version 2024.3.1015 on bundling javascript files.
Is there any solution or is the problem known?
Layout@Scripts.Render("~/bundles/kendo")
bundles.Add(new ScriptBundle("~/bundles/kendo") .Include("~/Scripts/kendo/" + kendoVersion + "/kendo.web.min.js") .Include("~/Scripts/kendo/" + kendoVersion + "/kendo.dataviz.core.min.js") .Include("~/Scripts/kendo/" + kendoVersion + "/kendo.dataviz.qrcode.min.js") .Include("~/Scripts/kendo/" + kendoVersion + "/kendo.aspnetmvc.min.js") //.Include("~/Scripts/kendo/" + kendoVersion + "/jszip.min.js") .Include("~/Scripts/jszip/jszip.min.js") .Include("~/Scripts/kendo/" + kendoVersion + "/messages/kendo.messages.de-DE.min.js") .Include("~/Scripts/kendo/" + kendoVersion + "/cultures/kendo.culture.de-DE.min.js") );
System.NullReferenceException
HResult=0x80004003
Nachricht = Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Quelle = WebGrease
Stapelüberwachung:
bei Microsoft.Ajax.Utilities.JSParser.ParseExpression(AstNode leftHandSide, Boolean single, Boolean bCanAssign, JSToken inToken)
bei Microsoft.Ajax.Utilities.JSParser.ParseExpression(AstNode leftHandSide, Boolean single, Boolean bCanAssign, JSToken inToken)
bei Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteralProperty(Boolean isBindingPattern)
bei Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteral(Boolean isBindingPattern)
bei Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseExpressionList(JSToken terminator)
bei Microsoft.Ajax.Utilities.JSParser.ParseMemberExpression(AstNode expression, List`1 newContexts)
bei Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseExpressionStatement(Boolean fSourceElement)
bei Microsoft.Ajax.Utilities.JSParser.ParseStatement(Boolean fSourceElement, Boolean skipImportantComment)
bei Microsoft.Ajax.Utilities.JSParser.ParseFunctionBody(Block body)
bei Microsoft.Ajax.Utilities.JSParser.ParseFunction(FunctionType functionType, Context fncCtx)
bei Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteralProperty(Boolean isBindingPattern)
bei Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteral(Boolean isBindingPattern)
bei Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseExpressionList(JSToken terminator)
bei Microsoft.Ajax.Utilities.JSParser.ParseMemberExpression(AstNode expression, List`1 newContexts)
bei Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseVarDecl(JSToken inToken)
bei Microsoft.Ajax.Utilities.JSParser.ParseVariableStatement()
bei Microsoft.Ajax.Utilities.JSParser.ParseFunctionBody(Block body)
bei Microsoft.Ajax.Utilities.JSParser.ParseFunction(FunctionType functionType, Context fncCtx)
bei Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
bei Microsoft.Ajax.Utilities.JSParser.ParseExpression(AstNode leftHandSide, Boolean single, Boolean bCanAssign, JSToken inToken)
bei Microsoft.Ajax.Utilities.JSParser.ParseExpressionStatement(Boolean fSourceElement)
bei Microsoft.Ajax.Utilities.JSParser.ParseStatement(Boolean fSourceElement, Boolean skipImportantComment)
bei Microsoft.Ajax.Utilities.JSParser.ParseStatements(Block block)
bei Microsoft.Ajax.Utilities.JSParser.InternalParse()
bei Microsoft.Ajax.Utilities.Minifier.MinifyJavaScript(String source, CodeSettings codeSettings)
bei System.Web.Optimization.JsMinify.Process(BundleContext context, BundleResponse response)
bei System.Web.Optimization.Bundle.ApplyTransforms(BundleContext context, String bundleContent, IEnumerable`1 bundleFiles)
bei System.Web.Optimization.Bundle.GetBundleResponse(BundleContext context)
bei System.Web.Optimization.BundleResolver.GetBundleContents(String virtualPath)
bei System.Web.Optimization.AssetManager.DeterminePathsToRender(IEnumerable`1 assets)
bei System.Web.Optimization.AssetManager.RenderExplicit(String tagFormat, String[] paths)
bei ASP._Page_Views_Account__LayoutLogin_cshtml.Execute() in c:\Users\Luettig\source\repos\mmv-vpp-git - alt workspace\mmvln\Views\Account\_LayoutLogin.cshtml: Zeile40
Diese Ausnahme wurde ursprünglich von dieser Aufrufliste ausgelöst:
[Externer Code]
ASP._Page_Views_Account__LayoutLogin_cshtml.Execute() in _LayoutLogin.cshtml
Hi Christian,
In order to resolve the pointed issue, I would recommend:
<head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>@ViewBag.Title - My Telerik MVC Application</title> <link href="https://kendo.cdn.telerik.com/themes/7.0.2/default/default-ocean-blue.css" rel="stylesheet" type="text/css" /> <link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" /> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> <script src="https://cdn.kendostatic.com/2024.1.130/js/jszip.min.js"></script> <script src="https://cdn.kendostatic.com/2024.1.130/js/kendo.all.min.js"></script> <script src="https://cdn.kendostatic.com/2024.1.130/js/kendo.aspnetmvc.min.js"></script> </head>
Best Regards,
Anton Mironov