Created
December 14, 2017 19:21
-
-
Save PilotBob/a124dc2e8dc6aa7541382c8dac921817 to your computer and use it in GitHub Desktop.
KendoUI for MVC bundle pointing to NuGet package installed Content and Script folders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// KendoUI Bundles | |
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin"); | |
var kendoVersion = Assembly.LoadFrom(Path.Combine(path, "Kendo.Mvc.dll")).GetName().Version; | |
var kendoFormatedVersion = $"{kendoVersion.Major}.{kendoVersion.Minor}.{kendoVersion.Build}"; | |
bundles.Add(new ScriptBundle("~/bundles/kendoui").Include( | |
$"~/Scripts/kendo/{kendoFormatedVersion}/kendo.all.min.js")); | |
bundles.Add(new StyleBundle("~/Content/kendoui").Include( | |
$"~/Content/kendo/{kendoFormatedVersion}/kendo.common.min.css", | |
$"~/Content/kendo/{kendoFormatedVersion}/kendo.blueopal.min.css")); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment