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
0
votes
0 answers

Bundling and minification in ASP.Net Web API + AngularJS projects

We have several projects at hand in our team but all of them have the same architecture, and recently we decided to implement bundling and minification in all of them. so we user ASP.Net Web API alongside AngularJS and we don't use ASP.Net MVC, so…
0
votes
2 answers

Bundled scripts/css are not being recognized

I am very new to Bundling and minification, I try to implement it for the first time in my MVC project. I have added a BundleConfig.cs file: public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { …
user3378165
  • 6,546
  • 17
  • 62
  • 101
0
votes
1 answer

How to use ASP.NET 4.5 Bundling & a CDN to get Bootstrap 3.2?

I am a new ASP.NET developer and I am trying to use one of the greatest features of ASP.NET 4.5 which is Bundling feature. It appears to have some support for use of CDNs. I am struggling right now in using Bundling for getting the bootstrap 3.2.0.…
0
votes
1 answer

Could not load file or assembly 'WebGrease, Version=1.5.1.25624 - Or any other version

I have the same issue found in these questions Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies Could not load file or assembly 'WebGrease' one of its…
0
votes
1 answer

c# Bundle Transform Break cache

I would like to create a bundle transform that modifies the bundle content and triggers the cache to break, however I am not able to break the cache. So far I have the following code:- public class BundleConfig { public static void…
Joe
  • 1,847
  • 2
  • 17
  • 26
0
votes
1 answer

How to programmatically invalidate or refresh JavaScript and CSS bundles without restarting the web application?

I understand that when using bundles for JavaScript and CSS the web application is caching the bundles and using a caching key for it, something like the following:
Yovav
  • 2,557
  • 2
  • 32
  • 53
0
votes
1 answer

ScriptBundle IncludeDirectory Length Maximum For Filenames?

Is there a maximum filename length in ASP.NET's ScriptBundle .IncludeDirectory method when search sub directories is enabled? When I include a file that has a long descriptive name and then launch the project my Visual Studio 2013 Professional…
0
votes
1 answer

Microsoft bundles return 404 occasionally on deployment or in development

I have a really weird situation, for months now, and not being able to find a solution. In a .net application using mvc bundles, i create a new bundle in every request, containing the scripts and styles needed for this request. This is working just…
d3bgger
  • 339
  • 2
  • 12
0
votes
1 answer

Absolute path generated by ASP.NET Bundling - how to generate relative path instead?

I am trying to get ASP.NET Bundling to change the way it generates paths for JS/CSS bundles. If my site is hosted on http://example.com/myapp and i use Scripts.Render("~/bundles/js") and Styles.Render("~/bundles/css"), this is what i get:
David McClelland
  • 2,686
  • 4
  • 28
  • 37
0
votes
1 answer

ASP powered CSS file and bundling

For a while now I have adopted the practice of writing my CSS in an .aspx page and serving that page as CSS. Primarily this is because a project I was involved on had a development 'CDN' before images were finally hosted on the actual CDN, so when…
Chris
  • 2,630
  • 3
  • 31
  • 58
0
votes
1 answer

MVC5 Bundler being too greedy?

I have a bundle bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); Here is my script folder's jquery prefixed scripts Why (when i build for release) is my 90.4KB minified file…
0
votes
1 answer

Is it possible call Include() with invalid characters (?) in System.Web.Optimization.Bundle?

I was trying to include a URL to a Bundle that requires a parameter to genereate the script, as such: scriptBundle = BundleConfig.GetBundle("~/js/"). Include("~/Handlers/culture.ashx?c=pt-br"); The problem is that it throws an…
mateuscb
  • 10,150
  • 3
  • 52
  • 76
0
votes
1 answer

Single Page Apps JumpStart - ScriptBundle not bundling new scripts

I have been using Single Page Apps JumpStart on PluralSight developing a new app with all these new JavaScript libraries. I keep running into this reoccurring issue where in each chapter I add the new scripts that I need as part of the bundle. In…
0
votes
4 answers

ASP.NET MVC 4.0 Bundles with Multiple Absolute URLs for Styles

I have some of my application "Styles" and "Scripts" are referred from different environment applications. local-sites are referring from http://localhost:123/mystyles/default.css Dev site is referring from…
HaBo
  • 13,999
  • 36
  • 114
  • 206
0
votes
1 answer

Mvc Bundling, Cache with Content or Cache with file name?

I'm deciding to remove all versions from static content that has been referenced in my Mvc Web Application. but I need caching. I want to know does the browser cache contents by file name or by content ? for example if I Bundle a Jquery version 1.6…
1 2 3
11
12