Does not work with MVC 4 default project

Sep 3, 2012 at 5:16 AM

In the template MVC 4 project there is no longer a MyApplication.RegisterRoutes method, rather routes are registered in RouteConfig.RegisterRoutes.

The RouteTester constructor looks for the presence of the RegisterRoutes method and calls it to initialise the registrations. When the method is not found all the tests fail. There is a workaround which is of course to add the RegisterRoutes method back in for MVC 4 projects, but this is not ideal.

Really the constructor should now also check for RouteConfig.RegisterRoutes and call that if found, otherwise unfortunately this package won't get much take up with MVC4.

Jan 23, 2013 at 2:08 PM

Yes I agree. Should be updated for MVC4.

Fantastic tool, but this is becoming a pain as it has added complexity to our already messy Global.asax.

Jan 23, 2013 at 4:17 PM

There is a fork which solves this problem perfectly:


Download it, compile it in release mode, and replace the original dll/xml files with the ones you've compiled. Hopefully Lee will accept the pull request and update the nuget package as well!