For example I have two similar simple MVC applications.
Application1:
HomeController -> Index action which returns AnotherHome view of
Application2:
AnotherHomeController -> AnotherIndex action which also returns AnotherHome view
Application1 Index action:
public ActionResult Index()
{
return View("AnotherHome");
}
I need to run Application1 and render AnotherHome. When I run app it is obvious that I get the following error:
The view 'AnotherHome' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/AnotherHome.aspx
~/Views/Home/AnotherHome.ascx
~/Views/Shared/AnotherHome.aspx
~/Views/Shared/AnotherHome.ascx
~/Views/Home/AnotherHome.cshtml
~/Views/Home/AnotherHome.vbhtml
~/Views/Shared/AnotherHome.cshtml
~/Views/Shared/AnotherHome.vbhtml
How can I force view engine to search view, for example, in Application2/Views/AnotherHome/AnotherIndex.cshtml ???