Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Brett Spencer 88 posts 259 karma points
    Nov 12, 2015 @ 21:07
    Brett Spencer
    0

    System.Web.MVC Dependency Issue from 7.2.8 to 7.3.1

    I have been trying for a week to update to to the latest version in hopes that the grid RTE macro bug has been fixed.

    So after a week of trying, and updating VS, Nuget Package Manager, blah, blah, blah... I need to ask for help. I can not get it to work in my VS2013 project.

    Could not load file or assembly 'System.Web.Mvc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Any ideas why this is happening? If the first place anyone goes is the web.config (as I've seen in other threads)... I don't know why this should or would be an option.

    I'm looking at project reference and it calls for version 4.0.2x.0. I see the webconfig now references 5.x.x. I noticed during the install from Nuget that MVC dll was being updated and does not show as available for update in Nuget anymore. What gives? Is the installer not updating Project references?

  • Marc Goodson 2149 posts 14354 karma points MVP 8x c-trib
    Nov 14, 2015 @ 10:02
    Marc Goodson
    0

    Hi Brett

    Yes Umbraco 7.3.x now uses MVC 5

    So the binding redirects 'should' have been updated via nuget.

    I know when upgrading to 7.3.0 some binding redirects were missed by nuget: http://issues.umbraco.org/issue/U4-7193

    When I run into these kind of problems after upgrades, I've found it can be helpful to spot the problem by downloading a fresh copy of the version of Umbraco you are trying to upgrade to; and comparing using winmerge or similar the web.config files to see 'what version redirects' should be in place.

    eg for 7.3.1, there is a redirect for System.Web.Mvc as follows:

       <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
          </dependentAssembly>
    

    and packages.config file should have an entries to MVC5 here:

     <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net451" />
      <package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net451" />
      <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebHelpers" version="3.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebPages.Data" version="3.2.3" targetFramework="net451" />
      <package id="Microsoft.AspNet.WebPages.WebData" version="3.2.3" targetFramework="net451" />
    

    There is some information in a blog post Sebastiaan wrote about the differences between an Umbraco project based on MVC4 and one on MVC5 which might also help pinpoint the problem:

    http://umbraco.com/follow-us/blog-archive/2015/7/29/upgrading-your-umbraco-site-to-mvc5-and-webapi2/

  • Brett Spencer 88 posts 259 karma points
    Sep 13, 2016 @ 20:05
    Brett Spencer
    0

    After resolving dependancies. This was my next error.

    Inheritance security rules violated by type: 'System.Web.Mvc.MvcWebRazorHostFactory'. Derived types must either match the security accessibility of the base type or be less accessible.

    I re-ran these update recommendations and it took care of the issue:

    http://umbraco.com/follow-us/blog-archive/2015/7/29/upgrading-your-umbraco-site-to-mvc5-and-webapi2/

    Now at the update database screen.

Please Sign in or register to post replies

Write your reply to:

Draft