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

CLI does not use feeds named 'dotnet-core'. #8128

Closed
billwert opened this issue Apr 17, 2017 · 3 comments
Closed

CLI does not use feeds named 'dotnet-core'. #8128

billwert opened this issue Apr 17, 2017 · 3 comments

Comments

@billwert
Copy link
Member

See comment below. The repro is the same but now I understand better the cause.


This might be related to #8127, but looked sufficiently different I thought I'd open another issue. For example, mine does not fail in the initial restore.

Steps to reproduce

dotnet new console
add RuntimeFrameworkVersion to project:

<RuntimeFrameworkVersion>2.0.0-preview1-002011-00</RuntimeFrameworkVersion>

dotnet restore

Expected behavior

restore succeeds

Actual behavior

Restoring packages for C:\source\t\t.csproj...
C:\dotnets\2.0.0-preview1-005797\sdk\2.0.0-preview1-005797\NuGet.targets(97,5): error : Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0-preview1-002011-00)' for '.NETCoreApp,Version=v2.0'. [C:\source\t\t.csproj]
Generating MSBuild file C:\source\t\obj\t.csproj.nuget.g.props.
Generating MSBuild file C:\source\t\obj\t.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\source\t\obj\project.assets.json
Restore failed in 88.17 ms for C:\source\t\t.csproj.

Errors in C:\source\t\t.csproj
Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0-preview1-002011-00)' for '.NETCoreApp,Version=v2.0'.

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

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

Environment data

dotnet --info output:
.NET Command Line Tools (2.0.0-preview1-005797)

Product Information:
Version: 2.0.0-preview1-005797
Commit SHA-1 hash: 645bb43

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\dotnets\2.0.0-preview1-005797\sdk\2.0.0-preview1-005797\

Microsoft .NET Core Shared Framework Host

Version : 2.0.0-preview1-001978-00

Build : d197c00dc0f5ca41ac61b6321ebb37d39b63cf80

@techyian
Copy link

The latest version of Microsoft.NETCore.App on Myget as of now is 2.0.0-preview1-002013-00. Just tested with a new console app and it restores correctly. Could you try with that version in your .csproj?

@billwert
Copy link
Member Author

Thanks, @techyian. I tried that last night as well and it didn't work.

It appears that the CLI is ignoring feeds with the name dotnet-core. If I change the name in the local Nuget.config to dotnet-core2 it works properly.

C:\source\t>dotnet restore

  Restoring packages for C:\source\t\t.csproj...
  Installing Microsoft.NETCore.DotNetAppHost 2.0.0-preview1-002013-00.
  Installing Microsoft.Packaging.Tools 1.0.0-preview1-25214-01.
  Installing Microsoft.NETCore.DotNetHostResolver 2.0.0-preview1-002013-00.
  Installing NETStandard.Library 2.0.0-preview1-25214-01.
  Installing Microsoft.NETCore.DotNetHostPolicy 2.0.0-preview1-002013-00.
  Installing Microsoft.NETCore.Platforms 2.0.0-preview1-25214-03.
  Installing Microsoft.NETCore.App 2.0.0-preview1-002013-00.
  Generating MSBuild file C:\source\t\obj\t.csproj.nuget.g.props.
  Generating MSBuild file C:\source\t\obj\t.csproj.nuget.g.targets.
  Writing lock file to disk. Path: C:\source\t\obj\project.assets.json
  Restore completed in 4.84 sec for C:\source\t\t.csproj.

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

  Feeds used:
      https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
      c:\source
      https://api.nuget.org/v3/index.json
      https://www.myget.org/F/aspnetrelease/api/v3/index.json
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

  Installed:
      7 package(s) to C:\source\t\t.csproj

This seems to be the actual bug. I'll re-title this.

@billwert billwert changed the title Only able to resolve new console app with on-disk packages CLI does not use feeds named 'dotnet-core'. Apr 17, 2017
@livarcocc
Copy link
Contributor

This issue was moved to NuGet/Home#5044

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants