dotnet-outdated icon indicating copy to clipboard operation
dotnet-outdated copied to clipboard

SemVer 2.0.0 packages are not found

Open joelverhagen opened this issue 7 years ago • 3 comments

This is because the registration3 hive is being used, not registration3-gz-semver2.

For example, consider this project:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="NuGet.Frameworks" Version="4.6.2" />
    <DotNetCliToolReference Include="DotNetOutdated" Version="2.0.0" />
  </ItemGroup>
</Project>

There are newer stable versions of NuGet.Frameworks (4.7.0) but they do not appear.

Expected

 | Package          | Current | Wanted | Stable | Latest              |
 |--------------------------------------------------------------------|
 | NuGet.Frameworks | 4.6.2   | 4.6.2  | 4.6.2  | 4.7.0-preview1-4986 |
 | DotNetOutdated   | 2.0.0   | 2.0.0  | 2.0.0  | 2.0.0               |

Actual

 | Package          | Current | Wanted | Stable | Latest              |
 |--------------------------------------------------------------------|
 | NuGet.Frameworks | 4.6.2   | 4.6.2  | 4.7.0  | 4.8.0-preview1.5156 |
 | DotNetOutdated   | 2.0.0   | 2.0.0  | 2.0.0  | 2.0.0               |

The registration base URL should be looked up in the service index using @type value RegistrationsBaseUrl/3.6.0. API docs for service index: https://docs.microsoft.com/en-us/nuget/api/service-index

I wrote the docs so let me know if you have questions.

joelverhagen avatar May 17 '18 06:05 joelverhagen

Oh, and I ❤️ the project. Nice work.

I would recommend considering the NuGet.Protocol package for NuGet API interaction. This will give an object model as well as an abstraction of V2, V3, and file sources.

joelverhagen avatar May 17 '18 06:05 joelverhagen

I would recommend considering the NuGet.Protocol package for NuGet API interaction. This will give an object model as well as an abstraction of V2, V3, and file sources.

That's definitely a great idea, we really shouldn't be doing all of this protocol stuff ourselves!

flagbug avatar May 17 '18 08:05 flagbug

Hey @joelverhagen, I've just submitted at PR (#13) for this exact thing, would you be able to do a sanity check over my changes to see if I'm using the Nuget libraries correctly? Cheers!

flagbug avatar May 31 '18 18:05 flagbug