WebActivatorEx

using System;
using NLog;
using System.Web.Optimization;

    
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(Penseesoft.Web.Setting.App_Start.BundleTableSetting), "PreStart")]
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(Penseesoft.Web.Setting.App_Start.BundleTableSetting), "PostStart")]
namespace Penseesoft.Web.Setting.App_Start
{
    
    public static class BundleTableSetting
    {
    
        public static void PreStart()
        {
            
            LogManager.GetCurrentClassLogger().Trace("PreStart");
            BundleTable.EnableOptimizations = false;
            LogManager.GetCurrentClassLogger().Trace("BundleTable.EnableOptimizations is false");
        }
        public static void PostStart()
        {
            
            LogManager.GetCurrentClassLogger().Trace("PostStart");
        }
    }
}
WebActivatorEx的用法,
assembly的Attribute不能包含在namespace内,为了这个弄了几小时orz
posted on 2016-01-12 09:46  聪明的大熊  阅读(1017)  评论(0编辑  收藏  举报