This project is read-only.

SimpleInjector.Integration.Web.Mvc, Version=2.6.1.0 uses System.Web.Mvc, Version=3.0.0.1 which has a higher version than referenced assembly System.Web.Mvc, Version=3.0.0.0

Dec 2, 2014 at 7:38 PM
Edited Dec 2, 2014 at 7:38 PM
Hi

Currently I am migrating NInject IOC to Simple Injector.I am using MVC 3 with VS2012.
I have installed using below command through Pakcage manager console.

Install-Package SimpleInjector.MVC3

It has been succesfully installed.Below is th e output
PM> Install-Package SimpleInjector.MVC3
Attempting to resolve dependency 'WebActivator (≥ 1.4.4)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'SimpleInjector (≥ 2.6.1)'.
Attempting to resolve dependency 'SimpleInjector.Integration.Web.Mvc (≥ 2.6.1)'.
Attempting to resolve dependency 'SimpleInjector.Integration.Web (≥ 2.6.1)'.
Successfully installed 'WebActivator 1.4.4'.
Successfully installed 'SimpleInjector 2.6.1'.
Successfully installed 'SimpleInjector.Integration.Web 2.6.1'.
Successfully installed 'SimpleInjector.Integration.Web.Mvc 2.6.1'.
Successfully installed 'SimpleInjector.MVC3 2.6.1'.
Successfully added 'WebActivator 1.4.4' to MDA.Web.
Successfully added 'SimpleInjector 2.6.1' to MDA.Web.
Successfully added 'SimpleInjector.Integration.Web 2.6.1' to MDA.Web.
Successfully added 'SimpleInjector.Integration.Web.Mvc 2.6.1' to MDA.Web.
Successfully added 'SimpleInjector.MVC3 2.6.1' to MDA.Web.

It has been added SimpleInjectorInitializer class in App_start folder.
Now when I build application, it gives me below error.


Error 166 Assembly 'SimpleInjector.Integration.Web.Mvc, Version=2.6.1.0, Culture=neutral, PublicKeyToken=984cb50dea722e99' uses 'System.Web.Mvc, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'C:\MDA.Web\packages\SimpleInjector.Integration.Web.Mvc.2.6.1\lib\net40\SimpleInjector.Integration.Web.Mvc.dll MDA.Web

Can you please suggesst how to resolve this error?
Dec 2, 2014 at 7:52 PM
Edited Jan 21, 2015 at 9:35 PM
This probably happens because SimpleInjector.Integration.Web.Mvc was built on a machine that had the latest security patch for ASP.NET MVC installed. It therefore references MVC 3.0.0.1. You should really consider installing that security patch KB2993937, because the vulnerability is quite serious.

If this patch is already installed, it might be caused by some configuration issues. Take a look at this stackoverflow q/a for more information.
Marked as answer by sudhirdlnet on 12/2/2014 at 12:38 PM
Dec 2, 2014 at 8:40 PM
Thanks for pointing me to tight direction.
After Installation security patch for MVC3, I removed the reference of System.Web.MVC and again re-added. Also used binding tag, it solved above error.
Many Thanks