Mono와 ASP.NET MVC 3에서 며칠 동안 놀았습니다. 그것은 면도기를 거의 잘 실행합니다.
내가 ViewBag를 사용하고있는 라인을 주석 처리하거나 삭제하면 잘 동작합니다.
그러나 내가 ViewBag를 사용할 때 Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo에 예외를Mono에서 Razor 사용
잘못된 IL 코드를 제공합니다 만들기 (Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, 문자열) : 메소드 본문이 비어 있습니다.
설명 : HTTP 500. 요청 처리 오류입니다.
스택 추적은 :
ViewBag.Message = "Welcome to ASP.NET MVC!";
내가 아마 어떤 어셈블리 참조 실종 :
System.InvalidProgramException: Invalid IL code in Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo:Create (Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags,string): method body is empty.
NerdDinnerV3.Controllers.HomeController.Index() [0x0000a] in /home/telebovich/Projects/EmptyMvc2Application/EmptyMvc2Application/Controllers/HomeController.cs:13 at (wrapper dynamic-method) object.lambda_method (System.Runtime.CompilerServices.Closure,System.Web.Mvc.ControllerBase,object[]) <IL 0x00006, 0x0002f>
at System.Web.Mvc.ActionMethodDispatcher.Execute (System.Web.Mvc.ControllerBase,object[]) <IL 0x00008, 0x0001b>
at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc.ControllerContext,System.Collections.Generic.IDictionary`2<string, object>) <IL 0x00072, 0x00103>
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc.ControllerContext,System.Web.Mvc.ActionDescriptor,System.Collections.Generic.IDictionary`2<string, object>) <IL 0x00003, 0x00019>
at System.Web.Mvc.ControllerActionInvoker/<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() <IL 0x0002d, 0x00068>
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter (System.Web.Mvc.IActionFilter,System.Web.Mvc.ActionExecutingContext,System.Func`1<System.Web.Mvc.ActionExecutedContext>) <IL 0x00031, 0x000b6>
스택 추적이 아래에 13 행을 가리키는?
제발 도와 주실 수 있습니까?
미리 감사드립니다.
이 답변을보십시오 : http://stackoverflow.com/questions/4239645/does-the-razor-view-engine-work-for-mono 또한 ViewData/ViewBag 대신보기 모델을 사용하는 것이 좋습니다. . –