title: Asp.net MVC 4 Bundling and Minification of directories
body: <p>I am currently creating a project using mvc 4.0 and IgniteUI..
  I am trying to bundle all the files of ignite ui...
  so i have set in the web config file this</p>
  
  <pre><code> &lt;system.web&gt;
   &lt;compilation debug="false" targetFramework="4.0" /&gt;
  </code></pre>
  
  <p>My bundlesConfig.cs</p>
  
  <pre><code>using System.Web;
  using System.Web.Optimization;
  
  namespace LicenciamentoMVC
  {
  public class BundleConfig
  {
      // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
      public static void RegisterBundles(BundleCollection bundles)
      {
          bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                      "~/Scripts/jquery-{version}.js"));
  
          bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                      "~/Scripts/jquery-ui-{version}.js"));
  
          bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                      "~/Scripts/jquery.unobtrusive*",
                      "~/Scripts/jquery.validate*"));
          //BundleTable.EnableOptimizations = true;
          // Use the development version of Modernizr to develop with and learn from. Then, when you're
          // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
          bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                      "~/Scripts/modernizr-*"));
  
          //bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
          bundles.Add(new StyleBundle("~/Content/css").IncludeDirectory("~/Content/","*.css",true));
  
          bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                      "~/Content/themes/base/jquery.ui.core.css",
                      "~/Content/themes/base/jquery.ui.resizable.css",
                      "~/Content/themes/base/jquery.ui.selectable.css",
                      "~/Content/themes/base/jquery.ui.accordion.css",
                      "~/Content/themes/base/jquery.ui.autocomplete.css",
                      "~/Content/themes/base/jquery.ui.button.css",
                      "~/Content/themes/base/jquery.ui.dialog.css",
                      "~/Content/themes/base/jquery.ui.slider.css",
                      "~/Content/themes/base/jquery.ui.tabs.css",
                      "~/Content/themes/base/jquery.ui.datepicker.css",
                      "~/Content/themes/base/jquery.ui.progressbar.css",
                      "~/Content/themes/base/jquery.ui.theme.css"));
          bundles.Add(new StyleBundle("~/bundles/cssFiles").IncludeDirectory("~/Content/CssIgniteUI/", "*.css", true));
          bundles.Add(new ScriptBundle("~/bundles/jsFiles").IncludeDirectory("~/Scripts/js/", "*.js", true));
      }
   }
  }
  </code></pre>
  
  <p>and then in the view that i want i put this, in this case index.cshtml</p>
  
  <pre><code>@{
  ViewBag.Title = "Index";
  }
  @Styles.Render("~/bundles/cssFiles")
  @Scripts.Render("~/bundles/jsFiles")
  
  &lt;h2&gt;Index&lt;/h2&gt;
  @section Scripts {
  @Scripts.Render("~/bundles/jqueryval")
  }
  </code></pre>
  
  <p>my file directory is like this:
  Project</p>
  
  <pre><code>-Content
      --CssIgniteUI(Css files of igniteui)
      --themes(default theme css files of asp.net project)
      --Site.css
  
    -Scripts
      --js(folder containing the js files from igniteui)
      --all the files that come with the default theme of the project
  </code></pre>
  
  <p>When i try to open the Cliente Controler...it gives me error...
  What am i missing?
  The page doenst appear on the browser..i am using firebug to see the files...but nthing shows..</p>
  
  <p>Thanks in advance..</p>