question

guessmeifucan-8050 avatar image
0 Votes"
guessmeifucan-8050 asked ·

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

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.

windows-uwp
nugetissue.png (325.6 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RoyLi-MSFT avatar image
0 Votes"
RoyLi-MSFT answered ·

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






package.png (36.7 KiB)
· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RoyLi-MSFT Hai, i can access each sites and its downloading fine in my browser. There is no issue in my network for sure.

Can you please help me by providing the steps to download the NuGet Package manually and add to the local source with local source path ? all i can find in the offical site is
the command line script to install it from the Package Manager. i have already tried it but it too failed. There is an another link 'Download Package' of size below 5 MB, but i don't know how to proceed further with the downloaded package. Kindly help me @RoyLi-MSFT .

0 Votes 0 ·

@guessmeifucan-8050 Sure, I've updated the detailed steps in my answer. Please check that. I hope that helps!

0 Votes 0 ·
sgtpepper avatar image
0 Votes"
sgtpepper answered ·


  • 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.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.