We’ve got an ASP.NET MVC 3 project that uses single action controllers, and ReSharper doesn’t like it. For example:
@using (Html.BeginForm("DoRegister", "Account")) {
It doesn’t like either DoRegister or Account, because it’s looking for a class AccountController with an action DoRegister. What we’ve actually got is a folder Controllers\Account, with a single-action class DoRegister.
Can I teach ReSharper about this? If not, can I get it to ignore this particular pattern?
I know that I can right-click and Ignore Errors in the Errors in Solution window, but this only lasts until I pull an updated version of the code from source control, which gets annoying quite quickly.
I am afraid ReSharper supports only default MVC convention.
But you can disable MVC analysis:
At All
ReSharper->Options->ASP.NET->Other->Enable ASP.NET MVC references
On all unknown action and controller errors
Alt+Enter on error, Inspection Options for “Unknown Symbol”
At that specific place
Again, Alt+Enter on error, Supress Inspection “Unknown Symbol” with comment.