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 match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 6: <title>@ViewBag.Title</title>
Line 7: @Styles.Render("~/Content/bundles/bootstrap")
How to resolve this error.
The binding redirect that worked for me:
subtle difference is i didn't include this version (1.3.0.0) in the
oldVersion
attr.fail cake!
To fix this, all i did was to Update the package.config file (WEBMATRIX)
Cheers!!!
A combination of the following resolved the issue for me. First, running the following commands on the Package Manager command line (similar to the answer provided by sec_goat, but not exactly the same):
Then, similar to Hriju, I needed to change this line in my web.config:
into this:
Thanks to @roadsunknown. My configuration got hosed after my host machine froze, thus causing my VM to not shutdown properly. To resolve this I uninstalled Microsoft.AspNet.Web.Optimization through NuGet, then had to remove the reference to WebGrease in packages.config, and finally reinstalled Microsoft.AspNet.Web.Optimization through NuGet.
This is what my runtime section looks like and it works
I had the same issue. Another developer upgraded the WebGrease package (as well as others), but something didn't sync or get checked in. I edited the package file to remove the references to the existing package. Then I reinstalled via Package Manager. Finally, I updated the packages.
It seems as though packages won't install or update if the packages.config file does not match the files (including proper versions) in your project. No error is given in the Package Manager though, it just fails to update or install packages.