aws / aws-sdk-net

The official AWS SDK for .NET. For more information on the AWS SDK for .NET, see our web site:

Home Page:http://aws.amazon.com/sdkfornet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

nicholi opened this issue · comments

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

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