在App_Code中添加BundleConfig.cs
using System.Web.Optimization;
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new StyleBundle("~/bundles/news.css")
.Include("~/common/screen_base.css",
"~/common/screen_news.css"));
bundles.Add(new ScriptBundle("~/bundles/news.js")
.Include("~/script/news_common.js",
"~/script/detail.js",
"~/script/share.js"));
}
}
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new StyleBundle("~/bundles/news.css")
.Include("~/common/screen_base.css",
"~/common/screen_news.css"));
bundles.Add(new ScriptBundle("~/bundles/news.js")
.Include("~/script/news_common.js",
"~/script/detail.js",
"~/script/share.js"));
}
}
出现:命名空间“System.Web”中不存在类型或命名空间名称“Optimization”
本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/p/4568782.html,如需转载请自行联系原作者