Skip to content

Build fails on .NET SDK 10.0.400: NuGet.Packaging 6.14.3 conflicts with the SDK's NuGet 7.x #638

Description

@ChrisonSimtian

Problem

global.json pins SDK 10.0.100 with rollForward: latestMinor, so CI now runs SDK 10.0.400. That SDK loads NuGet.Frameworks 7.9.0.0 into MSBuild. Directory.Packages.props:21 pins NuGet.Packaging 6.14.3, which loads NuGet.Frameworks 6.14.3 into the same process. Every ./build.sh run fails at Compile, so CI fails on main and on every PR.

Outcome

./build.sh Compile succeeds on SDK 10.0.400, and the required ubuntu-latest check passes again.

Acceptance criteria

  • NuGet.Packaging is bumped to a 7.x version matching the NuGet version shipped by the supported SDK range.
  • ./build.sh Compile and ./build.sh Test pass locally on SDK 10.0.400.
  • ubuntu-latest is green on main.

Notes

Nothing in the repository changed. The last green run used SDK 10.0.302. The first failing run used 10.0.400.

Error: InvalidProjectFileException: The expression "[MSBuild]::GetTargetFrameworkIdentifier(net10.0)" cannot be evaluated. Could not load file or assembly 'NuGet.Frameworks, Version=7.9.0.0'.

NuGet 7.0 only removed APIs that were already marked obsolete. This repo uses NuspecReader, PackageArchiveReader, PackageFolderReader, VersionRange, NuGetVersion and NuGetFramework. None of them are affected. Bumping to 7.9.0 was tested locally and compiles with 0 errors.

Open questions

  • NuGet 7.x dropped netstandard2.0 support. Fallout.Tooling (net10.0;netstandard2.0) and Fallout.Tooling.Generator (netstandard2.0) then restore .NET Framework assets instead, which produces 35 NU1701 warnings. Do those netstandard2.0 targets still need to exist?
  • Pinning 6.14.3 for only the netstandard2.0 target does not work while CentralPackageTransitivePinningEnabled is true (Directory.Packages.props:4).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtarget/vCurrentTargets the current version

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions