Questions tagged [asp.net-optimization]

Questions related to the ASP.NET Microsoft.AspNet.Web.Optimization nuGet package (System.Web.Optimization namespace), which supports bundling and minification of javascript and css files.

Project homepage: https://archive.codeplex.com/?p=aspnetoptimization

The Web optimization framework is installed via NuGet at https://nuget.org/packages/Microsoft.AspNet.Web.Optimization

Description:

The ASP.NET Web optimization framework provides services to improve the performance of your ASP.NET Web applications. Current services provided by the framework include:

bundling - combining multiple scripts or style resources together into a single resource, and thereby requiring browsers to make fewer HTTP requests

minification - making scripts or styles smaller using techniques such variable name shortening, white space elimination, etc.

Additionally, the framework has multiple extensibility points, enabling you to add new services over time.

174 questions
4
votes
0 answers

How can I still run a custom IBundleTransform when EnableOptimization is off in ASP.NET?

First the background - I'm using Handlebars for templating HTML and I want to make use of the bundling and caching capabilities of ASP.NET Bundling to deliver the templates to the client. To that end I've created my own Bundle subclass and an…
Phil
  • 2,232
  • 1
  • 26
  • 35
4
votes
1 answer

Empty Bundle using MS Bundling

I am using asp.net mvc4 and the built in bundling and minification that is provided by MS using the System.Web.Optimization library (1.1.0) with a custom LessTransform using dotless. The site is hosted in IIS 7. My problem is that intermittently…
drneel
  • 2,887
  • 5
  • 30
  • 48
4
votes
2 answers

How to add bundles with dynamic content to asp.net web optimization

I'm using SignalR, which maps to asp.net application on virtual path "~/signalr". SignalR dynamically creates javascript proxy hubs on app start with virtual path "~/signalr/hubs". So the url "[http://myapp]/signalr/hubs" is where dynamic javascript…
4
votes
1 answer

Compression of bundles created by asp.net bundling using 'System.Web.Optimization'?

I have created bundles in my asp.net web solution by using the new bundling and minification package by MS. Everything is properly bundled and minified (used global.asax way) but when I deploy on IIS the bundle is not getting compressed (gzip) , I…
4
votes
2 answers

'Microsoft.AspNet.Web.Optimization' vs 'Microsoft.AspNet.Web.Optimization.WebForms'

What is the difference between these two libraries: https://www.nuget.org/packages/Microsoft.AspNet.Web.Optimization/1.1.0 https://www.nuget.org/packages/Microsoft.AspNet.Web.Optimization.WebForms/1.0.30506
4
votes
0 answers

IncludeDirectory generate error Invalid file name for file monitoring

Code var styleBundle = new StyleBundle("~/Content/Common") { Orderer = new FileBundleOrderer(server.MapPath("/Content/bundle.txt")) } .IncludeDirectory("~/Content", "*.css", false); Error message: Invalid file name for file monitoring:…
ridermansb
  • 10,779
  • 24
  • 115
  • 226
4
votes
1 answer

How to test BundleConfig

I have a problem with my bundles. Files .min is not being generated as reported on this link. I have to create a test for it. How to do this? [TestInitialize] public void Setup() { …
ridermansb
  • 10,779
  • 24
  • 115
  • 226
4
votes
2 answers

Asp.Net MVC 4 bundle don't provide