Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly 'SomeAssembly, uses 'System.Web.Mvc, Version=4.0.0.0, which has a higher version than referenced assembly 'System.Web.Mvc, Version 3.0.0.0

I get the following error below after opening and compiling my VS 2010 .net 4.0 MVC3 project in VS 2012 RTM. How can I fix this without upgrading to MVC4?

I have VS 2010 and VS 2012 installed side by side.

Error 1 Assembly 'SomeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

like image 470
kyleb Avatar asked Aug 24 '12 23:08

kyleb


2 Answers

Another thing to check is that you dont have a test project still referencing the mvc3 assembly in the solution. Thats what got me.

like image 102
cobolstinks Avatar answered Oct 08 '22 04:10

cobolstinks


Check your web.config. system.web/assemblies has version 3.0 even though your project references 4.0.

It was the case for me.

like image 41
Bruno Garcia Avatar answered Oct 08 '22 02:10

Bruno Garcia