SemVer 2.0.0 packages are not found
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.
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.
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!
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!