Visual Studio - 在 MacOs 中将 Nuget 包添加到项目时拒绝访问路径“/Users/.local/share/NuGet”

Visual Studio - Access to the path '/Users/.local/share/NuGet' is denied when adding Nuget package to the project in MacOs

我在 macOS 中使用 Visual Studio 2019 进行 .net Core 开发。

当我尝试添加 Nuget 包时,遇到以下错误

Visual Studio - Access to the path '/Users/CCCC/.local/share/NuGet' is denied

如何解决?

这个错误的原因是NuGet文件夹没有自动创建
我自己创建文件夹后就可以了