- Home /
Assembly CSharp DLL mdb is Denied
Hi, I am working on my final year project for university and for some reason I keep getting the following message whenever I use C# in my game.
Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.UnauthorizedAccessException: Access to the path "C:\Users\Samuel\Documents\New Unity Project 1\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 no that its not a scripting problem within my game as the error above has come from a Demo Project from the asset store. If I use Java Script in my game it doesn't come up with the error however I have started the project in C# and I want to avoid restarting as much as possible, I have looked at a couple of other peoples questions about the same problem but couldn't see how they fixed it.
I have re-installed Unity (I have the newest update) but it didn't help, the problem started a couple of days ago when I first published to apk file for a test. This is really stressing me out so if everyone could tell me how to fix this I would be very grateful. I am very poor at programming so if some one can help please could you explain in a step by step fashion.
Thank you, Sam
Very strange! When i launched Unity it was a blah-blah.dll.mdb but Unity deleted it in a second When i'm trying to stop unity it is deleting Temp folder
Answer by McGhie01 · Jan 20, 2014 at 11:04 PM
Hi, yeah I seem to have fixed it. All I did was close the entire unity application and went to the game files, found the temp folder and deleted the entire folder, and then restarted unity and it worked. I did have to do this a couple of times and for some reason it has now stopped showing the error and C# is working perfectly fine. Sorry it's not much of a solution but I hope it help :)
I've started Unity as Ad$$anonymous$$istrator, and the problem stopped! :-)
Usually a restart will fix it temporarily, but removing the temp folder made it a permanent error for me.
Answer by Djblake600 · Apr 06, 2015 at 03:50 PM
I Know A Solution
1: Delete ALL Your Unity Projects
2: Make A New Project
3: Import Character Controller And The Error Should Pop Up
4: Restart Unity
5: DONE!
Answer by AppBite · Jan 21, 2014 at 05:05 AM
I'm wondering if Unity is running Mono as the wrong user ? I notice Sam is running his project from C:-Users-Samuel like I do, but Unity is still installing Angry Bots in C:-User-Public
I do believe its is AppBites answer, i had the same issue and moved the project folders from my ID logon based docs folder to the public users doc folders and i no longer get the message.
I am also having the same issue. I will delete the file, and it will be back on the next project. It only happens on certain asset packs, two in particular is Unity water pro, and unity's assets (beta) pack. I'm snooping for a solution today as well. I'm checking on AppBite's recommendation. Any further clarification would most certainly be appreciated.
Answer by HonoraryBob · May 11, 2015 at 04:58 AM
I ran into the same problem with Unity 5's Car demo in the Standard Assets, and I solved it by restarting Unity and then running it as administrator.
Answer by AlpayKasal · Jul 04, 2016 at 01:28 PM
I followed the advise of @Ekior , it worked for me. I will now make this my future workflow.
SOLUTION: I copied my project out of the windows login id based documents folder and put in in the public documents folder (where unity normally keeps it's standard assets). and i have no more rights issues.
simply running unity as administrator did not work for me. I'm using win10 btw (just for that juicy dx11).