- Home /
Error building Player because scripts had compiler errors
Every time I try to compile I get this error:
Unhandled Exception: System.UnauthorizedAccessException: Access to the path "C:\Users\MyUserName\Documents\UnityProjects\MyProjectName\Temp\Assembly-CSharp-firstpass.dll.mdb" is denied.
then under that it says:
Error building Player because scripts had compiler errors then I tried opening a new project, but it does it to all projects plz help thx in advance!
Try taking ownership of those files, in case you're not the owner https://technet.microsoft.com/en-us/library/cc753659.aspx
Answer by tkoknordic · May 27, 2015 at 12:48 PM
Do as virgiliu suggested and try to take ownership of that file. Other suggestion: Close Unity, delete posible Temp folder in "C:\Users\MyUserName\Documents\UnityProjects\MyProjectName\". It's safe to delete it when Unity is closed. Then open Unity again and try to compile.
If neither of our suggestions doesn't work for you then you can try to represent this problem with empty project and send bug report to Unity.