Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet restore Unable to load the service index for source https://api.nuget.org/v3/index.json #5358

Open
livarcocc opened this issue Jun 7, 2017 · 83 comments

Comments

@livarcocc
Copy link

From @Xarkam on June 7, 2017 7:25

Steps to reproduce

Clone https://github.com/ExtCore/ExtCore-Sample-Modular-Ui-Adv

Expected behavior

Restore package

Actual behavior

PS F:\Developpements\ExtCore-Sample-Modular-Ui-Adv> dotnet restore --verbosity diag
C:\Program Files\dotnet\sdk\1.0.4\MSBuild.dll /NoLogo /ConsoleLoggerParameters:Verbosity=Minimal /Logger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program F
iles\dotnet\sdk\1.0.4\dotnet.dll /m /t:Restore /v:m /verbosity:diag .\WebApplication.sln
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers2\ClientEventHandlers2.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension3\Extension3.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEventHandlers\ServerEventHandlers.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Barebone\Barebone.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\WebApplication\WebApplication.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Infrastructure\Infrastructure.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEvents\ServerEvents.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension2\Extension2.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension1\Extension1.csproj...
  Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers1\ClientEventHandlers1.csproj...
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json.\r [F:\Developpemen
ts\ExtCore-Sample-Modular-Ui-Adv\WebApplication.sln]
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error :   An error occurred while sending the request.\r [F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\W
ebApplication.sln]
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error :   Failed to connect to server [F:\Developpements\ExtCore-Sample-Modula
r-Ui-Adv\WebApplication.sln]

Environment data

dotnet --info output:

PS F:\Developpements\ExtCore-Sample-Modular-Ui-Adv> dotnet --info
.NET Command Line Tools (1.0.4)

Product Information:
 Version:            1.0.4
 Commit SHA-1 hash:  af1e6684fd

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.4

If I use nuget cli for restore, I don't have any problem.

PS F:\Developpements\ExtCore-Sample-Modular-Ui-Adv> h:\nuget restore
MSBuild auto-detection: using msbuild version '15.1.1012.6693' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin'.
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEvents\ServerEvents.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers1\ClientEventHandlers1.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension1\Extension1.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension3\Extension3.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension2\Extension2.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Barebone\Barebone.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers2\ClientEventHandlers2.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Infrastructure\Infrastructure.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEventHandlers\ServerEventHandlers.csproj...
Restoring packages for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\WebApplication\WebApplication.csproj...
  GET https://api.nuget.org/v3-flatcontainer/extcore.mvc/index.json
  GET https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json
  GET https://api.nuget.org/v3-flatcontainer/extcore.events/index.json
  GET https://api.nuget.org/v3-flatcontainer/extcore.webapplication/index.json
  OK https://api.nuget.org/v3-flatcontainer/extcore.webapplication/index.json 247ms
  GET https://api.nuget.org/v3-flatcontainer/extcore.webapplication/1.2.0/extcore.webapplication.1.2.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/extcore.mvc/index.json 498ms
  GET https://api.nuget.org/v3-flatcontainer/extcore.mvc/1.2.0/extcore.mvc.1.2.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json 522ms
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json
  GET https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/1.2.0/extcore.mvc.infrastructure.1.2.0.nupkg
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json
  OK https://api.nuget.org/v3-flatcontainer/extcore.events/index.json 555ms
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json
  GET https://api.nuget.org/v3-flatcontainer/extcore.events/1.2.0/extcore.events.1.2.0.nupkg
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.events/index.json
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.events/index.json
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/index.json
  OK https://api.nuget.org/v3-flatcontainer/extcore.mvc/1.2.0/extcore.mvc.1.2.0.nupkg 117ms
  OK https://api.nuget.org/v3-flatcontainer/extcore.mvc.infrastructure/1.2.0/extcore.mvc.infrastructure.1.2.0.nupkg 123ms
  OK https://api.nuget.org/v3-flatcontainer/extcore.webapplication/1.2.0/extcore.webapplication.1.2.0.nupkg 419ms
  GET https://api.nuget.org/v3-flatcontainer/extcore.infrastructure/index.json
  OK https://api.nuget.org/v3-flatcontainer/extcore.events/1.2.0/extcore.events.1.2.0.nupkg 421ms
  OK https://api.nuget.org/v3-flatcontainer/extcore.infrastructure/index.json 418ms
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.infrastructure/index.json
  CACHE https://api.nuget.org/v3-flatcontainer/extcore.infrastructure/index.json
  GET https://api.nuget.org/v3-flatcontainer/extcore.infrastructure/1.2.0/extcore.infrastructure.1.2.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/extcore.infrastructure/1.2.0/extcore.infrastructure.1.2.0.nupkg 120ms
Installing ExtCore.Events 1.2.0.
Installing ExtCore.Infrastructure 1.2.0.
Installing ExtCore.Mvc.Infrastructure 1.2.0.
Installing ExtCore.WebApplication 1.2.0.
Installing ExtCore.Mvc 1.2.0.
Committing restore...
Generating MSBuild file F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEventHandlers\obj\ServerEventHandlers.csproj.nuget.g.props.
Writing lock file to disk. Path: F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEventHandlers\obj\project.assets.json
Restore completed in 6,24 sec for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEventHandlers\ServerEventHandlers.csproj.
Committing restore...
Generating MSBuild file F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers2\obj\ClientEventHandlers2.csproj.nuget.g.props.
Writing lock file to disk. Path: F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers2\obj\project.assets.json
Restore completed in 6,64 sec for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers2\ClientEventHandlers2.csproj.
Committing restore...
Generating MSBuild file F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Infrastructure\obj\Infrastructure.csproj.nuget.g.props.
Writing lock file to disk. Path: F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Infrastructure\obj\project.assets.json
Restore completed in 7,01 sec for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Infrastructure\Infrastructure.csproj.
Committing restore...
Generating MSBuild file F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEvents\obj\ServerEvents.csproj.nuget.g.props.
Writing lock file to disk. Path: F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEvents\obj\project.assets.json
Restore completed in 7,43 sec for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEvents\ServerEvents.csproj.
Committing restore...
Generating MSBuild file F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Barebone\obj\Barebone.csproj.nuget.g.props.
Writing lock file to disk. Path: F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Barebone\obj\project.assets.json
Restore completed in 7,83 sec for F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Barebone\Barebone.csproj.

NuGet Config files used:
    C:\Users\benjamin\AppData\Roaming\NuGet\NuGet.Config
    C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

Feeds used:
    https://api.nuget.org/v3/index.json
    C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

Installed:
    2 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers1\ClientEventHandlers1.csproj
    5 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\WebApplication\WebApplication.csproj
    2 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension1\Extension1.csproj
    2 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension2\Extension2.csproj
    2 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Extension3\Extension3.csproj
    3 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEventHandlers\ServerEventHandlers.csproj
    3 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ClientEventHandlers2\ClientEventHandlers2.csproj
    2 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Infrastructure\Infrastructure.csproj
    3 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\ServerEvents\ServerEvents.csproj
    2 package(s) to F:\Developpements\ExtCore-Sample-Modular-Ui-Adv\src\Barebone\Barebone.csproj

Copied from original issue: dotnet/cli#6783

@mishra14
Copy link
Contributor

mishra14 commented Jun 8, 2017

@emgarten

@emgarten
Copy link
Member

emgarten commented Jun 8, 2017

@Xarkam is this reproing consistently for you?

Both dotnet restore and msbuild /t:restore run the same code. It is interesting that you see different results between them when making network calls.

@Xarkam
Copy link

Xarkam commented Jun 8, 2017

@emgarten for the project in logs, yes every time.
I don't have any problems with visual studio 2017 on nuget restore packages.

But, I have not time for testing with another project before 5 days.

@Xarkam
Copy link

Xarkam commented Jun 10, 2017

@emgarten hello, I have test with this repository: https://github.com/aspnet/MusicStore and the problem is same

PS F:\Developpements\temp\MusicStore> dotnet restore
  Restoring packages for F:\Developpements\temp\MusicStore\test\MusicStore.Test\MusicStore.Test.csproj...
  Restoring packages for F:\Developpements\temp\MusicStore\test\MusicStore.E2ETests\MusicStore.E2ETests.csproj...
  Restoring packages for F:\Developpements\temp\MusicStore\samples\MusicStore\MusicStore.csproj...
  Restoring packages for F:\Developpements\temp\MusicStore\test\MusicStore.E2ETests\MusicStore.E2ETests.csproj...
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Unable to load the service index for source https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json.\r [F:\Developpements\temp\MusicStore\MusicStore.sln]
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error :   An error occurred while sending the request.\r [F:\Developpements\temp\MusicStore\MusicStore.sln]
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error :   Failed to connect to server [F:\Developpements\temp\MusicStore\MusicStore.sln]

By nuget cli, everything happens correctly

@emgarten
Copy link
Member

@Xarkam would you be able to get a network trace of what is happening? Fiddler is a tool that can help with this.

Are you using any proxies?

@Xarkam
Copy link

Xarkam commented Jun 14, 2017

Hello, I don't use any proxy.

I have installed fiddler and I test in next few days.

@nevotheless
Copy link

I have the unable to load the service issue as well.

C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Unable to load the service index for source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json.\r [C:\Users\Someusername\Source\Repos\Projectname\project.sln]
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error :   Invalid length for a Base-64 char array or string. [C:\Users\Someusername\Source\Repos\Projectname\project.sln]

I guess the root cause is similar. But unlike Xarkam i am behind a corporate proxy, will try to test the connection via fiddler in a few days as well.

@Xarkam
Copy link

Xarkam commented Jun 17, 2017

Hello,
I don't understand. Today, on my first pc, no problems found.
But, I will test to another pc with same problem.

@emgarten
Copy link
Member

emgarten commented Jul 6, 2017

@ununseptium @Xarkam Any updates on this?

@Xarkam
Copy link

Xarkam commented Jul 7, 2017

Hello,
Since the update of nuget 1.0.3 to 1.0.4 it seems that the problem is no longer present.

I've tested on 2 pc.

image

@AliMD
Copy link

AliMD commented Jul 12, 2017

same issue on mac and sdk 1.04

@ashish005
Copy link

Hi Guys,
Followed the instruction provided by microsoft and it is all looks cool!! :)

  1. Install pre-requisites - Fixed my issues for the same
    https://www.microsoft.com/net/core#macos

@mishra14 mishra14 added Functionality:Restore Resolution:NeedMoreInfo This issue appears to not have enough info to take action labels Nov 30, 2017
@mishra14
Copy link
Contributor

Closing since most folks are unblocked.

@AliMD if you are still facing this issue then please give us a fiddler trace for investigation.

@mishra14 mishra14 added this to the 4.6 milestone Nov 30, 2017
@vikas6681
Copy link

I do still see this error on two of our machine. Any help ?

Severity Code Description Project File Line Suppression State
Error NuGet Package restore failed for project XXXXX Unable to find version '6.0.4' of package 'Newtonsoft.Json'.
https://api.nuget.org/v3/index.json: Unable to load the service index for source https://api.nuget.org/v3/index.json.
Could not load type 'Newtonsoft.Json.Linq.JsonLoadSettings' from assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
. Please see Error List window for detailed warnings and errors.

@gidduk
Copy link

gidduk commented Apr 13, 2018

I have the same issue reported by vikas6681. I am using Windows 10 (OS Build 15036.966) with VS.Net 2017 (15.6.6)
"[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
Could not load type 'Newtonsoft.Json.Linq.JsonLoadSettings' from assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'."

@mishra14 mishra14 removed the Resolution:NeedMoreInfo This issue appears to not have enough info to take action label Apr 13, 2018
@mishra14 mishra14 reopened this Apr 13, 2018
@vikas6681
Copy link

Any update team ? This is kinda blocking me from last 4 days.

@vikas6681
Copy link

Hey Kegor,

Thanks for inputs but we are trying to hit this API from India.

@gidduk
Copy link

gidduk commented Apr 17, 2018

I am hitting the url from US.
I can get the url from the browser but not from VS.Net. It does not work in my laptop or the desktop.

@kdg3737
Copy link

kdg3737 commented Apr 17, 2018

Removing https://api.nuget.org/v3/index.json from packages\microsoft.dotnet.buildtools\2.1.0-preview3-02711-02\lib\init-tools.cmd, build, adding https://api.nuget.org/v3/index.json back, build, somehow seems to have fixed it for me.

@vikas6681
Copy link

vikas6681 commented Apr 18, 2018

I don't see this folder/file in my system as well as code

@gatsbys
Copy link

gatsbys commented Apr 19, 2018

Same here guys

@gidduk
Copy link

gidduk commented Apr 26, 2018

I can connect to Nuget from VS.Net 2015 but not VS.Net 2017
I tried to uninstall VS.Net 2017 and reinstall it, but it did not work.

@iberodev
Copy link

I am having the same issue. I suspect it's something to do with being behind a proxy.
My Dockerfile is:

FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.sln ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "salesorder.qry.webapiapp.dll"]

and I am getting an error on the step that publishes with dotnet:

$ docker build -t salesorder.qry.webapiapp .
Sending build context to Docker daemon  126.1MB
Step 1/10 : FROM microsoft/aspnetcore-build:2.0 AS build-env
 ---> 07590dec9c1e
Step 2/10 : WORKDIR /app
 ---> Using cache
 ---> 26007abaa8b5
Step 3/10 : COPY *.sln ./
 ---> Using cache
 ---> 69dc09df88f0
Step 4/10 : RUN dotnet restore
 ---> Using cache
 ---> 7c10e448f636
Step 5/10 : COPY . ./
 ---> Using cache
 ---> c588d98eb49b
Step 6/10 : RUN dotnet publish -c Release -o out
 ---> Running in 9492a4f61e38
Microsoft (R) Build Engine version 15.7.177.53362 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for /app/SalesOrder.Cmd.Application.Model.Events/SalesOrder.Cmd.Application.Model.Events.csproj...
  Restoring packages for /app/SalesOrder.Cmd.Application.Model/SalesOrder.Cmd.Application.Model.csproj...
/usr/share/dotnet/sdk/2.1.200/NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/app/SalesOrder.Qry.sln]
/usr/share/dotnet/sdk/2.1.200/NuGet.targets(114,5): error :   An error occurred while sending the request. [/app/SalesOrder.Qry.sln]
/usr/share/dotnet/sdk/2.1.200/NuGet.targets(114,5): error :   SSL connect error [/app/SalesOrder.Qry.sln]
The command '/bin/sh -c dotnet publish -c Release -o out' returned a non-zero code: 1

However if I run the very same instruction directly I don't get that error:

$ dotnet publish -c Release -o out
Microsoft (R) Build Engine version 15.6.84.34536 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 43,43 ms for C:\src\SalesOrder.QueryService\SalesOrder.Cmd.Application.Model\SalesOrder.Cmd.Application.Model.csproj.
  Restore completed in 43,43 ms for C:\src\SalesOrder.QueryService\SalesOrder.Cmd.Application.Model.Events\SalesOrder.Cmd.Application.Model.Events.csproj.
  Restore completed in 4,67 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.Infra.InMemoryRepository\SalesOrder.Qry.Infra.InMemoryRepository.csproj.
  Restore completed in 46,18 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.Application.UnitTests\SalesOrder.Qry.Application.UnitTests.csproj.
  Restore completed in 51,08 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApi.UnitTests\SalesOrder.Qry.WebApi.UnitTests.csproj.
  Restore completed in 32,46 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApiApp\SalesOrder.Qry.WebApiApp.csproj.
  Restore completed in 12,53 ms for C:\src\SalesOrder.QueryService\ToolBelt.Hateoas\ToolBelt.Hateoas.csproj.
  Restore completed in 13,54 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApi\SalesOrder.Qry.WebApi.csproj.
  Restore completed in 2,16 ms for C:\src\SalesOrder.QueryService\ToolBelt.Mapping.Contracts\ToolBelt.Mapping.Contracts.csproj.
  Restore completed in 1,97 ms for C:\src\SalesOrder.QueryService\ToolBelt.Tests.Extensions\ToolBelt.Tests.Extensions.csproj.
  Restore completed in 55,52 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApiApp\SalesOrder.Qry.WebApiApp.csproj.
  Restore completed in 64,69 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.Application.UnitTests\SalesOrder.Qry.Application.UnitTests.csproj.
  Restore completed in 2,36 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.Domain.EventContracts\SalesOrder.Qry.Domain.EventContracts.csproj.
  Restore completed in 2,87 ms for C:\src\SalesOrder.QueryService\SalesOrder.Qry.Application\SalesOrder.Qry.Application.csproj.
  SalesOrder.Cmd.Application.Model -> C:\src\SalesOrder.QueryService\SalesOrder.Cmd.Application.Model\bin\Release\netstandard2.0\SalesOrder.Cmd.Application.Model.dll
  ToolBelt.Tests.Extensions -> C:\src\SalesOrder.QueryService\ToolBelt.Tests.Extensions\bin\Release\netstandard2.0\ToolBelt.Tests.Extensions.dll
  ToolBelt.Mapping.Contracts -> C:\src\SalesOrder.QueryService\ToolBelt.Mapping.Contracts\bin\Release\netstandard2.0\ToolBelt.Mapping.Contracts.dll
  ToolBelt.Tests.Extensions -> C:\src\SalesOrder.QueryService\ToolBelt.Tests.Extensions\out\
  ToolBelt.Mapping.Contracts -> C:\src\SalesOrder.QueryService\ToolBelt.Mapping.Contracts\out\
  SalesOrder.Cmd.Application.Model -> C:\src\SalesOrder.QueryService\SalesOrder.Cmd.Application.Model\out\
  ToolBelt.Hateoas -> C:\src\SalesOrder.QueryService\ToolBelt.Hateoas\bin\Release\netstandard2.0\ToolBelt.Hateoas.dll
  SalesOrder.Cmd.Application.Model.Events -> C:\src\SalesOrder.QueryService\SalesOrder.Cmd.Application.Model.Events\bin\Release\netstandard2.0\SalesOrder.Cmd.Application.Model.Events.dll
  SalesOrder.Cmd.Application.Model.Events -> C:\src\SalesOrder.QueryService\SalesOrder.Cmd.Application.Model.Events\out\
  ToolBelt.Hateoas -> C:\src\SalesOrder.QueryService\ToolBelt.Hateoas\out\
  SalesOrder.Qry.Application -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Application\bin\Release\netstandard2.0\SalesOrder.Qry.Application.dll
  SalesOrder.Qry.Domain.EventContracts -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Domain.EventContracts\bin\Release\netcoreapp2.0\SalesOrder.Qry.Domain.EventContracts.dll
  SalesOrder.Qry.Domain.EventContracts -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Domain.EventContracts\out\
  SalesOrder.Qry.Infra.InMemoryRepository -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Infra.InMemoryRepository\bin\Release\netcoreapp2.0\SalesOrder.Qry.Infra.InMemoryRepository.dll
  SalesOrder.Qry.WebApi -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApi\bin\Release\netstandard2.0\SalesOrder.Qry.WebApi.dll
  SalesOrder.Qry.Application -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Application\out\
  SalesOrder.Qry.Application.UnitTests -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Application.UnitTests\bin\Release\netcoreapp2.0\SalesOrder.Qry.Application.UnitTests.dll
  SalesOrder.Qry.Application.UnitTests -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Application.UnitTests\out\
  SalesOrder.Qry.Infra.InMemoryRepository -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.Infra.InMemoryRepository\out\
  SalesOrder.Qry.WebApi -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApi\out\
  SalesOrder.Qry.WebApiApp -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApiApp\bin\Release\netcoreapp2.0\SalesOrder.Qry.WebApiApp.dll
  SalesOrder.Qry.WebApiApp -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApiApp\out\
  SalesOrder.Qry.WebApi.UnitTests -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApi.UnitTests\bin\Release\netcoreapp2.0\SalesOrder.Qry.WebApi.UnitTests.dll
  SalesOrder.Qry.WebApi.UnitTests -> C:\src\SalesOrder.QueryService\SalesOrder.Qry.WebApi.UnitTests\out\

How's that possible?

I've tried to add the following proxy settings in NuGet.Config
C:\Users\iberodev\AppData\Roaming\NuGet\NuGet.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!-- other things here -->
  <config>
        <add key="https_proxy" value="https://username@mypass@sampleproxy.com:8080" />
  </config>
</configuration>

No luck. Same result. I'm really stuck with this and I cannot find good answers anywhere. Any advice would be much appreciated

@nkolev92 nkolev92 added the Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. label Apr 9, 2020
@Type1JGB
Copy link

I really would like this fixed. Just to help anybody else that came across this issue, here's what I did:

There's a file at the path C:\ProgramData\Docker\config\daemon.json. Add the line: "dns": ["8.8.8.8"] in the JSON object.

Ideally, replace it with your actual DNS server. 8.8.8.8 is just a well known DNS server, so it should work.

After adding that line, restart the Docker daemon. You can use the context menu from the system tray for that.

I hope this helps somebody.

@rererecursive
Copy link

rererecursive commented Jul 16, 2020

I had the same problem (Docker on Linux) and fixed it by enabling host networking, i.e.
docker run --network host mcr.microsoft.com/dotnet/core/sdk:2.1

Docker image:
docker inspect --format='{{.Id}}' mcr.microsoft.com/dotnet/core/sdk:2.1 => sha256:156e5cc5d7a3aaf4166d17f1e0b3a3c262a22caf8efac9b855ba1782ef98071c

The container would actually work on my local Linux machine, but on Jenkins (also Linux) it would fail. Very strange.

@nkolev92 nkolev92 added Category:Customer Sprint Type:Bug Priority:2 Issues for the current backlog. Area:HttpCommunication and removed Pipeline:Icebox Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. labels Nov 7, 2020
@AraHaan
Copy link

AraHaan commented Jan 12, 2021

Mine is
C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\5.0.100\NuGet.targets(131,5): error : Unable to load the service index for source https://dotnet.myget.org/F/roslyn/api/v3/index.json. [D:\a\Sdk\Sdk\build_all_packages.sln] C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\5.0.100\NuGet.targets(131,5): error : Response status code does not indicate success: 404 (Feed does not exist.). [D:\a\Sdk\Sdk\build_all_packages.sln]

from inside of Github Actions.

@zivkan
Copy link
Member

zivkan commented Jan 12, 2021

@AraHaan the "dotnet" account at myget (dotnet.myget.org) has been deleted. I suggest using versions of packages available on nuget.org.

@AraHaan
Copy link

AraHaan commented Jan 13, 2021

@zivkan I see, however I usually use the prerelease packages to .NET core assemblies in order to be able to pull in the latest and greatest fixes to them (like for example System.Text.Json from .NET 5 / 6) and using it on netcoreapp3.1.

I do this to then be able to ease up porting to .NET 5 / 6 easier once all of the dependencies get greenlit on the support of .NET 5 / 6.

@ajtruckle
Copy link

ajtruckle commented Feb 1, 2021

I also get the error for https://dotnet.myget.org/F/roslyn/api/v3/index.json

/usr/local/share/dotnet/sdk/5.0.102/NuGet.targets(131,5): error : Unable to load the service index for source https://dotnet.myget.org/F/roslyn/api/v3/index.json. [/Users/xxx/Documents/GitHub/AvalonStudio/AvalonStudio/AvalonStudio/AvalonStudio.csproj]
/usr/local/share/dotnet/sdk/5.0.102/NuGet.targets(131,5): error :   Response status code does not indicate success: 404 (Feed does not exist.). [/Users/xxx/Documents/GitHub/AvalonStudio/AvalonStudio/AvalonStudio/AvalonStudio.csproj]

@AraHaan
Copy link

AraHaan commented Feb 1, 2021

@ajtruckle I later found out that the roslyn feeds on myget was deleted for the feeds in their azure.

For those I would check by adding the feeds on the dotnet/runtime repository to yours one at a time until your build passes again to figure out which ones to obtain from and replace those with.

@ajtruckle
Copy link

It is all to complicated I am afraid for me. These systems should just download and install. I mean, why is AvalonStudio exe download only for OS X? So I can’t even do it that way. And the framework pauses at 34% in GitHub Desktop. Too much hassle. I think I will persevere with XCode and Xamarin forms.

@zivkan
Copy link
Member

zivkan commented Feb 2, 2021

The feeds on dotnet.myget.org were never official packages, they were used for "daily" CI builds, which certain enthusiasts liked to use, but were in no way ever needed for any official product. If the goal is to keep development simple, I would not recommend using non-standard sources, or pre-release packages. If you got dotnet.myget.org from a solution template or sample, rather than configuring it yourself (or someone in your team), you could ask the template/sample author for an update that doesn't try to use source URLs that no longer exist. NuGet and Visual Studio never configured dotnet.myget.org.

The other comments about AvalonStudio or GitHub Desktop doesn't appear to be related to NuGet in any way (or is missing a lot of context), so I'm not sure how we're supposed to act on the comments.

@ajtruckle
Copy link

@zivkan All I did was download AvalonStudio from GitHub.
Then use dotnet restore. This failed with the above messages. I have no team. Just download and build.

@ddbtrmatic
Copy link

ddbtrmatic commented Nov 22, 2022

Things I've tried without any luck, based on the solutions provided in this issue.

Environment:
Windows 10
Visual Studio 2022
Docker Desktop 4.14.1
Using linux containers

Create new project WebApplication1 from asp core 6 template with docker support
cd WebApplication1/WebApplication1
docker build -f Dockerfile ..

Results:

------
 > [build 4/7] RUN dotnet restore "WebApplication1/WebApplication1.csproj":
#12 1.374   Determining projects to restore...
#12 8.163 /src/WebApplication1/WebApplication1.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#12 8.235   Failed to restore /src/WebApplication1/WebApplication1.csproj (in 6.57 sec).

Attempted work arounds:

  • Set docker dns to ["1.1.1.1", "8.8.8.8"]
  • docker system prune --volumes
  • --disable-parallel
  • export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
  • --network=host

@AraHaan
Copy link

AraHaan commented Nov 22, 2022

check if the nuget.org source is enabled, sometimes things might randomly disable it in the background.
(or try flushing dns, that sometimes works for me too).

@nurulvll
Copy link

[api.nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
The remote name could not be resolved: 'api.nuget.org'
Unable to load the service index for source https://api.nuget.org/v3/index.json.

i have this problem i can not solve it .

@nurulvll
Copy link

githubimg

@AraHaan
Copy link

AraHaan commented Dec 20, 2022

They are running maintenance on it perhaps.

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

No branches or pull requests