Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi, I'm Oleg. Today I want to build a progect in Unity 2017.4.36f1 (64-bit) and then me in the Colsole appeared Error about UnauthorizedAccessException: Access to the path "D:\" is denied. Please HELP me with that problem. More information you can see here.

UnauthorizedAccessException: Access to the path "D:\" is denied. System.IO.Directory.CreateDirectoriesInternal (System.String path) (at :0) System.IO.Directory.CreateDirectory (System.String path) (at :0) UnityEditor.Android.PostProcessor.Tasks.ZipIl2cppSymbols.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at :0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at :0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Topics: build,error,access,exception,console


What I have tried:

I tried updating Uniti versions and watching tutorials, but nothing has changed
Posted
Updated 22-Jan-20 5:56am

Ensure your account has access to the D;\ drive. If you are creating a project directly in the root of the D drive, or have anything that creates files in the root of the D drive then make sure it doesn't, always work in sub-folders and sometimes access to the root can be blocked. If you don't have a D drive then make sure your stuff is building to a drive you do have.
 
Share this answer
 
Comments
Oleg Pruh 24-Jan-20 12:31pm    
How to access to the D; \ drive? I don't know.
Trying to write anything at the root of a drive will be problematic on any recent Windows version; better create a directory on the D: drive and write your files in it instead.
 
Share this answer
 
Comments
Oleg Pruh 24-Jan-20 14:20pm    
How to create a directory on the D: drive and write your files in it instead. I don't know.
phil.o 24-Jan-20 14:42pm    
You mean you don't know how to create a directory?
ZurdoDev 24-Jan-20 16:22pm    
You should not be trying to use Unity if you do not know how to create a folder on Windows.
Oleg Pruh 24-Jan-20 17:36pm    
Sorry, I really don't know how to create that. Can we somehow solve this problem by discord? I created a great game, only when saving an error.
phil.o 25-Jan-20 4:49am    
- Open the file explorer (Windows + E)
- Right click on the D: drive
- Select New -> Folder
- Give the new folder a meaningful name
- Done
This is basic computer management stuff, that is why we are so surprised that you cannot perform it. You should really take the time to get familiar with basic OS operations, especially those involving the management of your file system. It might come back sooner or later and bite you hard if you don't.
We can't help you. We don't have access to your code, or your data, or your system: so we have no idea what kind of access you are trying to get to the root of drive D:, or even that D: exists on your computer.

Probably it does exist: the error message is telling you that your application (or the user it is running under which may or may not be the one you logged in as) does not have permission to access the folder or a file in it. So start with the debugger, and find out what code is accessing files, how the code accesses teh files, and what file and path it is trying to access. Then check that and see who does have permission to access it.

We can't do any of that for you!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900