AssemblyBinding BindingRedirect не работает для приложения MVC4 с расширениями T4MVCE

У нас есть большое веб-приложение .NET, которое было MVC3, использующее T4MVC. Недавно мы обновили его до MVC4, и все хорошо, за исключением T4MVCExtensions (версия 3.6.5 от NuGet), все еще зависит от System.Web.Mvc версии 3. Зависимости времени выполнения, которые вы 'Предполагается, что настройка в web.config ДОЛЖНА быть перенаправлять привязки сборки, но они некажется. Возникает следующее исключение:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Description: An unhandled exception occurred during the execution of the current web     request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Мы'В нашем файле web.config есть следующее, которое должно отображать его, но это не так.кажется, что я



  
    
    
  
  
    
    
  
  
    
    
  

Мы включили журнал Fusion, просто чтобы проверить мое сумасшествие и увидеть, что да, действительно, он пытается использовать двоичный файл mvc3, а не переходить к 4:

*** Assembly Binder Log Entry  (5/21/2013 @ 3:37:23 PM) ***

The operation failed.
Bind result: hr = 0x80004005. Unspecified error

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = IIS APPPOOL\ASP.NET v4.0
LOG: DisplayName = System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///C:/Work/Webs/SSUApp/SSUApp/
LOG: Initial PrivatePath = C:\Work\Webs\SSUApp\SSUApp\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\lssapp\7a6e6cde
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\lssapp\7a6e6cde
LOG: AppName = d5bcf9a8
Calling assembly : App_Web__managerulespartial.cshtml.38bccb18.jb5ozz39, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: Start validating all the dependencies.
LOG: [Level 1]Start validating native image dependency mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: [Level 1]Start validating IL dependency System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: [Level 1]Start validating IL dependency System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
LOG: [Level 1]Start validating native image dependency System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: [Level 1]Start validating native image dependency System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: [Level 1]Start validating IL dependency System.Web.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: [Level 1]Start validating IL dependency System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: [Level 1]Start validating IL dependency System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: [Level 1]Start validating IL dependency System.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
LOG: [Level 1]Start validating IL dependency Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: [Level 1]Start validating IL dependency System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: [Level 1]Start validating IL dependency System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: [Level 1]Start validating IL dependency System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: [Level 1]Start validating IL dependency System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
Native image has correct version information.
LOG: Validation of dependencies succeeded.
LOG: Bind to native image succeeded.
Attempting to use native image C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Web.Mvc\f234ba2bcf5f845279e46dc04198a7cd\System.Web.Mvc.ni.dll.
Rejecting code sharing because a dependent assembly did not match the conditional APTCA share mode
Native image successfully used.

Любые идеи будут качаться, так как яМы уже сожгли кучу часов на этом.

Спасибо френсис

Ответы на вопрос(2)

Ваш ответ на вопрос