none
Access denied when update/restore packages with NuGet RRS feed

  • Question

  • Hi, I am using Windows 10 and Visual Studio Community 2017. I am creating Xamarin.Forms project and first thing that I do is to update NuGet packages, but I see "access denied" errors. NuGet creates folders for packages in C:/users/username/.nuget/packages, but all of them are read-only. For some of them even I do not have access via File Explorer, but I am with administrator account and there is no other account. Because of this access denied Nuget can't restore cache, update packages and I can't clear NuGet cache. I am running Visual Studio as administrator.

    What I can do ?

    • Moved by 宝宝徐 Wednesday, December 27, 2017 2:03 AM
    Monday, December 18, 2017 1:54 PM

All replies

  • Hi Vladi160,

    Thank you for posting in MSDN forum.

    To troubleshoot this issue, we'd like to know if you are the only user on your computer. If so, you can follow the steps listed below:

    Right-click on your C Drive, and choose Properties.

    1. Go to Security tab.
    2. Click Advanced, then Change Permissions.
    3. Highlight the user, and click Edit.
    4. Choose This folder, subfolders and files under Applies to:.
    5. Choose Full Control under Basic Permissions.
    6. Hit OK.

    If there are other users on the computer, follow the steps below:

    1. Go to C Drive.
    2. Right-click your user name in Users folder, then click Properties.
    3. Go to Security tab.
    4. Click Advanced, then click Continue.
    5. Click Enable Inheritance.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by 宝宝徐 Tuesday, December 19, 2017 8:30 AM
    Tuesday, December 19, 2017 8:09 AM
  • Hi, there is full control for all users (i have created another with type administrator).

    "If there are other users on the computer, follow the steps below:" I did that, but I am getting an error access denied. When I do that I am with administrator account and I do it on the folder for the current user.

    This problem is not for all package folders. For the example when I test now is this folder:

    "Error: Access to the path 'C:\Users\username\.nuget\packages\xamarin.android.support.annotations\25.4.0.2\lib' is denied."

    Tuesday, December 19, 2017 2:13 PM
  • Hi Vladi160,

    Thank you for the update and sorry for the delay reply.

    This forum is about VS setup and installation, as your question is much related to the Xamarin project Nuget package update, I suggest you could post in https://forums.xamarin.com/ to get a much professional support.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 26, 2017 8:21 AM