Description of Problem:
I'm trying to deploy an ASP MVC project developed on Mono to my Linux server using mono 22.214.171.124 w/ fastcgi-mono-server4 (badgerports)
The webapp always starts fine, but then I start getting random CS0006 compilation errors for various URIs, and once they break, they remain broken until I restart the server application.
Server Error in '/' Application
Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Compiler Error Message: CS0006: Metadata file `/tmp/root-temp-aspnet-0/ed68754/App_global.asax_40e709ea.dll' could not be found
Steps to reproduce the problem:
fastcgi-mono-server4 attempts to compile a temp file that does not exist
File is found, compilation succeeds
How often does this happen?
Too often :(
I filed this under compilers, though it's not a bug with the compiler itself per say, at least as far as I can tell. I haven't been using Mono for 24 hours yet, so this could be way off, but it seems to me that an attempt is being made to compile a temporary file before that file is either created or closed such that the compilation fails, and then that temp file is deleted and the error persists.
I'm happy to provide any additional info.
I was able to work around this issue by using AOT compilation on the DLL outputs of my ASP.NET project after building with xbuild and before deploying with the mono fastcgi server:
mono --aot -O=all SystemDiscs/bin/SystemDiscs*.dll
I don't know why this worked as I do not believe this precompiles the actual ASPX pages, and going by the nature of the error (one or two ASP files wouldn't compile out of the entire project, different files each time), it wouldn't seem that the issue was the library models/controllers, but, hey, it works.