What you have should work, and I verified it by:
- Creating a new MVC3 app and adding the latest T4MVC 2.6.40 (via nuget)
- Adding an Area named MyArea
- Adding a controller named MyController
- Adding a view named MyView
- Make sure you rerun the T4MVC.tt custom tool
After that, I'm able to write:
namespace Mvc3Application.Areas.MyArea.Controllers {
public partial class MyController : Controller {
public virtual ActionResult Index() {
return View(Views.MyView);
}
}
}
or
namespace Mvc3Application.Areas.MyArea.Controllers {
public partial class MyController : Controller {
public virtual ActionResult Index() {
return View(MVC.MyArea.My.Views.MyView);
}
}
}
Note that in the second case, the token in 'My' instead of 'MyController', which is the way it always works.
Please try following those steps in a clean app to see if it works.