Skip to content

Instantly share code, notes, and snippets.

@PilotBob
Created December 14, 2017 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilotBob/a124dc2e8dc6aa7541382c8dac921817 to your computer and use it in GitHub Desktop.
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
// 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