小编Fra*_*por的帖子

AssemblyBinding BindingRedirect不适用于带有T4MVCExtensions的MVC4应用程序

我们有一个使用T4MVC的大型.NET Web应用程序MVC3.我们最近将它升级到MVC4,除了T4MVCExtensions(来自NuGet的3.6.5版)仍然依赖于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
Run Code Online (Sandbox Code Playgroud)

我们的web.config文件中有以下内容,应该映射它,但它似乎不是 -

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly> …
Run Code Online (Sandbox Code Playgroud)

c# .net-assembly t4mvc asp.net-mvc-3 asp.net-mvc-4

5
推荐指数
1
解决办法
4704
查看次数

标签 统计

.net-assembly ×1

asp.net-mvc-3 ×1

asp.net-mvc-4 ×1

c# ×1

t4mvc ×1