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

Failed to retrieve information from source, if source is empty and package was not found #5504

Closed
livarcocc opened this issue Jun 28, 2017 · 5 comments
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:Restore Product:dotnet.exe Resolution:ByDesign This issue appears to be ByDesign Resolution:Duplicate This issue appears to be a Duplicate of another issue
Milestone

Comments

@livarcocc
Copy link

From @daxian-dbw on June 28, 2017 5:49

Steps to reproduce

dotnet new console

Expected behavior

No error and successfully restored

Actual behavior

PS:52> dotnet new console
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on C:\Arena\Apps\dotnet2\bb\bb.csproj...
  Restoring packages for C:\Arena\Apps\dotnet2\bb\bb.csproj...
C:\Users\usr\AppData\Local\Microsoft\dotnet\sdk\2.0.0-preview3-006607\NuGet.targets(102,5): error : 
Failed to retrieve information about 'Microsoft.NETCore.App' from remote source 'C:\Users\usr\.dotnet\NuGetFallbackFolder'. [C:\Arena\Apps\dotnet2\bb\bb.csproj]


Restore failed.
Post action failed.
Description: Restore NuGet packages required by this project.
Manual instructions: Run 'dotnet restore'

PS:53> dotnet restore
  Restoring packages for C:\Arena\Apps\dotnet2\bb\bb.csproj...
C:\Users\usr\AppData\Local\Microsoft\dotnet\sdk\2.0.0-preview3-006607\NuGet.targets(102,5): error : 
Failed to retrieve information about 'Microsoft.NETCore.App' from remote source 'C:\Users\usr\.dotnet\NuGetFallbackFolder'. [C:\Arena\Apps\dotnet2\bb\bb.csproj]

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.0-preview3-006607)

Product Information:
 Version:            2.0.0-preview3-006607
 Commit SHA-1 hash:  81dd304f72

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Users\usr\AppData\Local\Microsoft\dotnet\sdk\2.0.0-preview3-006607\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview3-25426-01
  Build    : 122309e7e7fb9bb233fe4910f822c28ec73f0957

Copied from original issue: dotnet/cli#7013

@livarcocc
Copy link
Author

From @JonathanLoscalzo on June 28, 2017 12:47

this happens for all templates too :(

@livarcocc
Copy link
Author

From @JonathanLoscalzo on June 28, 2017 13:19

@daxian-dbw maybe this issue solve the problem?

Create a nuget.config local and add =>
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
it solve my problem... or help for others (like me)

@livarcocc
Copy link
Author

@JonathanLoscalzo, look under %appdata%/NuGet/NuGet.Config and remove any references to CLIFallbackFolder from it. This is an entry that we no longer need in preview3. If you do that, you will get the real error, which is that we can't find the M.NC.App package. The reason for that is that the runtime between the CLI and asp.net are out of sync and when that happens, you need the feed above.

Still, I am moving this issue to NuGet, I don't think NuGet should say that it failed to find the package on that feed if the folder is empty, it should just say that it failed to find the package.

@livarcocc livarcocc changed the title 'dotnet new console' fails with '2.0.0-preview3-006607' .NET Command Line Tools Failed to retrieve information from source, if source is empty and package was not found Jun 28, 2017
@nkolev92 nkolev92 added this to the Backlog milestone Nov 10, 2017
@nkolev92 nkolev92 added Product:dotnet.exe Functionality:Restore Area:ErrorHandling warnings and errors/log messages & related error codes. labels Nov 10, 2017
@nkolev92
Copy link
Member

nkolev92 commented Dec 7, 2021

Dupping this to #6373.

Failing when a source is unavailable is by design. https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#packagereference-and-sources

@nkolev92 nkolev92 closed this as completed Dec 7, 2021
@nkolev92 nkolev92 added Resolution:ByDesign This issue appears to be ByDesign Resolution:Duplicate This issue appears to be a Duplicate of another issue labels Dec 7, 2021
@jzabroski
Copy link

In case this is useful to anyone else... if you run dotnet tool install <packageid> --version <packageversion> --verbosity diag > temp.txt and search the temp.txt for "NuGet Config files used", you will find the following info:

                     Failed to restore D:\Users\John.Zabroski\AppData\Local\Temp\1\a9c19ab0-2f28-440b-962e-1cd32af6c609\restore.csproj (in 2.64 sec). (TaskId:38)
                      (TaskId:38)
                     NuGet Config files used: (TaskId:38)
                         D:\Users\John.Zabroski\AppData\Roaming\NuGet\NuGet.Config (TaskId:38)
                         C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config (TaskId:38)

In my case, for some reason, D:\Users\John.Zabroski\AppData\Roaming\NuGet\NuGet.Config , had an old URL for our internal package server. Pretty weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:Restore Product:dotnet.exe Resolution:ByDesign This issue appears to be ByDesign Resolution:Duplicate This issue appears to be a Duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants