question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New console app + any dependency in Linux fails to restore

See original GitHub issue

Steps to reproduce

  • Install latest .NETCore v2 on linux
  • untar package
  • dotnet new console
  • Edit .csproj to add Newtonsoft.Json (any version) package reference
  • dotnet restore

Expected behavior

It restores the packages and then is able to compile.

Actual behavior

dudeman@trashme:~/goo$ …/dotnet/dotnet restore Restoring packages for /home/dudeman/goo/goo.csproj… /home/dudeman/dotnet/sdk/2.0.0-alpha-004853/NuGet.targets(97,5): error : Unable to load the service index for source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. [/home/dudeman/goo/goo.csproj] /home/dudeman/dotnet/sdk/2.0.0-alpha-004853/NuGet.targets(97,5): error : The type initializer for ‘System.Net.Http.CurlHandler’ threw an exception. [/home/dudeman/goo/goo.csproj] /home/dudeman/dotnet/sdk/2.0.0-alpha-004853/NuGet.targets(97,5): error : The type initializer for ‘Http’ threw an exception. [/home/dudeman/goo/goo.csproj] /home/dudeman/dotnet/sdk/2.0.0-alpha-004853/NuGet.targets(97,5): error : The type initializer for ‘HttpInitializer’ threw an exception. [/home/dudeman/goo/goo.csproj] /home/dudeman/dotnet/sdk/2.0.0-alpha-004853/NuGet.targets(97,5): error : Unable to load DLL ‘System.Net.Http.Native’: The specified module could not be found. [/home/dudeman/goo/goo.csproj] /home/dudeman/dotnet/sdk/2.0.0-alpha-004853/NuGet.targets(97,5): error : (Exception from HRESULT: 0x8007007E) [/home/dudeman/goo/goo.csproj]

Environment data

dotnet --info output:

dudeman@trashme:~/goo$ …/dotnet/dotnet --info .NET Command Line Tools (2.0.0-alpha-004853)

Product Information: Version: 2.0.0-alpha-004853 Commit SHA-1 hash: e7689a3116

Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64 Base Path: /home/dudeman/dotnet/sdk/2.0.0-alpha-004853/

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
nlowecommented, Feb 15, 2017

An update was made to the AUR pkgbuild. I can now restore packages. From looking at the diff, it appears that System.Net.Http.Native.so was not being copied to ${_fxdir}/bin/Linux.x64.Release/Native/${file}

0reactions
Denommuscommented, Feb 16, 2017

Also working here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependencies not found in .Net Core console application
I've tried many things like issuing a "dotnet restore" command. Deleting the NugetPackageFallBack folder, reparing Visual Studio and getting all ...
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
This article focuses on common errors when restoring packages and steps to resolve them. Package Restore tries to install all package ...
Read more >
How do I resolve unmet dependencies after adding a PPA?
To solve the problem you have three options: disable, purge (revert back to original package in Ubuntu repositories) or remove PPA. Disable:
Read more >
unable to locate dependencies on Linux only, on windows ...
Hi I have a dnxcore50 project where we use some dependencies like Diagnostics, or IO, Reflection.... just to mention a few, in windows...
Read more >
How to Install and Correct Dependencies Issues in Ubuntu
Learn about How to Install and Correct Dependencies Issues in Ubuntu today with Liquid Web.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found