2
votes

Compiler Error Message: CS1705: Assembly 'Facebook.Web.Mvc, Version=5.0.3.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de' uses 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

This is despite I removed he refference to System.web.Mvc ver2 and added the refference to the ver 3

Why?

1

1 Answers

2
votes

Ensure that in your web.config the proper version is loaded:

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

and that you have a proper redirect:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
</runtime>