C# 捆绑和缩小错误
我知道捆绑和缩小只有在不处于调试模式时才起作用C# 捆绑和缩小错误,c#,css,asp.net,twitter-bootstrap,visual-studio-2013,C#,Css,Asp.net,Twitter Bootstrap,Visual Studio 2013,我知道捆绑和缩小只有在不处于调试模式时才起作用 <compilation debug="false" targetFramework="4.5"/> 还有VS工作室的结构 如果我检查我的index.cshtml @using System.Web @using System.Web.Optimization <!DOCTYPE html> <html> <head> <title>CCJS</title>
<compilation debug="false" targetFramework="4.5"/>
还有VS工作室的结构
如果我检查我的index.cshtml
@using System.Web
@using System.Web.Optimization
<!DOCTYPE html>
<html>
<head>
<title>CCJS</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
@Styles.Render("~/Content/css")
<script language="javascript">
// Must be first. IE10 mobile viewport fix
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
var mq = "@@-ms-viewport{width:auto!important}";
msViewportStyle.appendChild(document.createTextNode(mq));
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
</script>
@Scripts.Render("~/scripts/modernizr")
</head>
<body>
<div id="applicationHost">
@RenderPage("_splash.cshtml")
</div>
@Scripts.Render("~/scripts/vendor")
<script src="~/Scripts/require.js" data-main="App/Main"></script>
</body>
</html>
@使用System.Web
@使用System.Web.Optimization
CCJS
@style.Render(“~/Content/css”)
//必须是第一位。IE10移动视口修复程序
if(navigator.userAgent.match(/IEMobile\/10\.0/){
var msViewportStyle=document.createElement(“样式”);
var mq=“@@-ms viewport{width:auto!important}”;
msViewportStyle.appendChild(document.createTextNode(mq));
document.getElementsByTagName(“head”)[0].appendChild(msViewportStyle);
}
@Scripts.Render(“~/Scripts/modernizer”)
@渲染页面(“\u splash.cshtml”)
@Scripts.Render(“~/Scripts/vendor”)
您可以将此行添加到BundleConfig.cs
//note: you can map isCompressionEnabled to your webconfig appSettings
BundleTable.EnableOptimizations = isCompressionEnabled;
//note: you can map isCompressionEnabled to your webconfig appSettings
BundleTable.EnableOptimizations = isCompressionEnabled;