layout cshtml not rendering after publish
asp.net, asp.net-mvc, asp.net-mvc-5, razor
Solution
The _ViewStart.cshtml was in the Shared folder so I moved it out one folder and placed in the root folder, "View" and then my layout page rendered across all my views. I must of moved it by mistake and never noticed it. SMH!!!!
Problem
I have tested an application locally that renders fine on my local machine. When I publish it to a server at work the _layout.cshtml isn't rendering. Their might not be any style rendering at all from the looks of developer tools. Any suggestions because I'm stumped and Google hasn't found me any similar scenarios? I'm using MVC5 with Razor My view start has ``` @{ Layout = "~/Views/Shared/_Layout.cshtml"; } ``` Edited version....my _layout page ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - XXXXXXXXXXX</title> @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr") <meta name="Training Module" content="Website for oreintation and traing modules" /> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <img src="/Images/imgCClogoHorizontal.jpg" style="float: left; padding-top: 10px" /> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div style="padding-left: 30px"> @Html.ActionLink("XXXXXXXXXXXX", "Index", "Module", null, new { @class = "navbar-brand" }) </div> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> @* <li>@Html.ActionLink("Home", "Index", "Home")</li>*@ @* <li>@Html.ActionLink("About", "About", "Home")</li>*@ @* <li>@Html.ActionLink("Orientation Videos", "Index", "Video")</li>*@ </ul> </div> </div> </div> @Html.Action("Index", "NavigationMenu") <div class="container body-content"> <div style="display: inline"> <div style="float: left"> @RenderBody() </div> <h2> </h2> </div> </div> @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") @RenderSection("scripts", required: false) </body> </html> ``` my bundle.config... ``` 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/jquery").Include( "~/Scripts/jquery-{version}.js", "~/Scripts/jquery-ui-{version}.js")); // Use the development version of Modernizr to develop with and learn from. Then, when you're // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( "~/Scripts/bootstrap.js", "~/Scripts/respond.js")); bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", "~/Content/site.css", "~/Content/themes/base/jquery-ui.css")); } } ``` }