I have an MVC 5 based solution, with a Client
and Data
project. It includes the partial _ViewSwitcher
as I want to serve mobile and desktop browsers. On the home page, when I click the ViewSwitcher's Mobile view
link, I get the following exception:
Multiple types were found that match the controller named 'ViewSwitcher'....
The request for 'ViewSwitcher' has found the following matching controllers:
PayCaddy.Data.Controllers.ViewSwitcherController
PayCaddy.Client.Controllers.ViewSwitcherController
I have done a solution wide search on all files for the term (not whole word) 'ViewSwitcher', and found only one .cs result, in the
.Clientproject, and three results in
_Layout.Mobile.cshtmland
_ViewSwitcher.cshtml`. Plus I have manually checked the file system for any duplicate and found none.
What could be causing this?