Bundling with MVC4 not working after I publish to azure

前端 未结 9 2349
闹比i
闹比i 2021-02-08 14:52

Hi I am trying to bundle my scripts for my application. My debug is working and if I publish with the Web.debug every thing works fine. But when I publish with the Web.releas my

9条回答
  •  心在旅途
    2021-02-08 15:17

    I had the same problem, but none of the above solutions worked for me.

    The problem is, I had bundling like this:

    @Styles.Render("~/Content/css")
    
    bundles.Add(new StyleBundle("~/Content/css").Include(
        "~/Content/bootstrap.css",
        "~/Content/justified-nav.css",
        "~/Content/site.css"));
    

    But, ~/Content/css is also a directory - which broke when deploying to Azure. I fixed this by changing ~/Content/css to ~/Content/mastercss in both locations

提交回复
热议问题