It took nearly 4 minutes to decide it could not proceed!
This was with WiFi on but on public transport so a weird pseudo connection state.
With WiFi off it took just over a second to give the same error.
Shouldn't it fail over to the cache in this circumstance?
Why does it not show the nuget config files and sources that it used?
Is there a recommended way to exclude the web source when working offline?
Can we have a timeout parameter so avoid the long wait for a dodgy connection?
$ dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
$ dotnet restore -v n --ignore-failed-sources
Build started 23/08/2017 17:39:28.
1>Project "/Users/User1/DotNetTest/App/App.sln" on node 1 (Restore target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Restore:
Restoring packages for /Users/User1/DotNetTest/App/App/App.csproj...
Restoring packages for /Users/User1/DotNetTest/App/App.Test/App.Test.csproj...
Restoring packages for /Users/User1/DotNetTest/App/App.Library/App.Library.csproj...
Committing restore...
Tool assets file has not changed. Skipping assets file write. Path: /Users/User1/.nuget/packages/.tools/microsoft.dotnet.watcher.tools/1.0.0/netcoreapp2.0/project.assets.json
Restore completed in 33.15 ms for /Users/User1/DotNetTest/App/App.Test/App.Test.csproj.
1>/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(102,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/Users/User1/DotNetTest/App/App.sln]
/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(102,5): error : An error occurred while sending the request. [/Users/User1/DotNetTest/App/App.sln]
/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(102,5): error : Couldn't connect to server [/Users/User1/DotNetTest/App/App.sln]
1>Done Building Project "/Users/User1/DotNetTest/App/App.sln" (Restore target(s)) -- FAILED.
Build FAILED.
"/Users/User1/DotNetTest/App/App.sln" (Restore target) (1) ->
(Restore target) ->
/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(102,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/Users/User1/DotNetTest/App/App.sln]
/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(102,5): error : An error occurred while sending the request. [/Users/User1/DotNetTest/App/App.sln]
/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(102,5): error : Couldn't connect to server [/Users/User1/DotNetTest/App/App.sln]
0 Warning(s)
1 Error(s)
Time Elapsed 00:03:47.87
From @bruce31 on August 23, 2017 18:22
It took nearly 4 minutes to decide it could not proceed! This was with WiFi on but on public transport so a weird pseudo connection state. With WiFi off it took just over a second to give the same error. Shouldn't it fail over to the cache in this circumstance? Why does it not show the nuget config files and sources that it used? Is there a recommended way to exclude the web source when working offline? Can we have a timeout parameter so avoid the long wait for a dodgy connection?
Copied from original issue: dotnet/sdk#1532