- Home /
Question by
ShroomWasTaken · Feb 28, 2020 at 12:53 PM ·
c#compiler-erroraccess denied
C# Compiler error: Access to Assembly-CSharp.dll is denied
I'm having a problem where Unity can't access the Assembly-CSharp.dll file:
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.
error CS2012: Cannot open 'C:\Projects\<project name>\Temp\Assembly-CSharp.dll' for writing --`'Access to the path 'C:\Projects\<project name>\Temp\Assembly-CSharp.dll' is denied.'
I just installed a new version of Unity (2019.3.3f1, had 2019.3.2f1 before) because I had a similar error with the old one, except with the old one it failed to access a batch file called unity_csc.bat.
I looked around for solutions, most of them were recommending turning off antiviruses, but I have already added my C:\Projects folder as an exception to Avast! and Malwarebytes. Another recommendation was to run Unity as an administrator, which also didn't work. The last thing I tried was to allow everything to access the Temp folder in the windows properties/security tab, but that didn't work either.
Does anyone have any ideas on how to fix this? :)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612224114im_/https://answers.unity.com/themes/thub/images/avi.jpg)