I recently had an issue where I would randomly get compilation errors from various pages of my app:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: The compiler failed with error code -1073741502.
I tried all kinds of things (deleting temp files, restarting IIS, recycling app pool, taking ownership of and giving permission to temp folders) but in the end this article helped me work out it was probably a corrupted C# Compiler, since our problems were so similar.
So repairing my installation of .NET seemed to have worked. However, after a couple of days of everything working okay I have started to get the error again, and it seems my C# Compiler is corrupted again. Can anyone suggest why this would keep happening? Or what else it might be?
csc.exehad a file size of 0 bytes. Are you also seeing this symptom -- especially after you corrected and then the problem reappeared?