If there are private actions then T4MVC generates a
public method stub in its autogenerated partial class for the controller. This causes a compilation failure cos now there are two methods with the same definition.
I know private actions cannot be used directly but there are use cases for them. One is encouraged to use the ChildActionOnly attribute on private methods but it need not necessarily be followed by everyone.
Controller code to reproduce the issue.
private ActionResult MyAction()
{
return AnotherAction();
}
generated stub:
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult MyAction() {
return new T4MVC_ActionResult(Area, Name, ActionNames.MyAction);
}