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.
Environment
Ubuntu 12.04 (on Hyper-V virtual machine)
Visual Studio 2012 (fully updated)
ASP.NET MVC 4
.NET Framework 4
Mono 3.4.0 (pulled and compiled directly from git using make)
XSP Mono.WebServer2 0.2.0.0 (also from git)
My mono installation follows the instructions from this answer almost exactly. What happens is this:
- I create a new MVC 4 project in VS 2012 using the default options.
- I publish said application without changing any referenced DLL's "copy local" setting using a File System publish profile.
- 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).
cd /var/www/mvc
in a bash prompt and runxsp4
.- Hit the server/port and receive this error:
System.InvalidOperationException
The view 'index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
Description: HTTP 500. Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Web.Mvc.
Exception stack trace:
at System.Web.Mvc.ViewResult.FindView(System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ViewResultBase.ExecuteResult(System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17 () [0x00000] in <filename unknown>:0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, System.Web.Mvc.ResultExecutingContext preContext, System.Func`1 continuation) [0x00000] in <filename unknown>:0
Version Information: 3.4.0 (master/830c517 Fri Feb 28 16:03:26 CST 2014); ASP.NET Version: 4.0.30319.17020
I've attempted various compilation combinations (targeting 4.5 instead 4.0, using MVC 3 instead of 4), removed WebPages.OAuth.dll, 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?
UPDATE
If I target .NET Framework 4.5 with an MVC 4 project, the error changes to this:
System.IO.FileNotFoundException
Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies.
Description: HTTP 500. Error processing request.
Details: Non-web exception. Exception origin (name of application or object): DotNetOpenAuth.Core.
Exception stack trace:
at DotNetOpenAuth.Logger.Create(System.String name) [0x00000] in <filename unknown>:0
at DotNetOpenAuth.Logger.CreateWithBanner(System.String name) [0x00000] in <filename unknown>:0
at DotNetOpenAuth.Logger..cctor() [0x00000] in <filename unknown>:0
I am not using log4net.