Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

I get the following error below after opening and compiling my MVC4 project in VS 2010.

CS1705: Assembly 'SDEM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

In my web.config I have

    <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

Anyone have some clue what I should do to solve this version problem?

like image 508
Mona Avatar asked Mar 17 '15 07:03

Mona


2 Answers

It shows that the assembly you referenced in the project has different version(4.0.0.1) as what you have in web.config(4.0.0.0).

Please check that the referenced assembly for System.Web.Mvc is the same as written in the web.config.

If not then add reference to the appropriate assembly. Right click References -> Add Reference -> ...

like image 194
Sarim Javaid Khan Avatar answered Oct 16 '22 04:10

Sarim Javaid Khan


Install Nuget Package Microsoft.AspNet.Mvc for all the project referencing System.Web.Mvc dll

Example: Install-Package Microsoft.AspNet.Mvc

like image 28
shamim Avatar answered Oct 16 '22 02:10

shamim