0

I have specified the Angular and bootstrap in the Bundle.config file as

bundles.Add(new ScriptBundle("~/bundles/angular").Include(
                    "~/Scripts/angular.js",
                     "~/Scripts/angular-*",
                    "~/Scripts/bootstrap.js"));

bundles.Add(new StyleBundle("~/Content/bootstrap").Include("~/Content/bootstrap.css"));

and I had specified these bundles in Layout.cshtml file inside the body as

@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/angular")
@Styles.Render("~/Content/bootstrap")
@RenderSection("scripts", required: false)

Inside the Global.asax file I had specified the Budleconfig in Application_Start() as

protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();

        WebApiConfig.Register(GlobalConfiguration.Configuration);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);

        BundleConfig.RegisterBundles(BundleTable.Bundles);

        AuthConfig.RegisterAuth();
    }

even though the Angular and Bootstrap files are not been Bundled Can anyone please point me what I am missing here

Note: I have checked the path it is correct.

Angular and Bootstrap JS path

Bootstrap CSS Path

Rajesh
  • 1,600
  • 5
  • 33
  • 59
  • have you tried setting the path to "~/Content/Scripts/...... – Wheels73 Jun 21 '18 at 09:39
  • Possible duplicate of [ASP.NET MVC Bundle not rendering script files on staging server. It works on development server](https://stackoverflow.com/questions/21270834/asp-net-mvc-bundle-not-rendering-script-files-on-staging-server-it-works-on-dev) – TAHA SULTAN TEMURI Jun 21 '18 at 09:40
  • please do check if Webgrease is installed. – TAHA SULTAN TEMURI Jun 21 '18 at 09:40
  • What's the function declaration look like where you are registering the bundles. Unless I'm mistaken, a lot of this is done by convention, and if you have the function name wrong, it might not be registering anything? – Brendan Green Jun 21 '18 at 10:10
  • @TAHASULTANTEMURI I had checked the question https://stackoverflow.com/questions/21270834/asp-net-mvc-bundle-not-rendering-script-files-on-staging-server-it-works-on-dev already, I have Webgrease Installed but it is not working – Rajesh Jun 21 '18 at 10:46

0 Answers0