How to solve "Internal compiler error."?

Since this weekend I’m getting this internal compiler error. I try change some code, sometimes I only add a whitespace in the code, then when Unity refreshes it works, but sometimes it doesn’t work and I try to delete some temporary files and etc. I’ve already tried:

1 - Remove Temporary files.
2 - Remove Library files.
3 - Reimport all the project from the repository.
4 - Copy the project to another folder.
5 - Disable the svn.
6 - Sync project with monodeveloper.

I’m working with a team and I’m the only one having this problem and it’s definitely not a code error.

The error is shown below.

obs: Assembly-CSharp-firstpass.dll.mdb is shown when I start unity, if a get the things to work again, then after modify some scripts and unity recompiles them, I get an error refering to Assembly-CSharp.dll.mdb.

Can anyone please help me? I’m begging :frowning:

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.UnauthorizedAccessException: Access to the path “F:\Workspace\UnityProjects\hackSlashCloudForge runk\Temp\Assembly-CSharp-firstpass.dll.mdb” is denied.

at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0

at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in :0

at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in :0

at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in :0

at Mono.CSharp.SymbolWriter+SymbolWriterImpl.WriteSymbolFile () [0x00000] in :0

at Mono.CSharp.SymbolWriter.WriteSymbolFile () [0x00000] in :0

at Mono.CSharp.CodeGen.Save (System.String name, Boolean saveDebugInfo, Mono.CSharp.Report Report) [0x00000] in :0

at Mono.CSharp.Driver.Compile () [0x00000] in :0

at Mono.CSharp.Driver.Main (System.String args) [0x00000] in :0

Finally I solved my problem. I searched for many different topics but this is the one who saved me. Internal Compiler Error - Unity Answers

It was the antivirus blocking the access.
Deactivating the antivirus solved my problem.

This also happens to me when my Unity project sits in a Dropbox folder. If Dropbox syncs at the same time with some stuff that Unity is doing, this error appears. I restart unity and it work ok. It happens only sometimes.

I encountered same problem. It was caused by my Comodo software’s Sandbox function. Instead of turning the function off, I looked into the detailed configurations and moved the relevant “Sandboxed Files” and “Uncategrized Files” to “Trusted Files”, then it worked.