🐎BLOG🐎

.Netインストール時にでたエラー

pulished:

いつ起こったか

.NETチュートリアル中

dotnet new console -o MydotNetApp -f net7.0 .Netインストール後にこのコマンドを通そうとおもったとき

Error内容

System.UnauthorizedAccessException: Access to the path '/Users/ユーザー名/.local/share/NuGet' is denied.

 ---> System.IO.IOException: Permission denied

   --- End of inner exception stack trace ---
   at System.IO.FileSystem.CreateParentsAndDirectory(String fullPath, UnixFileMode unixCreateMode)
   at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
   at System.IO.Directory.CreateDirectory(String path)
   at NuGet.Common.Migrations.MigrationRunner.GetMigrationsDirectory()
   at NuGet.Common.Migrations.MigrationRunner.Run()
   at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
   at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)

参考

Point: Create a new Xamarin.Forms empty project

やったこと