I try to build a project but I got this error message,
Build FAILED.
/Users/ppungpong/Downloads/FPC_E_Working.API/FPC_EWorking.API.csproj : warning NU1701: Package 'Microsoft.AspNet.WebApi.Core 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project. [/Users/ppungpong/Downloads/FPC_E_Working.API/FPC_EWorking.API.sln]
/Users/ppungpong/Downloads/FPC_E_Working.API/FPC_EWorking.API.csproj : warning NU1701: Package 'Microsoft.AspNet.WebApi.WebHost 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project. [/Users/ppungpong/Downloads/FPC_E_Working.API/FPC_EWorking.API.sln]
/usr/local/share/dotnet/sdk/5.0.400/NuGet.targets(131,5): error : Access to the path '/Users/ppungpong/Downloads/FPC_E_Working.API/obj' is denied. [/Users/ppungpong/Downloads/FPC_E_Working.API/FPC_EWorking.API.sln]
/usr/local/share/dotnet/sdk/5.0.400/NuGet.targets(131,5): error : Permission denied [/Users/ppungpong/Downloads/FPC_E_Working.API/FPC_EWorking.API.sln]
2 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.05
➜ FPC_E_Working.API
The "Access to the path ... is denied" with "Permission denied" How can I solve it?
Note: I use Visual Studio Code for Mac to run out my project and I use Mac M1 with BigSur 11.5.2
And I had allowed permission for file accessed.
CodePudding user response:
Create this directory :
/Users/ppungpong/projects/FPC_E_Working.API
and work in that directory.
Seems vscode does not have write access to Downloads folder.