1

I have an ASP.NET MVC solution which references to another class library, in which i have an MVC folder and inside of it "Controller", "Model" and "View" folders. I'd like to do something like

@Html.ActionLink("Text", "Index", "DllController")

which will link to the DllController/Index action in the dll and show a view from that lib. Debugging through this, I see that it goes into the Controller, but once it reaches

return View("MyView", model);

I receive the foolowing error:

The view 'MyView' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/MyView/MyView.aspx ~/Views/MyView/MyView.ascx ~/Views/Shared/MyView.aspx ~/Views/Shared/MyView.ascx ~/Views/MyView/MyView.cshtml ~/Views/MyView/MyView.vbhtml ~/Views/Shared/MyView.cshtml ~/Views/Shared/MyView.vbhtml ~/Mvc/Views/MyView/MyView.cshtml ~/Mvc/Views/Shared/MyView.cshtml

I assume this is because the view is being searched for in the current assembly. Can i change this behavior to show my imported view correctly?

kob490
  • 3,177
  • 4
  • 25
  • 40
  • Possible duplicate of [asp.net mvc put controllers into a separate project](http://stackoverflow.com/questions/401376/asp-net-mvc-put-controllers-into-a-separate-project) – Luke Jan 29 '16 at 09:24
  • Not exactly as my issue is with showing the view, not accessing the controller. – kob490 Jan 29 '16 at 16:47

0 Answers0