I recently worked with Jerry and Doug on a sporadic problem reported by a customer (Compiler Error Message: CS0006: Metadata file ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<path>\<assembly>.dll’ could not be found), and doing some researches I found they were already working on a fix for this problem (and a couple of other ones related to the same code area). I sent the private fix to the customer for testing in his real (non production!) environment, and after he confirmed the problem was solved without side effects, the Product Team went ahead and produced the final fix. Here are the error messages:
- Exception message: Could not load file or assembly ‘<assembly>, Version=<version>, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified
- Compiler Error Message: CS0006: Metadata file ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<path>\<assembly>.dll’ could not be found
- System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again
Typically you get those errors when the application is running under high load (but that may not only be the only case), and the workaround to resolve the situation is to clear the Temporary ASP.NET Files folder and/or restart the application pool.
The KB article for this is still a draft (but I guess it should be published soon, I’ll link to it when available), but the fix you can request to CSS in case you need it, is 934839.
The KB article as been published a couple of days ago, read it here.