New console app + any dependency in Linux fails to restore
See original GitHub issueSteps 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:
- Created 7 years ago
- Comments:13 (5 by maintainers)
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}
Also working here.