Unable to install Microsoft.NetCore.UniversalWindowsPlatform. [need IMMEDIATE solution]

guess_me_if_u_can 126 Reputation points
2020-04-30T14:32:12.257+00:00

when i build my project, VS restores the NuGet packages. But i fails to download few packages. screenshot attached

7756-nugetissue.png

I have tried to install Microsoft.NetCore.UniversalWindowsPlatform from Package Manager Console. Even it fails to download few packages. i have tried for versions 6.2.10 and 6.2.9, both fails to install.

Kindly provide me the solution to install the package and build the Application as soon as possible. Thanks in advance.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Roy Li - MSFT 31,551 Reputation points Microsoft Vendor
    2020-05-01T01:33:55.193+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Could you please check your network to see if it could access the site in the screenshot? The error message shows you are timed out when VS trying to download the NuGet package.

    Another way that worth a try is that you could just go to the official site of NuGet packages and download the package manually. Then you could add it to the project from your local source.

    Here are the detailed steps:

    • Download the NuGet package you need from NuGet website and save it into a local folder.
    • Right-click on your project and choose Manage NuGet Packages.
    • Click the setting button on the upper right corner of NuGet Manager. You shall see the Options windows.
    • Click the green Add button to add a new package resource. Then modify the default value of the package source to the local folder where you saved the package. After that, click the Update Button beside the Source TextBox to apply the new source. Here is an image that I marked these three places.
      7796-package.png
    • Close the options windows and go back to the NuGet Manager.
    • Change the source on the upper right corner of NuGet Manager. It's a down arrow button. Choose the new package source that you added just now.
    • You will see the NuGet packages saved in the local folder and install them without downloading them.

    Best regards,

    Roy


1 additional answer

Sort by: Most helpful
  1. Sgt Pepper 6 Reputation points
    2020-05-01T11:07:33.38+00:00
    • Goto this folder which is the default nuget cache
      C:\Users\<user>\AppData\Local\NuGet\v3-cache\<some alphanumeric name>\
    • Then copy all .dat files (not dat-new) inside and add them to a zip file with minimal compression.
    • Then extract the .dat files into the nuget cache and replace all the .dat files. This is because nuget cache cleansup some old files. Doing this will change the time of creation.
    • Now try to install the package again. It may fail again.
    • If so add the newly created .dat files to the zip and extract all of them to the cache.
    • Repeat until finish.
    0 comments No comments