{"action":"created","issue":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/219","labels_url":"https://api.github.com/repos/ServiceStack/Issues/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/ServiceStack/Issues/issues/219/comments","events_url":"https://api.github.com/repos/ServiceStack/Issues/issues/219/events","html_url":"https://github.com/ServiceStack/Issues/issues/219","id":55343758,"number":219,"title":"HttpCompileException for Razor view after moving to Mono 3.12.0","user":{"login":"jpasichnyk","id":1373292,"avatar_url":"https://avatars.githubusercontent.com/u/1373292?v=3","gravatar_id":"","url":"https://api.github.com/users/jpasichnyk","html_url":"https://github.com/jpasichnyk","followers_url":"https://api.github.com/users/jpasichnyk/followers","following_url":"https://api.github.com/users/jpasichnyk/following{/other_user}","gists_url":"https://api.github.com/users/jpasichnyk/gists{/gist_id}","starred_url":"https://api.github.com/users/jpasichnyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpasichnyk/subscriptions","organizations_url":"https://api.github.com/users/jpasichnyk/orgs","repos_url":"https://api.github.com/users/jpasichnyk/repos","events_url":"https://api.github.com/users/jpasichnyk/events{/privacy}","received_events_url":"https://api.github.com/users/jpasichnyk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-23T22:55:18Z","updated_at":"2015-02-05T21:51:13Z","closed_at":"2015-01-28T10:39:48Z","body":"After upgrading to Mono 3.12.0, website fails to load and throws this for all Views.  No other changes were made.  Works fine on 3.10.0.\r\n\r\n\r\n```\r\nResponse Status\r\n\r\n    Error Code\r\n        HttpCompileException\r\n    Message\r\n        External exception\r\n    Stack Trace\r\n        [DefaultRequest: 01/23/2015 22:51:36]: [REQUEST: {}] System.Web.HttpCompileException: External exception at ServiceStack.Razor.Compilation.RazorPageHost.Compile () [0x00000] in <filename unknown>:0 at ServiceStack.Razor.Managers.RazorViewManager.EnsureCompiled (ServiceStack.Razor.Managers.RazorPage page) [0x00000] in <filename unknown>:0 \r\n    Errors\r\n```\r\n\r\nAfter trying to load a few times, I then get:\r\n```\r\nResponse Status\r\n\r\n    Error Code\r\n        SystemException\r\n    Message\r\n        Error running mcs: Out of memory\r\n    Stack Trace\r\n        [GlobalProblemForMediaPublishersRequest: 01/23/2015 22:53:14]: [REQUEST: {}] System.SystemException: Error running mcs: Out of memory at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0 at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0 at Mono.CSharp.CSharpCodeCompiler.CompileFromDomBatch (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] ea) [0x00000] in <filename unknown>:0 at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromDomBatch (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] ea) [0x00000] in <filename unknown>:0 at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromDom (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] compilationUnits) [0x00000] in <filename unknown>:0 at ServiceStack.Razor.Compilation.RazorPageHost.Compile () [0x00000] in <filename unknown>:0 at ServiceStack.Razor.Managers.RazorViewManager.EnsureCompiled (ServiceStack.Razor.Managers.RazorPage page) [0x00000] in <filename unknown>:0 at ServiceStack.Razor.Managers.RazorPageResolver.CreateRazorPageInstance (IRequest httpReq, IResponse httpRes, System.Object dto, ServiceStack.Razor.Managers.RazorPage razorPage) [0x00000] in <filename unknown>:0 at ServiceStack.Razor.Managers.RazorPageResolver.ExecuteRazorPage (IRequest httpReq, IResponse httpRes, System.Object model, ServiceStack.Razor.Managers.RazorPage razorPage) [0x00000] in <filename unknown>:0 at ServiceStack.Razor.Managers.RazorPageResolver.ProcessRequest (IRequest httpReq, IResponse httpRes, System.Object dto) [0x00000] in <filename unknown>:0 at ServiceStack.Formats.HtmlFormat+<>c__DisplayClass2.<SerializeToStream>b__0 (IViewEngine x) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.Any[IViewEngine] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 at ServiceStack.Formats.HtmlFormat.SerializeToStream (IRequest request, System.Object response, IResponse httpRes) [0x00000] in <filename unknown>:0 \r\n    Errors```\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/comments/73136754","html_url":"https://github.com/ServiceStack/Issues/issues/219#issuecomment-73136754","issue_url":"https://api.github.com/repos/ServiceStack/Issues/issues/219","id":73136754,"user":{"login":"jpasichnyk","id":1373292,"avatar_url":"https://avatars.githubusercontent.com/u/1373292?v=3","gravatar_id":"","url":"https://api.github.com/users/jpasichnyk","html_url":"https://github.com/jpasichnyk","followers_url":"https://api.github.com/users/jpasichnyk/followers","following_url":"https://api.github.com/users/jpasichnyk/following{/other_user}","gists_url":"https://api.github.com/users/jpasichnyk/gists{/gist_id}","starred_url":"https://api.github.com/users/jpasichnyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpasichnyk/subscriptions","organizations_url":"https://api.github.com/users/jpasichnyk/orgs","repos_url":"https://api.github.com/users/jpasichnyk/repos","events_url":"https://api.github.com/users/jpasichnyk/events{/privacy}","received_events_url":"https://api.github.com/users/jpasichnyk/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T21:51:13Z","updated_at":"2015-02-05T21:51:13Z","body":"@mythz - just to follow up on this...\r\n\r\nIt turns out it wasn't 3.12 related at all, and looks to be some error with one or more of my views compiling, that compile/run fine on windows/visual studio.  I haven't been able to isolate the compile issue, but we've had similar issues in the past.  It will run fine in xsp but for some reason, the same code fails when running via fastcgi-mono-server4.  Is there something different done here as far as batch compilation of views, and if so is there a way to control this behavior?\r\n\r\nOn a more positive note, I found https://github.com/ServiceStack/ServiceStack/wiki/Compiled-Razor-Views, and gave that a try, and it works perfectly!  One question I have is around the need to deploy the .cshtml view files, as my views all reside in my core website project (just loaded up with typeof(AppHost).Assembly.  The wiki says that it sets them all to Content and adds the build task to compile them, but assuming for a production site I can skip deployment of .cshtml files (seems to work if i delete them off a dev server)?  If so, whats the ideal work flow here?   Any downside with running on the compiled views, or is it preferred method as far as you're concerned?"}}