When trying to run dotnet restore
in the root folder of my project, I get a following error:
C:\Program Files\dotnet\sdk\7.0.100\NuGet.targets(676,5): error : Unable to obtain lock file access on 'C:\Users\user\AppData\Local\Temp\NuGetScratch\lock' fo
r operations on 'C:\Users\user\AppData\Roaming\NuGet\NuGet.Config'. This may mean that a different user or administrator is holding this lock and that this pr
rashed and left an inaccessible lock file, in this case removing the file 'C:\Users\user\AppData\Local\Temp\NuGetScratch\lock' will allow NuGet to continue. [
C:\Users\user\Documents\Kurs C#\FirstProject\FirstProject\FirstProject.csproj]
None of the solutions I've found in the Microsoft docs work. I've managed to find a possible solution here: Dotnet commands fail when restoring Nuget packages in shell script However, how exactly am I supposed to change these permissions?