I've followed the instructions here: https://our.umbraco.org/documentation/reference/routing/surface-controllers
But get the same "Could not find route" error.
I've created an Area under my project called "Controls" and added the controller there. I've then adorned the controller with the [PluginController("Controls")]. So I have this structure:
--Root VS Project
--Area
--Controls
--Controllers
--MyController
I call this from my code like so:
@Html.Action("Index", "MyController", new { area = "Controls" }
This works absolutely fine again when running in VS with these files included as part of the project, but breaks when I then export this and import the package (with all of the other associated files) in to a new Umbraco project, saying that it can't find the route. My assumption was that adding the [PluginController("Controls")] attribute meant that upon startup the Umbraco project would find the controller and add it to the routes. Is this not the case?
Error:
Additional information: No route in the route table matches the supplied values.