Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Argument Exception when trying to run dnu restore #147

Closed
ganeshran opened this issue Jul 23, 2015 · 7 comments
Closed

Argument Exception when trying to run dnu restore #147

ganeshran opened this issue Jul 23, 2015 · 7 comments

Comments

@ganeshran
Copy link

Hi I am trying to run the demo Hello World program on Centos7 but getting the error. It isn't able to install the dependencies.

⇒ dnu install System.Console
Microsoft .NET Development Utility CoreCLR-x64-1.0.0-beta7-12264

GET https://www.nuget.org/api/v2/
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Console'
Warning: FindPackagesById: System.Console
The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Console'
Warning: FindPackagesById: System.Console
The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Console'
Error: FindPackagesById: System.Console
The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress
System.ArgumentException: The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress

@ganeshran
Copy link
Author

I have tried this on Ubuntu 14.04 with the same result. Also changed the endpoint to http:// instead of https. No luck

@ganeshran ganeshran changed the title Argument Exception when trying to run dnu install packages.config Argument Exception when trying to run dnu restore Jul 23, 2015
@akoeplinger
Copy link
Member

Restoring packages isn't supported on the CoreCLR-based DNX yet. You need to switch to the Mono-based DNX, restore there, switch back to CoreCLR and then run. See https://github.com/dotnet/coreclr/blob/master/Documentation/install/get-dotnetcore-dnx-linux.md#run-your-app

@ganeshran
Copy link
Author

Hi @akoeplinger thanks for your reply. I tried switching to mono but am getting another error. I had switched to coreclr because dnu restore wasn't working on mono first.

I also tried to remove all runtimes and start from scratch. still no go :(

"Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.TaskAwaiter`1' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."

⇒ dnvm install -r mono latest -u
Determining latest version
Latest version is 1.0.0-beta7-12264
Downloading dnx-mono.1.0.0-beta7-12264 from https://www.myget.org/F/aspnetvnext/api/v2
Download: https://www.myget.org/F/aspnetvnext/api/v2/package/dnx-mono/1.0.0-beta7-12264
######################################################################## 100.0%
Installing to /home/ganesh/.dnx/runtimes/dnx-mono.1.0.0-beta7-12264
Adding /home/ganesh/.dnx/runtimes/dnx-mono.1.0.0-beta7-12264/bin to process PATH
ganesh@duraip-pc:/Development/test|
⇒ ls
HelloWorld.cs project.json
ganesh@duraip-pc:
/Development/test|
⇒ dnu restore

Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.TaskAwaiter1' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. at EntryPoint.Main (System.String[] arguments) [0x00000] in <filename unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.TaskAwaiter1' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at EntryPoint.Main (System.String[] arguments) [0x00000] in :0

@akoeplinger
Copy link
Member

Which Mono version (mono --version) are you using?

@ganeshran
Copy link
Author

@akoeplinger Found the issue. I had installed mono-core package from epel repo. That doesn't work with dnu. After removing it and adding mono repo to yum and installing mono-complete it's working fine.

Thanks! I am able to run the code now

@ganeshran
Copy link
Author

Please close the issue. Appreciate the support!

@stephentoub
Copy link
Member

Thanks,@akoeplinger.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants