Skip to content

Autofac on Linux/Mono makes Razor not working #689

@marxin

Description

@marxin

Hello.

I've got a project utilizing MVC5 & Autofac on Mono/Linux platform. It shows that after updating to mono-4.x, I've got problem that Razor engine is somehow not registered.

I've tried to reduce test-case, created just Example MVC5 project in Monodevelop:
https://github.com/marxin/test-mvc5-mono-autofac

Razor works, however if I just add Autofac MVC5 Integration package (no registration in code is done), it stops working with following message:

System.InvalidOperationException
The view found at '~/Views/Home/Index.cshtml' was not created.

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.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) in :line 0
at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) in :line 0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in :line 0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (IList1 filters, Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in <filename unknown>:line 0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (IList1 filters, Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in :line 0
Version Information: 4.2.1 (Stable 4.2.1.60/804ddbc Tue Oct 27 00:22:01 UTC 2015); ASP.NET Version: 4.0.30319.17020

Thanks for help,
Martin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions