I have had weird problems with development in my Mac for a while. It must have to do with some recent OS update.
It started with ASP.NET being unable to write some keys to project folder, and then build processes leaving empty files in obj
folder. And then EF Core tools refused to work and threw up file access exceptions. I've left many questions here, and created an issue in EF Core's github.
I finally did an experiment and tried to simply create a file from .NET code: var file = File.Create("test.file");
and I get an exception Unhandled exception. System.UnauthorizedAccessException: Access to the path '/Users/myuser/dev/repro-ef/test.file' is denied.
I can create a new file with the same user in the same directory in terminal with no problems. dotnet new
will happily write files to my dev
folder.
I've been trying to find any system settings related to this, and turned on "Full Disk Access" to the /usr/local/share/dotnet/dotnet
executable. Did not help.
Does anybody have same problems? What permissions do I need to change?