I already posted this question on
stackoverflow, but i would guess this is the best place to ask such question =)
I just installed T4MVC on my project and I run into some problem.
In my controller i can call redirect to action without problem:
If i do call it from my view, i get an ArgumentOutOfRangeException.
@Html.ActionLink("Delete Dinner", MVC.Home.Index())
To make sure I did it correctly, i created a new MVC solution and that line works.
Then I removed from my HomeController my 'baseController' inheritance and resintalled T4MVC to be sure it wouldn't interfere. Still no luck
I've no more idea where even start to look for this, debug doesn't help me as it seems to explose in the extention method:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ObjectModel.Collection`1.set_Item(Int32 index, T value) +10419142
System.Web.Mvc.Html.LinkExtensions.RouteLink(HtmlHelper htmlHelper, String linkText, String routeName, String protocol, String hostName, String fragment, RouteValueDictionary routeValues, IDictionary`2 htmlAttributes) +47
System.Web.Mvc.T4Extensions.ActionLink(HtmlHelper htmlHelper, String linkText, ActionResult result, IDictionary`2 htmlAttributes, String protocol, String hostName, String fragment) +196
System.Web.Mvc.T4Extensions.ActionLink(HtmlHelper htmlHelper, String linkText, ActionResult result) +72
ASP._Page_Views_Home_Index_cshtml.Execute() in c:\Thva\Misc\DropBox\Work\MyProjects\Wims\Wims.Website\Views\Home\Index.cshtml:53
I just tried this and it still doesn't work: Create a new controller:
public partial class MyTestController : Controller
// GET: /MyTest/
public virtual ActionResult Index()
Run AutoT4MVC, View :
ViewBag.Title = "Index";
To make sure i have no depedency, and it still doesn't work if i call my page:
Any idea? Thanks in advance