Internal Compiler Error (522984)

Hello all.

A work mate and i have had the following error continiously crop up over the last two or three days with no sign as to why or a fix.

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.UnauthorizedAccessException: Access to the path “C:...\Temp\Assembly-CSharp.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

Restarting Unity worked the first couple times. After that we removed the Assembly files and had unity rebuild them. This worked again for a little while but the error keeps showing up. We are working on different projects on version 4.3.1 and 4.2.1 both with a pro license.

Cant seem to find anything on the forums or answers. Any one have an idea as to the cause of this or have a fix for it??

I have put this up on the Questions section as well but issues get lost really easy there and never get answered.

Thanks Guys

Did you check the permission for Assembly-CSharp.dll.mdb? Something seems to mess it up or lock the file.
Are you using a version control? Do you lock the file with Visual Studio or MonoDevelop? Is the debugger still running?

Permissions are fine and we are working on separate projects so there is no transfer between machines for version control. Not locking it nor are the scripts doing anything overly exciting. Cant run it due to the error so I’m not sure about the debugger. Developing with Mono.

Someone had suggested elsewhere that it could be anti virus but, disabled that and it the error came up again. Attempted to recreate it but to no success other than it occurs after saving changes to any of the scripts, but with no errors or warnings. I can remove it most of the time by restarting unity so its not stopping me from doing what i need but it is a pain when it persistently pops up.

Thanks for the help

Still havnt been able to figure it out but. Could it have something to do when its saving over the script after iv made changes when if i access unity to quickly. It came up again but after making further changes and saving out it again it disappeared again. Could it be as simple as attempting to access it while its being saved?

The file where access is denied does not seem to exist. there is no database file at that location for me.

Running Unity as administrator seems to make it work, but only for a little while.

Closed the Unity editor. The Temp folder (in the project workspace location) shall be automatically removed.
Now restart the Unity editor with the game module loaded. The temp file shall be created once again, however the DLL file which was showing the compilation error should not be present now. Your application should be able to work smoothly now.

I created new text file inside /Temp folder and named that file as “Assembly-CSharp.dll.mdb”. This resolved the access denied error for me.

When I tried to create a dll or an exe file it is removed immediately. Everything created in Documents folder is deleted. My solution was to create the project outside DOCUMENTS folder. The problem is that windows folder is watching any executable files that is copied or created. I have a clean install of windows 8 and I have no third party antivirus.

Thanks this helped solve the problem for me.

You are a genius. This problem has been bugging me for 3 days =[. Thanks!