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

TargetFramework in AWSSDK.Core uses non-documented string for .net8 #3219

Open
nicholi opened this issue Mar 13, 2024 · 1 comment
Open

TargetFramework in AWSSDK.Core uses non-documented string for .net8 #3219

nicholi opened this issue Mar 13, 2024 · 1 comment
Labels
bug This issue is a bug. module/sdk-core p2 This is a standard priority issue queued

Comments

@nicholi
Copy link

nicholi commented Mar 13, 2024

Describe the bug

The nuspec generated for AWSSDK.Core is specifying the following for .NET8 targetFramework.

<group targetFramework=".NETCoreApp8.0" />

This usage causes a minor warning when using paket as dependency resolver for AWSSDK.Core.

Could not detect any platforms from '.netcoreapp8.0' in 'REDACTED_HOMEDIR\.nuget\packages\awssdk.core\3.7.302.16\awssdk.core.nuspec', please tell the package authors

However the correct string for .NET8 would just be net8.0, not .NETCoreApp8.0. I believe the intention was the last framework which would officially use NetCoreApp was 3.1. Since .NET5 the strings should be net5.0, net6.0, etc.
As documented: https://learn.microsoft.com/en-us/dotnet/standard/frameworks

Obviously an extremely minor warning, which seems to cause no actual problems at all in using the library in .net8 projects. There is apparently undocumented support for continued usage of .NETCoreApp#, but I can't find any reference for .NETCoreApp8.0 anywhere. I'm not sure what exactly is translating the nuspec's to output that when packaging, nothing obvious seems to be pointing to it. However there is quite a complex set of buildtools being used here, so I couldn't dig too deep myself.

Expected Behavior

Receiving no warning when installing nupkg with paket.

Current Behavior

Warning printed when installing AWSDK.Core package with paket.

Could not detect any platforms from '.netcoreapp8.0' in 'REDACTED_HOMEDIR\.nuget\packages\awssdk.core\3.7.302.16\awssdk.core.nuspec', please tell the package authors

Reproduction Steps

Just setting up a simple solution/project and installing AWSDK.Core with paket.

Simple enough command instructions to run on both Windows (powershell) and Linux (bash).

mkdir TestSln
cd TestSln

# empty sln and csproj
dotnet new sln
dotnet new classlib -n TestProject

dotnet new tool-manifest
dotnet tool install paket
dotnet paket init

# add AWSSDK.Core dependency
echo "nuget AWSSDK.Core" >> paket.dependencies
echo "AWSSDK.Core" >> TestProject/paket.dependencies

# now download/install dependencies
dotnet paket install

At which point you should receive the output with the warning about the unsupported TargetFramework.

Paket version 8.0.3+75b30cdcb8859e8d129f139444d9b9b600bfff07
Resolving dependency graph...
Could not detect any platforms from '.netcoreapp8.0' in 'REDACTED_HOMEDIR\.nuget\packages\awssdk.core\3.7.302.16\AWSSDK.Core.3.7.302.16.nupkg\AWSSDK.Core.nuspec', please tell the package authors
Updated packages:
  Group: Main
    - AWSSDK.Core: 3.7.302.16 (added)
    - Microsoft.Bcl.AsyncInterfaces: 8.0.0 (added)
    - System.Runtime.CompilerServices.Unsafe: 6.0.0 (added)
    - System.Threading.Tasks.Extensions: 4.5.4 (added)
Installing into projects:
Created dependency graph (4 packages in total)
Could not detect any platforms from '.netcoreapp8.0' in 'REDACTED_HOMEDIR\.nuget\packages\awssdk.core\3.7.302.16\awssdk.core.nuspec', please tell the package authors
Total time taken: 1 second

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.Core 3.7.302.16

Targeted .NET Platform

.NET 8

Operating System and version

Windows, Ubuntu

@nicholi nicholi added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 13, 2024
@ashishdhingra
Copy link
Contributor

Needs review with the team. The TFM for .NET 8.0 is net8.0.

@ashishdhingra ashishdhingra added needs-review p2 This is a standard priority issue queued and removed needs-triage This issue or PR still needs to be triaged. needs-review labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. module/sdk-core p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

2 participants