Мне недавно пришлось загрузить новую версию моего сайта из моего проводника. Теперь, похоже, возникают проблемы с использованием правильного файла css. Это как если бы он смотрел на более старую версию где-то, но я не могу сказать, почему и где она будет выглядеть.Visual Studio вытаскивает неправильный файл CSS на отладку
Я проверил комплект и имеет правильное имя/местоположение файла. Я проверил файл, и он имеет правильный код.
Вот мой код
Layout (до главы минус аналитики)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - Coverpools Dealer Portal</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
@Styles.Render("~/Content/magnific_css")
@Scripts.Render("~/bundles/modernizr")
<link href="~/Content/magnific-popup.css" rel="stylesheet" />
@Styles.Render("~/Content/themes/base/css")
@Styles.Render("~/Content/css")
</head>
расслоения (в том числе все, в случае, если я что-то отсутствует)
using System.Web;
using System.Web.Optimization;
namespace Infotech.Coverpools.Portal.Tintaglia.Web
{
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
// 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/quotes").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-{version}.js",
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*",
"~/Scripts/quotes.js"));
bundles.Add(new ScriptBundle("~/bundles/magnific").Include(
"~/Scripts/jquery.magnific-popup.min.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/site.css",
"~/Content/PagedList.css",
"~/Content/Responsive.css",
"~/Content/custom.css")); // this is the custom file I believe it should be pulling
bundles.Add(new StyleBundle("~/Content/magnific_css").Include("~/Content/magnific-popup.css"));
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.resizable.css",
"~/Content/themes/base/jquery.ui.selectable.css",
"~/Content/themes/base/jquery.ui.accordion.css",
"~/Content/themes/base/jquery.ui.autocomplete.css",
"~/Content/themes/base/jquery.ui.button.css",
"~/Content/themes/base/jquery.ui.dialog.css",
"~/Content/themes/base/jquery.ui.slider.css",
"~/Content/themes/base/jquery.ui.tabs.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.progressbar.css",
"~/Content/themes/base/jquery.ui.theme.css"));
}
}
}
custom.css от моего местный сайт (то, что он должен быть расположен в ..Web/Content/custom.css)
/* main layout
----------------------------------------------------------*/
/* site title
----------------------------------------------------------*/
/* login
----------------------------------------------------------*/
/* NOTICE THIS SECTION IS MISSING THE RUNNING VERSION menu
----------------------------------------------------------*/
ul#accountMenu {
font-size: 1em;
font-weight: 600;
margin: 0 0 5px;
padding: 0;
text-align: left;
}
ul#accountMenu li {
display: inline;
list-style: outside none none;
padding-left: 15px;
}
ul#accountMenu li a {
background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
color: #999;
text-decoration: none;
}
ul#accountMenu li a:hover {
color: #333;
text-decoration: none;
}
/* page elements
----------------------------------------------------------*/
/*Text*/
.important-message{
color: red
}
/* featured */
/* page titles */
/* features */
/* ordered list */
/* content */
/* login page */
/* contact */
/* forms */
/* info and errors */
/* styles for validation helpers */
/* tables
----------------------------------------------------------*/
/********************
* Mobile Styles *
********************/
/*@media only screen and (max-width: 850x) { */
/* header
----------------------------------------------------------*/
/* logo */
/* login */
/* menu */
/* main layout
----------------------------------------------------------*/
/* page content */
/* ordered list */
/* features */
/* forms */
/* login page */
/* mobile footer
----------------------------------------------------------*/
custom.css (от работающей версии)
/* main layout
----------------------------------------------------------*/
/* site title
----------------------------------------------------------*/
/* login
----------------------------------------------------------*/
/* menu
----------------------------------------------------------*/
/* page elements
----------------------------------------------------------*/
/* featured */
/* page titles */
/* features */
/* ordered list */
/* content */
/* login page */
/* contact */
/* forms */
/* info and errors */
/* styles for validation helpers */
/* tables
----------------------------------------------------------*/
/********************
* Mobile Styles *
********************/
@media only screen and (max-width: 850x) {
/* header
----------------------------------------------------------*/
/* logo */
/* login */
/* menu */
/* main layout
----------------------------------------------------------*/
/* page content */
/* ordered list */
/* features */
/* forms */
/* login page */
/* mobile footer
----------------------------------------------------------*/
Сгенерированный HTML ДО главы
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>All Users - Coverpools Dealer Portal</title>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
<link href="/Content/magnific-popup.css" rel="stylesheet"/>
<script src="/Scripts/modernizr-2.6.2.js"></script>
<link href="/Content/magnific-popup.css" rel="stylesheet" />
<link href="/Content/themes/base/jquery.ui.core.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.resizable.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.selectable.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.accordion.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.autocomplete.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.button.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.dialog.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.slider.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.tabs.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.datepicker.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.progressbar.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.theme.css" rel="stylesheet"/>
<link href="/Content/site.css" rel="stylesheet"/>
<link href="/Content/PagedList.css" rel="stylesheet"/>
<link href="/Content/Responsive.css" rel="stylesheet"/>
<link href="/Content/custom.css" rel="stylesheet"/>
</head>
Я даже попытался жестко прописывать custom.css, но до сих пор получить тот же файл custom.css. Это как если бы он искал файл где-то еще.
Спасибо, что было. Теперь я чувствую себя глупым. Я мог бы поклясться, что очистил кеш и даже попробовал другой браузер, который никогда не использовал этот файл css. Странная часть этого вопроса заключается в том, что я несколько раз запускал более позднюю версию решения с правильным файлом css, прежде чем мне пришлось повторно загрузить решение. Прошло несколько недель с тех пор, как мой файл css не включил эти изменения. –