This project is read-only.


Overridden action with addition of NonAction attribute causes compilation error


In my project I have a shared base controller with some action methods defined. In a derived controller I override one of these action methods and add the NonAction attribute. I do this so I can redefine the action with additional parameters.

This causes a compilation in T4MVC however, as a duplicate method is generated leading to the following error:
"Type 'MvcApplication2.Controllers.HomeController' already defines a member called 'Index' with the same parameter types"

The attached file contains two controllers; BaseController contains the action method to overridden and redefined as a non action, and HomeController derives from BaseController and overrides and redefines the base Index action. Please add these to a new MVC project with T4MVC to reproduce the issue.

I would really like to start using T4MVC but this issue is unfortunately preventing me from doing so.

file attachments

Closed Jan 28, 2015 at 4:11 PM by KevinKuszyk
As part of our move to GitHub, we are closing all the outstanding issues on CodePlex.

If your issue is still valid, please re-open it on GitHub:

Thanks for contributing!