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

Update NuGet Client SDK packages to use net8.0 #6086

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

zivkan
Copy link
Member

@zivkan zivkan commented Oct 8, 2024

Bug

Fixes: NuGet/Home#13842

Description

Update NuGet Client SDK packages to use net8.0 instead of net5.0. As per the linked issue, by the time the dev branch version of NuGet goes GA, .NET 6 will have already been out of support for months (and .NET 7 is already out of support). Therefore .NET 8 will be the lowest version of the .NETCoreApp runtime that is still in support.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests existing tests are appropriate
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. no functional changes. Specific TFMs not mentioned on Client SDK docs page

@zivkan zivkan marked this pull request as ready for review October 8, 2024 02:39
@zivkan zivkan requested a review from a team as a code owner October 8, 2024 02:39
@@ -15,7 +15,7 @@
<NETCoreTargetFramework Condition="'$(DotNetBuildSourceOnly)' == 'true'">net9.0</NETCoreTargetFramework>
<NETCoreLegacyTargetFramework>netcoreapp3.1</NETCoreLegacyTargetFramework>
<NETCoreLegacyTargetFramework Condition="'$(DotNetBuildSourceOnly)' == 'true'">net9.0</NETCoreLegacyTargetFramework>
<NETCoreLegacyTargetFrameworkForSigning>netcoreapp5.0</NETCoreLegacyTargetFrameworkForSigning>
<NETCoreLegacyTargetFrameworkForSigning>net8.0</NETCoreLegacyTargetFrameworkForSigning>

<!-- Target frameworks for class libraries-->
<TargetFrameworksLibrary>$(NetStandardVersion)</TargetFrameworksLibrary>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're at it, what do we think about dropping netstandard2.0 from packages that target net8.0?

There is no supported version of .NET (Framework or CoreApp) that will have netstandard2.0 as the closest TFM.

However, it would mean that tizen and uap projects would lose support, and potentially some of the old xamarin TFMs as well.

While I don't imagine anyone will be trying to run restore on those runtimes, I wouldn't be surprised if someone's using NuGet.Protocol and NuGet.Packaging to provide some kind of plugin model for their app, rather than developing their own protocol.

I think we should keep netstandard2.0, but I'm open to other opinions and thought that this is a good time to consider it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to do that, however, we probably need to do NuGet/Home#13079 first.

NS2.0 ilmerge works, but net5.0 was a lot harder.

I did some work on that, but had an issue with keeping the NuGet.Build.Tasks.Pack.resources assemblies.
@jeffkl was doing some related work too, so maybe he's attempt is better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show statistics per target framework is a popular ask in nuget.org. Here is a view of the package downloads for NuGet.Packaging over the past 6 weeks. I agree that this view does not provide details on which target framework a download was requested for; instead, it offers a bird's-eye view of downloads for each package version over the 6-week period. We may need to add some functionality on the client side so that nuget.org can display stats per target framework for each version.

In the linked issue description, you have mentioned the following. Hence, I think we should remove support for netstandard2.0 in the near future after addressing NuGet/Home#13079 as Nikolche suggested.

NuGet does not support signed packages with the netstandard2.0 binaries, so any apps targeting net5.0, net6.0, or net7.0 and referencing one of the above packages will get the netstandard2.0 binaries from the package, and lose support for signed packages.

Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Can you please follow https://github.com/NuGet/NuGet.Client/blob/dev/docs/updating-target-frameworks.md, so we can see the delta of all framework changes?

@zivkan
Copy link
Member Author

zivkan commented Oct 8, 2024

dotnet msbuild .\build\build.proj -t:GetAllTargetFrameworks -v:m -restore:false -tl:false
  NuGet.CommandLine.FuncTest.csproj = net472
  NuGet.MSSigning.Extensions.FuncTest.csproj = net472
  NuGet.CommandLine.Test.csproj = net472
  NuGet.Indexing.Test.csproj = net472
  NuGet.MSSigning.Extensions.Test.csproj = net472
  NuGet.PackageManagement.UI.Test.csproj = net472
  NuGet.PackageManagement.VisualStudio.Test.csproj = net472
  NuGet.SolutionRestoreManager.Test.csproj = net472
  NuGet.Tools.Test.csproj = net472
  NuGet.VisualStudio.Common.Test.csproj = net472
  NuGet.VisualStudio.Implementation.Test.csproj = net472
  NuGet.VisualStudio.Internal.Contracts.Test.csproj = net472
  NuGet.VisualStudio.Test.csproj = net472
  NuGetConsole.Host.PowerShell.Test.csproj = net472
  Dotnet.Integration.Test.csproj = net8.0
  Msbuild.Integration.Test.csproj = net472
  NuGet.Commands.FuncTest.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Packaging.FuncTest.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Protocol.FuncTest.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Signing.CrossFramework.Test.csproj = net472;net8.0
  NuGet.XPlat.FuncTest.csproj = net8.0
  Microsoft.Build.NuGetSdkResolver.Test.csproj = net472;net8.0
  NuGet.Build.Tasks.Console.Test.csproj = net472;net8.0
  NuGet.Build.Tasks.Pack.Test.csproj = net472;net8.0
  NuGet.Build.Tasks.Test.csproj = net472;net8.0
  NuGet.CommandLine.Xplat.Tests.csproj = net8.0
  NuGet.Commands.Test.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Common.Test.csproj = net472;net8.0
  NuGet.Configuration.Test.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Credentials.Test.csproj = net472;net8.0
  NuGet.DependencyResolver.Core.Tests.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Frameworks.Test.csproj = net472;net8.0
  NuGet.LibraryModel.Tests.csproj = net472;net8.0
  NuGet.PackageManagement.Test.csproj = net472;net8.0
  NuGet.Packaging.Test.csproj = net472;net8.0;netcoreapp3.1
  NuGet.ProjectModel.Test.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Protocol.Tests.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Resolver.Test.csproj = net472;net8.0;netcoreapp3.1
  NuGet.Shared.Tests.csproj = net472;net8.0
  NuGet.Versioning.Test.csproj = net472;net8.0
  API.Test.csproj = net472
  GenerateLicenseList.csproj = net5.0
  GenerateTestPackages.csproj = net472
  SampleCommandLineExtensions.csproj = net472
  TestableCredentialProvider.csproj = net472
  TestablePlugin.csproj = net472;net8.0;netcoreapp3.1
  TestableVSCredentialProvider.csproj =
  Test.Utility.csproj = net472;net8.0;netcoreapp3.1
  NuGet.CommandLine.csproj = net472
  NuGet.Console.csproj = net472
  NuGet.Indexing.csproj = net472
  NuGet.MSSigning.Extensions.csproj = net472
  NuGet.PackageManagement.PowerShellCmdlets.csproj = net472
  NuGet.PackageManagement.UI.csproj = net472
  NuGet.PackageManagement.VisualStudio.csproj = net472
  NuGet.SolutionRestoreManager.csproj = net472
  NuGet.Tools.csproj = net472
  NuGet.VisualStudio.Client.csproj = net472
  NuGet.VisualStudio.Common.csproj = net472
  NuGet.VisualStudio.Contracts.csproj = netstandard2.0
  NuGet.VisualStudio.Implementation.csproj = net472
  NuGet.VisualStudio.Internal.Contracts.csproj = net472
  NuGet.VisualStudio.Interop.csproj = net472
  NuGet.VisualStudio.OnlineEnvironment.Client.csproj = net472
  NuGet.VisualStudio.csproj = net472
  Microsoft.Build.NuGetSdkResolver.csproj = net472;net8.0
  NuGet.Build.Tasks.Console.csproj = net472;net8.0
  NuGet.Build.Tasks.Pack.csproj = net472;netstandard2.0
  NuGet.Build.Tasks.csproj = net472;net8.0
  NuGet.CommandLine.XPlat.csproj = net8.0
-  NuGet.Commands.csproj = net472;netstandard2.0;netcoreapp5.0
+  NuGet.Commands.csproj = net472;netstandard2.0;net8.0
  NuGet.Common.csproj = net472;netstandard2.0
  NuGet.Configuration.csproj = net472;netstandard2.0
-  NuGet.Credentials.csproj = net472;netstandard2.0;netcoreapp5.0
-  NuGet.DependencyResolver.Core.csproj = net472;netstandard2.0;netcoreapp5.0
+  NuGet.Credentials.csproj = net472;netstandard2.0;net8.0
+  NuGet.DependencyResolver.Core.csproj = net472;netstandard2.0;net8.0
  NuGet.Frameworks.csproj = net472;netstandard2.0
  NuGet.LibraryModel.csproj = net472;netstandard2.0
  NuGet.Localization.csproj = netstandard2.0
  NuGet.PackageManagement.csproj = net472;netstandard2.0
-  NuGet.Packaging.csproj = net472;netstandard2.0;netcoreapp5.0
-  NuGet.ProjectModel.csproj = net472;netstandard2.0;netcoreapp5.0
-  NuGet.Protocol.csproj = net472;netstandard2.0;netcoreapp5.0
-  NuGet.Resolver.csproj = net472;netstandard2.0;netcoreapp5.0
+  NuGet.Packaging.csproj = net472;netstandard2.0;net8.0
+  NuGet.ProjectModel.csproj = net472;netstandard2.0;net8.0
+  NuGet.Protocol.csproj = net472;netstandard2.0;net8.0
+  NuGet.Resolver.csproj = net472;netstandard2.0;net8.0
  NuGet.Versioning.csproj = net472;netstandard2.0
  NuGet.Console.TestContract.csproj = net472
  NuGet.OptProf.csproj = net472
  NuGet.PackageManagement.UI.TestContract.csproj = net472
  NuGet.Tests.Apex.Daily.csproj = net472
  NuGet.Tests.Apex.csproj = net472
dotnet msbuild .\build\build.proj -t:GetAllTargetFrameworks -v:m -restore:false -tl:false -p:DotNetBuildSourceOnly="true"

(no diff)

  NuGet.CommandLine.FuncTest.csproj = net472
  NuGet.MSSigning.Extensions.FuncTest.csproj = net472
  NuGet.CommandLine.Test.csproj = net472
  NuGet.Indexing.Test.csproj = net472
  NuGet.MSSigning.Extensions.Test.csproj = net472
  NuGet.PackageManagement.UI.Test.csproj = net472
  NuGet.PackageManagement.VisualStudio.Test.csproj = net472
  NuGet.SolutionRestoreManager.Test.csproj = net472
  NuGet.Tools.Test.csproj = net472
  NuGet.VisualStudio.Common.Test.csproj = net472
  NuGet.VisualStudio.Implementation.Test.csproj = net472
  NuGet.VisualStudio.Internal.Contracts.Test.csproj = net472
  NuGet.VisualStudio.Test.csproj = net472
  NuGetConsole.Host.PowerShell.Test.csproj = net472
  Dotnet.Integration.Test.csproj = net9.0
  Msbuild.Integration.Test.csproj = net472
  NuGet.Commands.FuncTest.csproj = net9.0
  NuGet.Packaging.FuncTest.csproj = net9.0
  NuGet.Protocol.FuncTest.csproj = net9.0
  NuGet.Signing.CrossFramework.Test.csproj = net9.0
  NuGet.XPlat.FuncTest.csproj = net9.0
  Microsoft.Build.NuGetSdkResolver.Test.csproj = net9.0
  NuGet.Build.Tasks.Console.Test.csproj = net9.0
  NuGet.Build.Tasks.Pack.Test.csproj = net9.0
  NuGet.Build.Tasks.Test.csproj = net9.0
  NuGet.CommandLine.Xplat.Tests.csproj = net9.0
  NuGet.Commands.Test.csproj = net9.0
  NuGet.Common.Test.csproj = net9.0
  NuGet.Configuration.Test.csproj = net9.0
  NuGet.Credentials.Test.csproj = net9.0
  NuGet.DependencyResolver.Core.Tests.csproj = net9.0
  NuGet.Frameworks.Test.csproj = net9.0
  NuGet.LibraryModel.Tests.csproj = net9.0
  NuGet.PackageManagement.Test.csproj = net9.0
  NuGet.Packaging.Test.csproj = net9.0
  NuGet.ProjectModel.Test.csproj = net9.0
  NuGet.Protocol.Tests.csproj = net9.0
  NuGet.Resolver.Test.csproj = net9.0
  NuGet.Shared.Tests.csproj = net9.0
  NuGet.Versioning.Test.csproj = net9.0
  API.Test.csproj = net472
  GenerateLicenseList.csproj = net5.0
  GenerateTestPackages.csproj = net472
  SampleCommandLineExtensions.csproj = net472
  TestableCredentialProvider.csproj = net472
  TestablePlugin.csproj = net9.0
  TestableVSCredentialProvider.csproj =
  Test.Utility.csproj = net9.0
  NuGet.CommandLine.csproj = net472
  NuGet.Console.csproj = net472
  NuGet.Indexing.csproj = net472
  NuGet.MSSigning.Extensions.csproj = net472
  NuGet.PackageManagement.PowerShellCmdlets.csproj = net472
  NuGet.PackageManagement.UI.csproj = net472
  NuGet.PackageManagement.VisualStudio.csproj = net472
  NuGet.SolutionRestoreManager.csproj = net472
  NuGet.Tools.csproj = net472
  NuGet.VisualStudio.Client.csproj = net472
  NuGet.VisualStudio.Common.csproj = net472
  NuGet.VisualStudio.Contracts.csproj = netstandard2.0
  NuGet.VisualStudio.Implementation.csproj = net472
  NuGet.VisualStudio.Internal.Contracts.csproj = net472
  NuGet.VisualStudio.Interop.csproj = net472
  NuGet.VisualStudio.OnlineEnvironment.Client.csproj = net472
  NuGet.VisualStudio.csproj = net472
  Microsoft.Build.NuGetSdkResolver.csproj = net9.0
  NuGet.Build.Tasks.Console.csproj = net9.0
  NuGet.Build.Tasks.Pack.csproj = net9.0;netstandard2.0
  NuGet.Build.Tasks.csproj = net9.0
  NuGet.CommandLine.XPlat.csproj = net9.0
  NuGet.Commands.csproj = net9.0;netstandard2.0
  NuGet.Common.csproj = net9.0;netstandard2.0
  NuGet.Configuration.csproj = net9.0;netstandard2.0
  NuGet.Credentials.csproj = net9.0;netstandard2.0
  NuGet.DependencyResolver.Core.csproj = net9.0;netstandard2.0
  NuGet.Frameworks.csproj = net9.0;netstandard2.0
  NuGet.LibraryModel.csproj = net9.0;netstandard2.0
  NuGet.Localization.csproj = netstandard2.0
  NuGet.PackageManagement.csproj = net9.0;netstandard2.0
  NuGet.Packaging.csproj = net9.0;netstandard2.0
  NuGet.ProjectModel.csproj = net9.0;netstandard2.0
  NuGet.Protocol.csproj = net9.0;netstandard2.0
  NuGet.Resolver.csproj = net9.0;netstandard2.0
  NuGet.Versioning.csproj = net9.0;netstandard2.0
  NuGet.Console.TestContract.csproj = net472
  NuGet.OptProf.csproj = net472
  NuGet.PackageManagement.UI.TestContract.csproj = net472
  NuGet.Tests.Apex.Daily.csproj = net472
  NuGet.Tests.Apex.csproj = net472

@zivkan zivkan merged commit 69547e7 into dev Oct 9, 2024
28 checks passed
@zivkan zivkan deleted the dev-zivkan-client-sdk-tfms branch October 9, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NuGet Client SDK packages updating to net8.0
4 participants