Unable to generate a temporary class (result=1) any idea?
All of a sudden, out of nowhere, I get this response from my web service hosted locally
Unable to generate a temporary class (result=1). error CS0009: Metadata file 'c:\开发者_StackOverflow中文版Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll' could not be opened -- 'Unknown error (8013141e)'
Everything has been fine and then I get that error without having made any changes to any configuration or anything.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS0009: Metadata file 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll' could not be opened -- 'Unknown error (8013141e)'
The usual suspects:
- Clear c:\windows\temp
- Clear C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
- Ditto asp.net 4 / Framework64 etc
- Run chkdsk/f
- Check anti virus software / host intrusion detection systems for rule updates (rules preventing executing code from temp folders will break .Net serialization for starters)
- if running any security software, disable it temporarily and go from there
- Conversely, if you're not running any security software, run one of the free virus scanners (I like Nod32) to see if anything crept in.
- Was any windows update applied around the time of the break? Check the update history.
Also, check for system restore points. If you just want to get it working and not worry about what happened, you might be able to restore to a point in time before it broke. I'd call that a last resort though!
精彩评论