-
Notifications
You must be signed in to change notification settings - Fork 379
Open
Description
Hi,
I'm running into an issue when trying to install packages via NuGetForUnity on macOS.
The installation fails with the following error:
IOException: Permission denied
Which occurs at:
Directory.CreateDirectory(CacheOutputDirectory);Looking into the source code, I see that DetermineCacheOutputDirectory() resolves the cache path like this:
var localApplicationDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
return Path.Combine(Path.GetFullPath(localApplicationDataFolder), "NuGet", "Cache");On macOS, this resolves to:
/Users/eran/.local/share/NuGet/Cache
(eran is my username.)
However, this directory doesn't exist by default, and attempting to create it programmatically fails due to insufficient permissions.
To resolve the issue, I had to manually:
- Create the directory
- Grant read/write permissions to
everyoneon that folder
I'm not sure whether this is a macOS-specific issue or something more general, but it might be worth mentioning in the documentation or installation guide. Hopefully this can help others running into the same problem.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels