Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 4439 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Description of Problem:
I'm trying to deploy an ASP MVC project developed on Mono to my Linux server using mono 188.8.131.52 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.