Bundling with MVC4 not working after I publish to azure

前端 未结 9 2201
闹比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:23

    Let's do some grave digging. Today I started fiddeling around with Azure and promptly ran into a similar problem.

    the style bundle was defined like this:

    bundles.Add(new StyleBundle("~/Styles/css").Include(
                      "~/Content/bootstrap.superhero.css",
                      "~/Content/site.css"));
    

    But no css was being rendered. After almost opening up a second question I realized, that the file bootstrap.superhero.css was greyed out in the solution explorer. What was working locally in Visual Studio, was failing in Azure, because the file was not yet implemented in the project.

    Tl;dr: Right-click the Css file and then "Include in project"

提交回复
热议问题