174
questions
1
vote
3
answers
2k
views
Blazor / ASP.NET Text Compression - Google speed test do not agree, why?
I have a blazor application where I added text compression, that way:
context.Services.AddResponseCompression(o =>
{
o.EnableForHttps = true;
});
// We use Brotli by ...
0
votes
0
answers
178
views
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 ...
0
votes
2
answers
954
views
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 ...
0
votes
1
answer
524
views
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 ...
0
votes
1
answer
2k
views
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 ...
1
vote
1
answer
372
views
Add additional ordered bundles to a DynamicFolderBundle?
I have a DynamicFoldewrBundle :
bundles.Add(new DynamicFolderBundle("userScripts", "*.js", true, new JsMinify()));
So If I run :
http://optimization.localtest.me/files/templates/designs/...
7
votes
2
answers
1k
views
Sitecore 8, .NET 4.6, Bundles Returning 404
I am running Sitecore 8 (Update 5) on .NET 4.6 and am running into an issue with Bundles returning a 404 error.
My layout view:
@using Sitecore.Mvc.Presentation
@using Sitecore.Mvc
@model ...
0
votes
1
answer
458
views
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 ...
2
votes
0
answers
996
views
Add other projects stylesheet to Bundleconfig
I have a common solution MyApp. Within this, I have more than 2 projects like MyCommon,MyInclude,MyWeb. I want to place stylesheets,scripts in a common project and refer them in other projects. Now I ...
4
votes
0
answers
883
views
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 ...
3
votes
1
answer
285
views
System.web.optimization AssetManager increases memory usage
I am doing so memory analysis for our project there is excessive usage of memory.
This is what I got when I did a deep analysis.
1
vote
1
answer
236
views
ASP.NET Minification removes javascript function name in some scenarios
Good Day,
I am using default ASP.NET 4.5.1 bundling. All scripts are minified as expected apart of the following code:
var events = [
function Create() {
},
function Delete() {
}
];
...
0
votes
1
answer
522
views
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:
<script src="/bundles/sampleJs?...
1
vote
1
answer
2k
views
How to troubleshoot Angular JS Unknown Provider error in minified code
While the app works in debug mode, when release mode switches on .NET bundles, I get the Unknown Provider error. The problem is there many sources (Bootstrap UI and other third-party controls besides ...
2
votes
1
answer
715
views
CSS minification and bundling replaces 0px with 0 in calc, so content doesn't render properly
I'm using Microsoft.AspNet.Web.Optimization (1.1.3) from an MVC 5.1 site to bundle and minify my CSS and it is replacing values of 0px with 0 in release mode and this causes rendering issues. Is it ...
2
votes
1
answer
2k
views
register bundle for "jqgrid" in scriptmanager
I am new to bundle and optimization and trying to understand.
I am creating bundle in site containing Webform and .Net Framework 4.0. I have created 'BundleConfig.cs' in which i am creating bundles. ...
1
vote
1
answer
68
views
Bundler renders styles merged and minified in Debug mode
Using VS 2013 Update 3 I am creating a new ASP MVC 5 app.
Changing nothing, running this web app with F5, and monitoring the http trafic with fiddler I am seeing that one merged and minified CSS ...
0
votes
1
answer
509
views
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 ...
8
votes
2
answers
5k
views
How to remove System.Web.Optimization from MVC5
I have a new ASP.NET MVC5 project. I don't want to use Microsoft bundling and minification so I removed the nuget package and the dependencies that I also don't want.
I ensured there was nothing ...
0
votes
1
answer
290
views
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 ...
20
votes
3
answers
10k
views
Do not minify certain files in ASP .NET MVC 4 BundleConfig
I don't want to minify all the files I use in my ASP .NET MVC 4 solution. So for example I have this in my BundleConfig.cs:
bundles.Add(new StyleBundle("~/CSS/bootstrap").Include(
"~/Content/...
1
vote
0
answers
97
views
ASP.NET web optimization framework
I am bundling and minifying my javascript files as shown below
bundles.Add(new ScriptBundle("~/bundles/CommunityMaintenance")
.Include(
"~/Scripts/Common.js",
...
14
votes
3
answers
5k
views
Don't uglify certain file when using Microsoft Web Optimization Framework
I am trying to concat lots of .js files into a single one using Microsoft Web Optimization framework. Everything works, but within those files I have several that are already minified & uglified ...
8
votes
2
answers
11k
views
Turn off bundling/minification while debugging in WebForms
I want to be able to minify/bundle my javascript files in a production environment while having them unminified/unbundled when debugging locally; however, the default WebForms site in VS2012 does not ...
0
votes
1
answer
725
views
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....
2
votes
2
answers
1k
views
minifying signalr hubs auto-generated proxy
My app is using a SignalR 1.1.2 on ASP.NET MVC
It has the following call in the View
This uses the auto-generated hub.
At this point all client and server side methods are done.
Can I get a ...
0
votes
1
answer
63
views
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 ...
20
votes
8
answers
44k
views
Could not load file or assembly 'WebGrease' one of its dependencies. The located assembly's manifest definition does not match the assembly reference
This issue has many solutions, please read all answers below, they might help you solve your problem too. If you find a new way to solve this, please document in your answer
I am trying to add ...
4
votes
1
answer
1k
views
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 ...
1
vote
1
answer
2k
views
Toolkitscript manager's scripts size too larg when donloaded to the client browser hence degrading sites performance
I am using ajax toolScriptManager since I've used update panel, calendar and mask extender. But when I observe the network instances the ToolScriptManager generates four javascripts files which are ...
4
votes
2
answers
2k
views
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:/...
3
votes
2
answers
1k
views
ASP.NET Bundling: Run IBundleTransform even when not optimizing
We're using System.Web.Optimization bundling to bundle & compress our JS and CSS.
We also use a custom IBundleTransform implementation in addition to to the existing JsMinify and CssMinify to do ...
13
votes
1
answer
5k
views
Ordering of Files within a bundle - What are the known libraries?
In Bundling and Minification, I've known that the bundler will move around certain known file types -- so that things like jQuery will be moved to the front.
By default, when files are bundled by ...
5
votes
1
answer
11k
views
"The located assembly's manifest definition does not match the assembly reference" on nuget package
So I was persistently getting this error on the System.Web.Optimization package
Could not load file or assembly 'System.Web.Optimization' or one of its dependencies. The located assembly's manifest ...
17
votes
2
answers
6k
views
Bundle file location in ASP.NET MVC
Where are the generated bundle files placed?
bundles.Add(new ScriptBundle("~/bundles/jqueryall")
.IncludeDirectory("~/scripts/", "*.js", true)
2
votes
1
answer
1k
views
Catching and logging MVC4 message about "Minification failed. Returning unminified contents"
There are a number of questions on StackOverflow that talk about getting the Minification failed. Returning unminified contents error from the MVC4 minification.
I'd like to know if there is a way to ...
4
votes
1
answer
6k
views
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 ...
3
votes
2
answers
2k
views
Why Can't I Minify Angular.js?
I'm trying to use Microsoft's Web Optimization bundling toolkit, which works well for everything else.
When I try to ask it to minify AngularJS, though, I get this error message in the resultant ...
4
votes
2
answers
6k
views
'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....
1
vote
0
answers
214
views
System.Web.Optimization - Make Minified JS and CSS Cache Forever
I would like the output of bundles minified with the built-in JsMinify and CssMinify to have "cache forever" semantics so that browsers don't keep requesting them over and over. The resultant URLs ...
0
votes
1
answer
274
views
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 ...
0
votes
1
answer
68
views
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=...
2
votes
2
answers
634
views
How to add .min and .debug files in a bundle effectively
I want to take advantage of .min and .debug versions of js and css files.
Consider this bundle for example:
bundles.Add(
new ScriptBundle("~/scripts/vendor")
.Include("~/...
2
votes
1
answer
1k
views
Script Bundling in WebForms with Virtual Directories
We have a separate "Framework" project for shared controls, javascript, etc. that is used by this and other projects. The Framework project is included in our solution, and we made a virtual ...
0
votes
1
answer
159
views
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 ...
15
votes
1
answer
4k
views
Can you pre-cache ASP.NET Bundles?
Every time I deploy an MVC web application my server has to re-cache all js and css bundles.
Because of this it can take several seconds for the first view to render after deploying.
Is there a ...
4
votes
0
answers
960
views
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 ...
1
vote
1
answer
2k
views
Regarding js & css file bundle & minification
i never use this feature.so i am reading few article on it.some confusion created in my mind after reading a article on bundle & minification. so i would like to know & clear those confusion ...
1
vote
1
answer
1k
views
MVC4 bundle js minification error, is this a bug?
I tried to run the bundle of MVC4 on javascript files that contain the following function:
$.fn.ApplyBehavior = function (behaviors) {
var fns = behaviors.split(",");
var $t = $(this);
$....
3
votes
1
answer
648
views
Is there any way to read System.Web.Optimization contents from code-behind?
Is there any way to read System.Web.Optimization contents from code-behind?
I tried poking around the dll, but I couldn't find a way to read the bundle contents (as far as I can tell, it was meant to ...