I recently added a mobile version of the site using MVC4.mobile views. I structured the site very similar to the desktop version, starting with _Layout.mobile.cshtml, which pointed to the right scripts and css designed specifically for the mobile site.
After publishing the site, I checked that everything works correctly, that it was done in the way it was developed. But I was soon told that the site was broken. When checking the mobile site, I noticed that the _Layout.mobile.cshtml file was uploaded, but instead of Index.mobile.cshtml, which is sent from the Home controller, the standard Index.cshtml for the desktop was installed instead. The index desktop file was also displayed using mobile css, which made the entire mobile site look very confusing. In the side note, nothing has changed for the desktop version of the site.
Republishing fixed the problem, but I also noticed that sometimes it reverts to displaying the correct views without republishing even after breaking it.
I began to research the problem and that I came across discussions about display modes that do not work: ASP.NET MVC 4 mobile browsing modes stop working
With the NuGet solution, which is considered deprecated: http://www.nuget.org/packages/Microsoft.AspNet.Mvc.FixedDisplayModes
I suggested that since this discussion was a year ago, speaking of earlier releases, it should be fixed with more recent MVC4 updates. My current version was 4.0.20710.0, so I upgraded to 4.0.30506 using NuGet before doing anything else.
This did not solve the problem, but not only that when checking, I noticed that the System.Web.MVC link still pointed to the dll 4.0.20710.0 file.
I am worried about adding an unnecessary patch that is marked as deprecated, and was hoping the MVC update would solve this problem. Any suggestions?