This project has moved and is read-only. For the latest updates, please go here.


System.Web.MVC reference



The current release has a reference to System.Web.Mvc 2.0.0.

If you deploy any app to a shared hosting environment where MVC2 is not installed and your app is on MVC3 or MVC4, LinqtoTwitter will fail to load correctly.
Closed Jan 19, 2013 at 5:21 AM by JoeMayo


JoeMayo wrote Jan 17, 2013 at 3:24 AM

You're correct, but what happens when you use an assemblyBinding with a bindingRedirect, like this:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="" newVersion="" />
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="" newVersion="" />
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="" newVersion="" />
The tradeoff is that I can support later versions with a config file setting. However, if I upgraded to MVC 4.0, then lower versions are no longer supported and break for existing applications. If I remove the MVC authorizer, then users have an extra dependency on another DLL.

I'm open to your ideas, but need to be cautious about creating a situation that causes problems.


rodrigofdz wrote Jan 17, 2013 at 4:04 AM

Hi JoeMayo,

Actually i was getting the following exception;

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

I tried the assemblyBinding with a bindingRedirect with no success at all, my case was very special indeed, the hosting provider denied to install MVC2, i end up downloading the source code and build LinqToTwitter referencing the System.web.mcv dll.