dotnet / core

.NET news, announcements, release notes, and more!
https://dot.net
MIT License
20.95k stars 4.91k forks source link

NuGet UnauthorizedAccessException on macos #8665

Closed mbaeum closed 1 year ago

mbaeum commented 1 year ago

Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/create Operating System: macos OS Version 13.3.1

When running dotnet new blazorserver -o BlazorApp --no-https -f net7.0 I get "System.UnauthorizedAccessException: Access to the path '/Users/{myusername}/.local/share/NuGet' is denied.". Problem seems to be with nuget, same error on dotnet nuget --help.

I checked, the path does not exist on my machine.

ManickaP commented 1 year ago

I assume that it's the last part of the path that doesn't exists, i.e. directory NuGet in .local/share. Am I right? What about creating console project and doing dotnet restore on it?

mbaeum commented 1 year ago

@ManickaP indeed, no NuGet folder in that location. I cannot run any dotnet commands in general without encountering this error. (except for --version)

ManickaP commented 1 year ago

Which way did you install dotnet? https://learn.microsoft.com/en-us/dotnet/core/install/macos Are you on x64 or arm? What version of dotnet, 7.0?

github-actions[bot] commented 1 year ago

This issue is stale because there has been no response to a request for more information for 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because there was no response to a request for more information for 10 days.