1

I've installed vs 2013 and I'm getting so many weird errors that it is becoming disturbing.

I do not even know what to think about this error.

Can someone tell me how to overcome this error?

enter image description here

For a larger screen shot of the error see this link.

http://www.storefrontdoors.net/!/vs-2013-error.png

  • This has already been answered here: [Upgrading From MVC4 to MVC5](http://stackoverflow.com/questions/17454852/upgrading-from-mvc4-to-mvc5-pre-release) – bane Nov 14 '13 at 04:35

1 Answers1

1

Root cause

Your project is referencing assembly version 2.0 from GAC (global assembly cache) and after install VS2013 it has been replaced with new assembly version 3.0 in windows GAC.

solution.

remove and re-add references to new version in your web app project.

also update your web.config find the assembly config under system.web section

<system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <!-- ... -->
        <add assembly="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </assemblies>
    </compilation>

then correct your assembly version

optional.. binding old assembly version to new one under web.config runtime section

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <!-- ... -->
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
aifarfa
  • 3,939
  • 2
  • 23
  • 35