Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnauthorizedAccessException is thrown when running the build #57

Closed
rkaraivanov opened this issue Jan 17, 2018 · 2 comments
Closed

UnauthorizedAccessException is thrown when running the build #57

rkaraivanov opened this issue Jan 17, 2018 · 2 comments
Assignees
Labels

Comments

@rkaraivanov
Copy link
Member

Trying to build and run the project with npm start results in a UnauthorizedAccessException being thrown with the following stack trace:

Error:System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\lib\docfx\tools\plugins_kc5k4jjw.gij\plugins' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at Microsoft.DocAsCode.Build.Engine.TemplateManager.Copy(Action`1 streamHandler, String filePath, Boolean overwrite)
   at Microsoft.DocAsCode.Build.Engine.TemplateManager.TryExportResourceFiles(IEnumerable`1 resourceNames, String outputDirectory, Boolean overwrite, String regexFilter)
   at Microsoft.DocAsCode.SubCommands.BuildCommand.BuildDocument(String baseDirectory, String outputDirectory)
   at Microsoft.DocAsCode.SubCommands.BuildCommand.Exec(SubCommandRunningContext context)
   at Microsoft.DocAsCode.Program.ExecSubCommand(String[] args)
@tiliev
Copy link
Contributor

tiliev commented Feb 12, 2018

This error occurs because of the chocolatey package manager used to install docfx. Any attempt to access C:\ProgramData\chocolatey without elevated permissions will result in error. You can read additional information from point 1 here. This is the issue in chocolatey repo where this is discussed. There are some work-arounds. They won't be fixing this since it is purposely implemented for security reasons.

@rkaraivanov
Copy link
Member Author

Alright, then. We should mention that in the Getting Started section of the README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants