Vijay Nirmal
Vijay Nirmal

Reputation: 5837

Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'

I want to update Microsoft.NETCore.UniversalWindowsPlatform but it shows an error

Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'

If I open the Output tab it shows the following

Restoring packages for D:\Project\Windows 10 Developement\Template\HamburgerMenu\HamburgerMenu\project.json...
  GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/index.json
  OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/index.json 938ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/5.3.3/microsoft.netcore.universalwindowsplatform.5.3.3.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.universalwindowsplatform/5.3.3/microsoft.netcore.universalwindowsplatform.5.3.3.nupkg 936ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/index.json
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/index.json 946ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/1.6.2/microsoft.net.native.compiler.1.6.2.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.compiler/1.6.2/microsoft.net.native.compiler.1.6.2.nupkg 938ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/index.json
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/index.json
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/index.json
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/index.json 481ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/1.6.1/microsoft.net.native.sharedlibrary-arm.1.6.1.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/index.json 967ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/index.json 1438ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/1.6.1/microsoft.net.native.sharedlibrary-x86.1.6.1.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/1.6.1/microsoft.net.native.sharedlibrary-arm.1.6.1.nupkg 1347ms
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/1.6.1/microsoft.net.native.sharedlibrary-x86.1.6.1.nupkg 1161ms
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x64.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg' has timed out after 100000ms.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x64.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg' has timed out after 100000ms.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg
Failed to download package 'Microsoft.Net.Native.SharedLibrary-x64.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x64/1.6.1/microsoft.net.native.sharedlibrary-x64.1.6.1.nupkg' has timed out after 100000ms.
Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'.
Time Elapsed: 00:27:03.1499426
========== Finished ==========

Solution Tried

  1. Running as Admin
  2. Nuget error install package Microsoft.NETCore.UniversalWindowsPlatform
  3. Using Package Manager Console to update

Update

I have Installed Microsoft.Net.Native.SharedLibrary-x64 manually. Now also it is not working.

Failed to download package 'Microsoft.Net.Native.SharedLibrary-x86.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-x86/1.6.1/microsoft.net.native.sharedlibrary-x86.1.6.1.nupkg'.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
  An existing connection was forcibly closed by the remote host
Failed to download package 'Microsoft.Net.Native.SharedLibrary-arm.1.6.1' from 'https://api.nuget.org/v3-flatcontainer/microsoft.net.native.sharedlibrary-arm/1.6.1/microsoft.net.native.sharedlibrary-arm.1.6.1.nupkg'.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
  An existing connection was forcibly closed by the remote host

Upvotes: 1

Views: 2212

Answers (3)

patrickjlee
patrickjlee

Reputation: 250

In my case, I was getting this problem when trying to run a UWP (Universal Windows Platform) project, and the solution was to select "Developer mode" in the Windows 10 Settings "For Developers"

Upvotes: 0

rubStackOverflow
rubStackOverflow

Reputation: 6163

Really strange issue, in my case, I had to change my default network DNS(network card) from 8.8.8.8 to 208.67.222.222.

After that I was able to update Microsoft.NETCore.UniversalWindowsPlatform.

Upvotes: 1

Leo Liu
Leo Liu

Reputation: 76670

Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'

It is hard to make sure that whether this issue is related to the internet connection, the project itself or others according to the error log, but I could provide you a workaround for this issue:

Workaround:

  • Download the package "Microsoft.Net.Native.SharedLibrary-x64" from the nuget.org.

enter image description here

  • Use nuget add command line add that package to the global package folderC:\Users\username\.nuget\packages:

    nuget add packagePath -Source sourcePath

enter image description here

After that, you will notice the package will be added in to that folder:

enter image description here - Update Microsoft.NETCore.UniversalWindowsPlatform package.

Upvotes: 2

Related Questions