title: Error with views using Mono and MVC 4
body: <p>I am attempting to get started with the Mono framework and have run into numerous issues, the latest of which has me exasperated.  I have looked all over for a solution and haven't been able to figure this out.  </p>
  
  <p><strong>Environment</strong><br>
  Ubuntu 12.04 (on Hyper-V virtual machine)<br>
  Visual Studio 2012 (fully updated)<br>
  ASP.NET MVC 4<br>
  .NET Framework 4<br>
  Mono 3.4.0 (pulled and compiled directly from git using make)<br>
  XSP Mono.WebServer2 0.2.0.0 (also from git)</p>
  
  <p>My mono installation follows the instructions from <a href="https://stackoverflow.com/a/13424880/27457">this answer</a> almost exactly.  What happens is this:</p>
  
  <ol>
  <li>I create a new MVC 4 project in VS 2012 using the default options.</li>
  <li>I publish said application without changing any referenced DLL's "copy local" setting using a File System publish profile.</li>
  <li>Then, FTP the files to the Ubuntu VM and copy them all to the websites home folder (/var/www/mvc, which I configured as the default for Apache2).</li>
  <li><code>cd /var/www/mvc</code> in a bash prompt and run <code>xsp4</code>.</li>
  <li>Hit the server/port and receive this error:</li>
  </ol>
  
  <p><strong>System.InvalidOperationException</strong><br>
  The view 'index' or its master was not found or no view engine supports the searched locations.  The following locations were searched:<br>
  ~/Views/Home/Index.aspx<br>
  ~/Views/Home/Index.ascx<br>
  ~/Views/Shared/Index.aspx<br>
  ~/Views/Shared/Index.ascx<br>
  ~/Views/Home/Index.cshtml<br>
  ~/Views/Home/Index.vbhtml<br>
  ~/Views/Home/Index.cshtml<br>
  ~/Views/Home/Index.vbhtml  </p>
  
  <p>Description: HTTP 500.  Error processing request.<br>
  Details: Non-web exception.  Exception origin (name of application or object): System.Web.Mvc.<br>
  Exception stack trace:  </p>
  
  <pre><code>at System.Web.Mvc.ViewResult.FindView(System.Web.Mvc.ControllerContext context) [0x00000] in &lt;filename unknown&gt;:0
  at System.Web.Mvc.ViewResultBase.ExecuteResult(System.Web.Mvc.ControllerContext context) [0x00000] in &lt;filename unknown&gt;:0
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in &lt;filename unknown&gt;:0
  at System.Web.Mvc.ControllerActionInvoker+&lt;&gt;c__DisplayClass1a.&lt;InvokeActionResultWithFilters&gt;b__17 () [0x00000] in &lt;filename unknown&gt;:0
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, System.Web.Mvc.ResultExecutingContext preContext, System.Func`1 continuation) [0x00000] in &lt;filename unknown&gt;:0
  </code></pre>
  
  <p>Version Information: 3.4.0 (master/830c517 Fri Feb 28 16:03:26 CST 2014); ASP.NET Version: 4.0.30319.17020</p>
  
  <p>I've attempted various compilation combinations (targeting 4.5 instead 4.0, using MVC 3 instead of 4), <a href="http://forums.asp.net/t/1845262.aspx?ASP%20NET%20MVC%204%20on%20Mono%20OAuth%20issues" rel="nofollow noreferrer">removed WebPages.OAuth.dll</a>, copy-localed various reference combinations, and exhaustive web searches...all to no avail.  Is it something to do with my Mono version?  XSP?  Is there a definitive solution for this issue?</p>
  
  <p><strong>UPDATE</strong><br>
  If I target .NET Framework 4.5 with an MVC 4 project, the error changes to this:  </p>
  
  <p>System.IO.FileNotFoundException<br>
  Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies.<br>
  Description: HTTP 500.  Error processing request.<br>
  Details: Non-web exception.  Exception origin (name of application or object): DotNetOpenAuth.Core.<br>
  Exception stack trace:</p>
  
  <pre><code>at DotNetOpenAuth.Logger.Create(System.String name) [0x00000] in &lt;filename unknown&gt;:0
  at DotNetOpenAuth.Logger.CreateWithBanner(System.String name) [0x00000] in &lt;filename unknown&gt;:0
  at DotNetOpenAuth.Logger..cctor() [0x00000] in &lt;filename unknown&gt;:0
  </code></pre>
  
  <p>I am not using log4net.</p>