How to reference version 1.1.0.0 of the System.Web.Optimization assembly

I'm currently trying to use a file upload called Jquery-File-Upload by BlueImp in my MVC 4 application via nugget. This file download depends on the System.Web.Optimization .

My application continues to throw this error:

Error 9 Assembly 'Backload, Version = 1.9.3.0, Culture = neutral, PublicKeyToken = 02eaf42ab375d363' uses 'System.Web.Optimization, Version = 1.1.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' which has a higher version than the link to the assembly 'System.Web.Optimization, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'

I tried setting up web.config this way

 <dependentAssembly> <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> </dependentAssembly> 

and I keep getting the same message.

I have googled and found links that ask to install Microsoft.AspNet.Web.Optimization through a nugget, which I did, but the problem is not solved.

How do I add version 1.1.0.0 to System.Web.Optimization.dll.

+4
source share
2 answers

This is how I solved this problem. First, I followed @helgans' comment under his response and still continued to get a link to version 1.0.0 of system.web.optimization in the help folder. I also deleted the dll from the bin folder of my site and the reference version 1.1.0 from another project, but the same problem persists.

When solving the problem, I found that the old version is copied from the library folder in my application (well, I don’t know how to do this). This causes the reference version to remain version 1.0.0, even if I mentioned version 1.1.0 from another project or installed the NuGet package again.

To solve this problem, I did the following:

  • I deleted the dll from the Library folder.
  • Removed old version link (thanks @helgans)
  • Removed dll from bin folder
  • Unistall package: Uninstall-Package Microsoft.AspNet.Web.Optimization -Force
  • Reinstall package

Now NuGet adds a link to version 1.1.0

+3
source

This is because Backload internally refers to Microsoft.AspNet.Web.Optimization version 1.1.0. In a new MVC project, you usually refer to the old version 1.0.0. You only need to update the new one:

Right-click the links in your project, select "Manage NuGet Packages" and in the dialog that appears, select "Updates" in the left panel. Then in the middle pane, find "Microsoft ASP.NET Web Optimization Framework" version 1.1.0

NuGet: http://www.nuget.org/packages/Microsoft.AspNet.Web.Optimization/

Described here: http://docs.nuget.org/docs/start-here/managing-nuget-packages-using-the-dialog

+6
source

All Articles