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

Force uninstall the package using Package Manager Console uninstall-package -f WebGrease then install the previous version 1.3.0 using the following command install-package WebGrease -Version 1.3.0 Open your Web.config file and replace below dependency under runtime tag <dependentAssembly> <assemblyIdentity name=”WebGrease” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” /> <bindingRedirect oldVersion=”0.0.0.0-1.3.0.0″ newVersion=”1.3.0.0″ />

Upgrading WebGrease to version 1.3.0 gets me error

Here is the answer that has worked for me, and it is a combination of some of the above answers. First install / uninstall / reinstall the following packages: Install-Package Microsoft.AspNet.Web.Optimization Update-Package WebGrease Uninstall-Package Microsoft.AspNet.Web.Optimization Uninstall-Package WebGrease Install-Package Microsoft.AspNet.Web.Optimization Update-Package WebGrease Then make a copy of the contents of ~/Views/Shared/_Layout.cshtml delete the _Layout.cshtml file, recreate … Read more

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

I know it’s kind of late for the OP but I ran into the same problem while trying out the Bootstrap 3 for MVC 4 NuGet package, in my case it had something to do with the Microsoft.AspNet.Web.Optimization package, and managed to find a simple solution. Try executing the following commands in the package manager … Read more