Declined
Last Updated: 10 Jun 2021 06:46 by ADMIN
Andrew
Created on: 08 Dec 2016 13:53
Category: UI for ASP.NET MVC
Type: Feature Request
2
Add a Static Getter or Function to Kendo.dll to return the current version
With the current version available from the DLL it will be possible to simplify bundling and include of CSS and JS files. I currently do something along the lines of

    //BundleConfig.cs
        var version = typeof(Kendo.Mvc.UrlGenerator).Assembly.GetName().Version;
        var kendoVersion = string.Format("{0}.{1}.{2}", version.Major, version.Minor, version.Build);
 
 
        bundles.Add(new StyleBundle("~/Content/kendo/"+kendoVersion+"/css").Include(
            "~/Content/kendo/"+kendoVersion+"/kendo.common.min.css",
            "~/Content/kendo/"+kendoVersion+"/kendo.default.min.css"
            ));
 
        bundles.Add(new ScriptBundle("~/Scripts/kendo/" +  kendoVersion +"/scripts").Include(
            "~/Scripts/kendo/" + kendoVersion + "/kendo.all.min.js",
            "~/Scripts/kendo/" + kendoVersion + "/kendo.aspnetmvc.min.js",
            "~/Scripts/kendo/" + kendoVersion + "/cultures/kendo.culture.en-GB.min.js"
            ));

And similarly in the views. Getting the version directly from the DLL without hacking around in Assembly.GetName.Version and string manipulation will make this clearer. I'd also suggest you update the documentation to reflect this pattern.

As its a new method/getter, it is not a breaking change.
1 comment
ADMIN
Viktor Tachev
Posted on: 10 Jun 2021 06:46

Hi,

It seems that there is no interest from the community in using the described functionality. The described approach with calling Assembly.GetName.Version can be safely used to retrieve the current assembly version.

Regards,
Viktor Tachev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.