命名空间“System.Web”中不存在类型或命名空间名称“Optimization”解决方法
2015-06-11 12:39
441 查看
在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"));
}
} 出现:命名空间“System.Web”中不存在类型或命名空间名称“Optimization”
解决方法 :
通过NuGet添加Microsoft ASP.NET Web Optimization Framework的引用
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"));
}
} 出现:命名空间“System.Web”中不存在类型或命名空间名称“Optimization”
解决方法 :
通过NuGet添加Microsoft ASP.NET Web Optimization Framework的引用
相关文章推荐
- 30个实用的Linux find命令示例
- Windows + Apache 2.2+Tomcat7 集群配置
- BZOJ 1798: [Ahoi2009]Seq 维护序列seq( 线段树 )
- windowns里ntfs下分区的目录如何在linux下smb共享--2006-10-19 博客搬家
- org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the
- 橙色版雷风幸运28网站源码商业版(PHP+MYSQL)仿豆豆网
- shell学习第八天----扩展正则表达式(ERE)
- linux内存源码分析 - SLAB分配器概述
- cdlinux 安装到虚拟机中,百度经验上是错误的。
- Tomcat内存设置
- linux 如何查找命令的路径
- 基础知识——CentOS7操作系统的安装图文教程
- jmx配置远程监控
- RHEL5.4 x86_64 使用CentOS5的更新源
- php中smarty实现多模版网站的方法
- 程序员 Linux 日常维护 命令
- ECS Linux系统启动过程介绍
- Linux-启动挂载
- HBase 常用Shell命令
- ECS Linux通过Xshell 配置密钥key免密码登录