c# - MVC5 Autofac: The view found at was not created -


i created simple mvc 5.0 application push github repository: https://github.com/marxin/mvc-sample. motivation execute app on linux mono 3.2.3.

i add autofac nuget package (more precisely 3.3.0), works fine me. problem if add autofac.mvc5 integration package, razor stops working following error:

system.invalidoperationexception view found @ '~/views/home/index.cshtml' 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: @ system.web.mvc.buildmanagercompiledview.render (system.web.mvc.viewcontext viewcontext, system.io.textwriter writer) [0x00000] in <filename unknown>:0 @ system.web.mvc.viewresultbase.executeresult (system.web.mvc.controllercontext context) [0x00000] in <filename unknown>:0 @ system.web.mvc.controlleractioninvoker.invokeactionresult (system.web.mvc.controllercontext controllercontext, system.web.mvc.actionresult actionresult) [0x00000] in <filename unknown>:0 @ system.web.mvc.controlleractioninvoker.invokeactionresultfilterrecursive (ilist`1 filters, int32 filterindex, system.web.mvc.resultexecutingcontext precontext, system.web.mvc.controllercontext controllercontext, system.web.mvc.actionresult actionresult) [0x00000] in <filename unknown>:0 @ system.web.mvc.controlleractioninvoker.invokeactionresultfilterrecursive (ilist`1 filters, int32 filterindex, system.web.mvc.resultexecutingcontext precontext, system.web.mvc.controllercontext controllercontext, system.web.mvc.actionresult actionresult) [0x00000] in <filename unknown>:0  

diff: https://github.com/marxin/mvc-sample/commit/ca980adcf1d67e2e74729b27b11c26065dd2567e

could please me what's necessary minimum must registered autofac enable razor view pages?

if try aspx template, works fine.

thank you, martin

ok, problem in web.config reference definition, please see following diff: https://github.com/marxin/mvc-sample/commit/3d5d7fef6f0284a96518852e0d892ca6205f5679

btw. mvc5 not compatible mono, there pull requests fix missing features.

thanks


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -