Nuget add packages gives access denied errors

天大地大妈咪最大 提交于 2020-03-03 09:12:08

问题


When I add Nuget packages via the Visual Studio 2015 GUI some packages don't install with the following error

Access to the path 'Microsoft.DotNet.InternalAbstractions.dll' is denied.

I tried running Visual Studio 2015 as Administrator and uninstalling the packages and adding them again but I still get the same error


回答1:


I closed Visual Studio and killed the 2 running processes called dotnet as well as deleted the C:\Users\myser.nuget\packages folder to ensure all packages are redownloaded again in case something was corrupt.




回答2:


Go to the dll path and make sure to give the right permission access to the local machine :

I usually do the below :

1- Untick the Read-only field :

2- Add the missing user access :




回答3:


I close my Visual Studio.. and start it again as an administrator... It Worked.



来源:https://stackoverflow.com/questions/41951949/nuget-add-packages-gives-access-denied-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!