Skip to content

NuGet.CommandLine.XPlat should target net10.0#7039

Merged
zivkan merged 6 commits intodevfrom
dev-zivkan-build-with-net10
Jan 14, 2026
Merged

NuGet.CommandLine.XPlat should target net10.0#7039
zivkan merged 6 commits intodevfrom
dev-zivkan-build-with-net10

Conversation

@zivkan
Copy link
Copy Markdown
Member

@zivkan zivkan commented Jan 9, 2026

Bug

Fixes: infrastructure

Description

Working on NuGet.CommandLine.XPlat has been a bit painful the last few months, because all my test projects I create using dotnet new will target .NET 10, but when XPlat is targeting net9.0, then MSBuild locator will load the .NET 9 SDK, and then MSBuild's APIs to load project files fail because the .NET 9 SDK can't target net10.0.

So, this PR:

  • Changes the version of the .NET SDK we use to build NuGet
  • Change the LangVersion to C# 14, so we can use the latest net10.0 language features. I'm particularly looking forward to using the field keyword
  • Retarget XPlat, and a few test projects that use the same property, to net10.0
  • Fix some build errors that popped up. I'm not sure I've seen errors pop up when upgrading the LangVersion before, but I guess this is exactly why that setting exists.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests N/A
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. N/A

@zivkan zivkan requested a review from a team as a code owner January 9, 2026 21:43
@zivkan zivkan requested review from donnie-msft and jeffkl January 9, 2026 21:43
donnie-msft
donnie-msft previously approved these changes Jan 9, 2026
donnie-msft
donnie-msft previously approved these changes Jan 12, 2026
jeffkl
jeffkl previously approved these changes Jan 13, 2026
@zivkan zivkan merged commit 9984777 into dev Jan 14, 2026
17 of 18 checks passed
@zivkan zivkan deleted the dev-zivkan-build-with-net10 branch January 14, 2026 20:26
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.

4 participants