locked
MVC 5 bundling not works after deployment to AZURE RRS feed

  • Question

  • User2097725413 posted

    Hi,

    In my MVC application I have used bundling. It works fine on local environment (localhost), but the same not works on AZURE sites after deployment.

    Bundling are as below (BundleConfig.cs)

    using System.Web.Optimization;

    namespace ChipPin.Web
    {
    public class BundleConfig
    {
    // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
    public static void RegisterBundles(BundleCollection bundles)
    {

    bundles.Add(new ScriptBundle("~/bundles/scripts").Include(
    "~/Scripts/jquery-3.1.1.min.js",
    "~/Scripts/jquery-ui-1.12.1.min.js",
    "~/Scripts/jquery.validate.min.js",
    "~/Scripts/jquery.validate.unobtrusive.js",
    "~/Scripts/apprivo-fileupload.js",
    "~/Scripts/apprivo-forms.js",
    "~/Scripts/apprivo-popups.js",
    "~/Scripts/apprivo-rules.js",
    "~/Scripts/assets/global/plugins/jquery.min.js",
    "~/Scripts/assets/global/plugins/bootstrap/js/bootstrap.min.js",
    "~/Scripts/assets/global/plugins/js.cookie.min.js",
    "~/Scripts/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js",
    "~/Scripts/assets/global/plugins/jquery.blockui.min.js",
    "~/Scripts/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js",
    "~/Scripts/assets/global/plugins/bootstrap-multiselect/js/bootstrap-multiselect.js",
    "~/Scripts/assets/global/plugins/moment.min.js",
    "~/Scripts/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.js",
    "~/Scripts/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js",
    "~/Scripts/assets/global/plugins/bootstrap-timepicker/js/bootstrap-timepicker.min.js",
    "~/Scripts/assets/global/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js",
    "~/Scripts/assets/global/plugins/clockface/js/clockface.js",
    "~/Scripts/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js",
    "~/Scripts/assets/global/plugins/bootstrap-multiselect/js/bootstrap-multiselect.js",
    "~/Scripts/assets/global/plugins/icheck/icheck.min.js",
    "~/Scripts/assets/global/scripts/datatable.js",
    "~/Scripts/assets/global/plugins/datatables/datatables.min.js",
    "~/Scripts/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js",
    "~/Scripts/assets/global/scripts/app.min.js",
    "~/Scripts/assets/pages/scripts/components-date-time-pickers.min.js",
    "~/Scripts/assets/pages/scripts/components-bootstrap-multiselect.min.js",
    "~/Scripts/assets/pages/scripts/form-icheck.min.js",
    "~/Scripts/assets/pages/scripts/table-datatables-managed.min.js",
    "~/Scripts/assets/layouts/layout/scripts/layout.js",
    "~/Scripts/assets/layouts/layout/scripts/demo.min.js",
    "~/Scripts/assets/layouts/global/scripts/quick-sidebar.min.js",
    "~/Scripts/assets/layouts/global/scripts/quick-nav.min.js",
    "~/Scripts/chippin.js",
    "~/Scripts/chippinregulatoryregion.js",
    "~/Scripts/chippinairport.js",
    "~/Scripts/chippinairline.js",
    "~/Scripts/compensationtype.js",
    "~/Scripts/usermanagement.js"
    ));

    //-----------------------------

    bundles.Add(new StyleBundle("~/bundles/content").Include(
    "~/Content/assets/global/plugins/bootstrap/css/bootstrap.min.css",
    "~/Content/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css",
    "~/Content/assets/global/plugins/icheck/skins/all.css",
    "~/Content/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css",
    "~/Content/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css",
    "~/Content/assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css",
    "~/Content/assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css",
    "~/Content/assets/global/plugins/clockface/css/clockface.css",
    "~/Content/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.css",
    "~/Content/assets/global/plugins/bootstrap-multiselect/css/bootstrap-multiselect.css",
    "~/Content/assets/global/plugins/datatables/datatables.min.css",
    "~/Content/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.css",
    "~/Content/assets/global/css/components.min.css",
    "~/Content/assets/global/css/plugins.min.css",
    "~/Content/assets/layouts/layout/css/layout.min.css",
    "~/Content/assets/layouts/layout/css/themes/darkblue.min.css",
    "~/Content/assets/global/plugins/font-awesome/css/font-awesome.min.css",
    "~/Content/assets/global/plugins/simple-line-icons/simple-line-icons.min.css",
    "~/Content/apprivo.css"
    ));

    }
    }
    }

    On RAZOR page ie _Layout.cshtml

    @System.Web.Optimization.Styles.Render("~/bundles/content")

    @System.Web.Optimization.Scripts.Render("~/bundles/scripts")

    Please let me know, how to implement bundle so that it will work after deployment to AZURE 

    Thanks

    Wednesday, July 12, 2017 5:07 AM

All replies