当我通过 nuget 从Microsoft ASP.NET Web Optimization Framework 1.0.0-beta2升级 到Microsoft ASP.NET Web Optimization Framework 1.0.0时,我的一些脚本不再呈现到页面上。这看起来很奇怪,我想知道我是否需要做一些修改来升级它。
使用 beta2,我得到了以下脚本:
<script src="/Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery-1.8.1.js" type="text/javascript"></script>
<script src="/Scripts/less-1.3.0.min.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap.min.js" type="text/javascript"></script>
<script src="/Scripts/coffee-script.js" type="text/javascript"></script>
<script src="/Scripts/underscore-min.js" type="text/javascript"></script>
<script src="/Scripts/knockout-2.0.0.js" type="text/javascript"></script>
<script src="/Scripts/knockout-2.1.0.js" type="text/javascript"></script>
<script src="/Scripts/backbone-min.js" type="text/javascript"></script>
<script src="/Scripts/backbone-modelref.js" type="text/javascript"></script>
<script src="/Scripts/backbone-relational.js" type="text/javascript"></script>
<script src="/Scripts/knockback.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.gridster.min.js" type="text/javascript"></script>
<script src="/Scripts/dragdealer.js" type="text/javascript"></script>
<script src="/Scripts/pminject.coffee" type="text/javascript"></script>
但使用 RTM 我只能得到:
<script src="/Scripts/jquery-1.8.1.js"></script>
<script src="/Scripts/coffee-script.js"></script>
<script src="/Scripts/underscore-min.js"></script>
<script src="/Scripts/knockout-2.0.0.debug.js"></script>
<script src="/Scripts/knockout-2.1.0.debug.js"></script>
<script src="/Scripts/backbone-min.js"></script>
<script src="/Scripts/backbone-modelref.js"></script>
<script src="/Scripts/backbone-relational.js"></script>
<script src="/Scripts/dragdealer.js"></script>
<script src="/Scripts/pminject.coffee"></script>
我的捆绑配置非常简单:
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-1.*"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui*"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/openid").Include(
"~/Scripts/openid-jquery.js",
"~/Scripts/openid-en.js"));
bundles.Add(new ScriptBundle("~/bundles/less").Include(
"~/Scripts/less-1.*"));
bundles.Add(new ScriptBundle("~/bundles/coffeescript").Include(
"~/Scripts/coffee-script.js"));
bundles.Add(new ScriptBundle("~/bundles/underscore").Include(
"~/Scripts/underscore-min.js"));
bundles.Add(new ScriptBundle("~/bundles/knockout").Include(
"~/Scripts/knockout-2.*"));
bundles.Add(new ScriptBundle("~/bundles/backbone").Include(
"~/Scripts/backbone-*"));
bundles.Add(new ScriptBundle("~/bundles/knockback").Include(
"~/Scripts/knockback.min.js"));
bundles.Add(new ScriptBundle("~/bundles/gridster").Include(
"~/Scripts/jquery.gridster.min.js"));
bundles.Add(new ScriptBundle("~/bundles/dragdealer").Include(
"~/Scripts/dragdealer.js"));
bundles.Add(new ScriptBundle("~/bundles/pminject").Include(
"~/Scripts/pminject.coffee"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.min.js"));
}
有谁知道我是否需要做额外的步骤或更改来升级它?