- Home /
UnauthorizedAccessException during compilation
On almost ever c# class i create and edit it comes up the this error message.
Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.UnauthorizedAccessException: Access to the path "C:\Users\Public\Downloads\ProjectName\procedural\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
I am using version 4.3.3f1
Answer by rutter · Jun 26, 2014 at 06:58 PM
MSDN describes the UnauthorizedAccessException exception:
The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.
In a nutshell, Windows is preventing the compiler from reading your files. It's not immediately clear to me why it's doing that, but a quick search suggests your computer's antivirus software might be the culprit:
http://answers.unity3d.com/questions/600237/how-to-solve-internal-compiler-error.html
http://answers.unity3d.com/questions/600507/assembly-csharp-dll-mdb-is-denied.html
http://answers.unity3d.com/questions/628015/access-to-the-path-tempassembly-csharp-firstpassdl.html
http://answers.unity3d.com/questions/491473/internal-compiler-error-8.html
Answer by $$anonymous$$ · Jul 12, 2015 at 01:56 PM
just make a change to one of your scripts, a change that of course doesnt affect your script, like putting a space at the end of a line. then save the script and the error should go away. at least it does for me. ofcourse your mcafee real time scaning should be off.