title: The view must derive from WebViewPage
body: <p>I had a working MVC application when I decided that it was time for some maintenance. 
  My views were all under SHARED directory and I decided to move them into separate directories. </p>
  
  <p>I implemented a CustomViewEngine that I found here:
  <a href="https://stackoverflow.com/questions/632964/can-i-specify-a-custom-location-to-search-for-views-in-asp-net-mvc/909594#909594">Can I specify a custom location to &quot;search for views&quot; in ASP.NET MVC?</a></p>
  
  <p>View structure looks something like this </p>
  
  <pre><code>Views
      AppViews
      OtherAppViews
      ...
      Shared
      ...
  </code></pre>
  
  <p>This is an error that I am getting: </p>
  
  <p><code>The view at '~/Views/AppViews/SomeView.cshtml' must derive from ViewPage,</code>     <code>ViewPage&lt;TModel&gt;, ViewUserControl, or ViewUserControl&lt;TModel&gt;.</code> </p>
  
  <p>I tried to inherit from <code>@inherits System.Web.Mvc.WebViewPage</code> (as explained here: <a href="https://stackoverflow.com/questions/8127462/the-view-must-derive-from-webviewpage-or-webviewpagetmodel">The view must derive from WebViewPage, or WebViewPage&lt;TModel&gt;</a>) , but when I do this I get an error saying that I can't use <code>@inherits</code> and <code>@model</code> at the same time.</p>