Questions tagged [webgrease]

WebGrease is a suite of tools for optimizing javascript, css files and images.

35 questions
72
votes
19 answers

Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

I have an MVC4 Web API project. While running the service project I am getting an error Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot…
Jidheesh Rajan
  • 4,744
  • 4
  • 23
  • 29
44
votes
14 answers

Upgrading WebGrease to version 1.3.0 gets me error

While upgrading WebGrease to version 1.3.0 gets me error: Could not load file or assembly 'WebGrease, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not…
Neeraj Mude
  • 418
  • 1
  • 4
  • 7
37
votes
5 answers

After upgrading to webgrease 1.5.1.25624 from nuget, System.IO.FileLoadException is coming

I am asp.net death page, this is coming after i upgraded webgrease and bootstrap for mvc4 using nuget. Server Error in '/' Application. Could not load file or assembly 'WebGrease' or one of its dependencies. Strong name signature could not be…
9
votes
2 answers

How to use webgrease?

WebGrease is an assembly found in mvc4, but can it be used like Yahoo.Yui.Compressor? I want to use webgrease.dll in a C# console programe and compress a javascript string to another. class Program { static void Main(string[] args) …
user1729842
  • 165
  • 1
  • 2
  • 5
7
votes
0 answers

Is it right that ASP.NET bundles get generated on every request?

We hit a performance issue recently that highlighted something that I need to confirm. When you include a bundle like this: @Scripts.Render("~/jquery) This appears to be running through (identified using dotTrace, and seen it running through…
7
votes
2 answers

WebGrease error on Styles.Render call in _Layout.cshtml in Mvc4

I'm trying to add bundling to my Mvc4 web project. The steps I took: Added a reference to my project to System.Web.Optimization Added @Styles.Render("~/Content/css") within of my _Layout.cshtml Added…
Ian Davis
  • 19,091
  • 30
  • 85
  • 133
5
votes
2 answers

System.Web.Optimization.JsMinify produces invalid JavaScript

I am using System.Web.Optimization v1.3 in what I believe is a standard configuration, to bundle and minify the JavaScript and CSS files in an MVC 5 web application. For the most part, this works very well, but I have discovered a case where…
Tim Coulter
  • 8,705
  • 11
  • 64
  • 95
5
votes
1 answer

Why Scripts.Render invoke JsMinify.Process?

I profiled my ASP.NET MVC application and I saw strange a function calls. You can see it on image Always when mvc render layout we invoke system.web.optimization.scripts.render which invoke JsMinify.Process and Minifier.MinifyJavaScript, but I…
Mediator
  • 14,951
  • 35
  • 113
  • 191
4
votes
1 answer

@Scripts.Render caused error after upgrade WebGrease.dll to 1.6.0 version and then deploy to azure web role

I uncounted a problem, after i upgraded the WebGrease.dll from 1.5.2 to 1.6.0, and deployed to azure web role, error occurred "Object reference not set to an instance of an object" , i have solved this problem by downgrade WebGrease.dll to previous…
Dragon
  • 435
  • 2
  • 6
  • 12
4
votes
2 answers

Why is a binding redirect needed in ASP.NET?

Introduction today I updated my ASP.NET MVC application and I run into the following error (in german - sorry): Die Datei oder Assembly "WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35" oder eine Abhängigkeit davon…
CKE
  • 460
  • 3
  • 14
4
votes
2 answers

Upgrading WebGrease to version 1.3.0 causes error only on production server

First off, answers to this question,do NOT solve my error: Upgrading WebGrease to version 1.3.0 gets me error I have the following bindingredirect on my production server:
Brian Ogden
  • 18,439
  • 10
  • 97
  • 176
3
votes
2 answers

System.IO.FileNotFoundException when using WebGrease via Commandline

I'm trying to use WebGrease 1.6 via command line (also tried Developer Command Prompt for VS2013). When I run "wg options", I'm getting following error (screenshot attached) Unhandled Exception: System.IO.FileNotFoundException: Could not load file…
Raj
  • 2,642
  • 3
  • 22
  • 20
3
votes
0 answers

Using WebGrease.config with bundling in ASP.Net project

I'm trying to work on with new features in bundle that's using WebGrease.config file and unfortunately its not working like Bundle.Config file and i can't use its output virtual name. I learned from this site…
Kero
  • 79
  • 2
  • 10
2
votes
1 answer

System.OutOfMemoryException error on js file load

@Scripts.Render() throws this error; An exception of type 'System.OutOfMemoryException' occurred in WebGrease.dll but was not handled in user code in my layout page when I am trying to include a 10 MB js file. Other scripts are working fine.
2
votes
0 answers

WebGrease + ECMAScript6 + VIsual Studio 2019 => fails to minify the JS code

Long time now i was using VS 2017/VS 2019 with WebGrease + ECMAScript5 Trying to switch to ECMAScript6 and i get minification error when deploying my App to Azure ( building release version ) When running locally ( debug version ) all is…
Maayan Hope
  • 1,482
  • 17
  • 32
1
2 3