title: use a minifier and bundler with castle under .net 4
body: <p>I have tried both squshit and rejuicer to try and combine and minify some css and js from within a view.  So far no luck.  What I have done is in a filter I put</p>
  
  <pre><code>#region using
      using System;
      using Castle.MonoRail.Framework;
      using campusMap.Models;
      using MonoRailHelper;
      using Rejuicer;
  #endregion
  
  namespace campusMap.Filters
  {
      public class scriptFilter : IFilter
      {
          public bool Perform(ExecuteWhen exec, IEngineContext context, IController controller, IControllerContext controllerContext)
          {
              controllerContext.PropertyBag["adminRejuicer_css"] = OnRequest.ForCss("~/Content/css/min/Combined.css").Compact;
              controllerContext.PropertyBag["adminRejuicer_js"] = OnRequest.ForJs("~/Content/js/min/Combined.js");
              //controllerContext.PropertyBag["JavaScriptBundle"] = new JavaScriptBundle();
              return true;
          }
      }
  }
  </code></pre>
  
  <p>then on the base controller</p>
  
  <pre><code>#region Directives
      using Castle.MonoRail.Framework;
      using campusMap.Services;
      using System.Text.RegularExpressions;
      using System;
      using campusMap.Models;
      using Castle.ActiveRecord;
      using MonoRailHelper;
      using campusMap.Filters;
      using log4net;
      using log4net.Config;
      using System.Text;
  
  #endregion
  namespace campusMap.Controllers
  {
      [Filter(ExecuteWhen.BeforeAction, typeof(scriptFilter))]
      [Layout("default"), Rescue("generalerror")]
      public abstract class BaseController : MonoRailHelper.HelperBaseController
      {
      }
  </code></pre>
  
  <p>And then lastly from with in the view</p>
  
  <pre><code>    $adminRejuicer_css.File("~/Content/css/admin_styles.css").File("~/Content/js/colorpicker/css/jpicker-1.1.6.min.css")
  </code></pre>
  
  <p>But nothing.  If I do basically the same thing with squshit but in the filter its</p>
  
  <pre><code>    controllerContext.PropertyBag["cssBundle"] = Bundle.Css();
  </code></pre>
  
  <p>and in the veiw</p>
  
  <pre><code>    $cssBundle.Add("~/Content/css/admin_styles.css").Add("~/Content/js/colorpicker/css/jpicker-1.1.6.min.css").Render("~/Content/css/min/admin.css")
  </code></pre>
  
  <p>This time it at least just outputs the tags for the two scripts, not minified or bundled but at the least it's doing something.</p>
  
  <p>Any ideas on how to do this?
  thank you -Jeremy</p>