Paket icon indicating copy to clipboard operation
Paket copied to clipboard

Could not detect any platforms warning

Open kerams opened this issue 1 year ago • 2 comments

Description

Some packages use nonstandard (?) monikers in nuspec. AWSSDK.Core includes <group targetFramework=".NETCoreApp8.0" />, while Paket supposedly expects net8.0.

Repro steps

  • Create a net8.0 project
  • paket add AWSSDK.Core 3.7.300.4

Expected behavior

Package added cleanly.

Actual behavior

Warning Could not detect any platforms from '.netcoreapp8.0' in 'C:\Users\goof\.nuget\packages\awssdk.core\3.7.300.4\awssdk.core.nuspec', please tell the package authors, and I assume Paket then doesn't use the net8.0 assembly from the package.

Known workarounds

None.

kerams avatar Dec 16 '23 11:12 kerams

https://learn.microsoft.com/en-us/nuget/reference/target-frameworks#supported-frameworks

yes it seems non standard.

Makes me wonder if we should have unit tests that scrape nuget.org (or basically, calls into the same code used there) to assert we match the same targets as shown on the page, nuget.org shows correct resolution.

smoothdeveloper avatar Dec 16 '23 13:12 smoothdeveloper

https://github.com/NuGet/NuGetGallery/blob/e56384290f44bd4cc163cc94eff17bd3e63ac3c2/src/NuGetGallery.Core/Frameworks/PackageFrameworkCompatibilityFactory.cs#L47

smoothdeveloper avatar Dec 16 '23 13:12 smoothdeveloper