Skip to content

dotnet pack fails with "Duplicate 'PackageDownload' items found" when using EnablePackageValidation with PackageValidationBaselineVersion #49631

Open
@ptupitsyn

Description

@ptupitsyn

Describe the bug

When I add both PackageValidationBaselineVersion and EnablePackageValidation to my project, dotnet pack fails:

/home/pavel/w/ignite-3/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj : error NU1505: Warning As Error: Duplicate 'PackageDownload' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageDownload' items are: Apache.Ignite [3.0.0], Apache.Ignite [3.0.0].

Restore failed with 1 error(s) in 0.2s

To Reproduce

git clone https://github.com/ptupitsyn/ignite-3.git -b nuget-validation-bug
cd ignite-3/modules/platforms/dotnet/Apache.Ignite
dotnet pack

PR with one-line change that breaks the pack in Apache Ignite: apache/ignite-3#6176

Further technical details

dotnet --info:

.NET SDK:
 Version:           8.0.411
 Commit:            f97ff31961
 Workload version:  8.0.400-manifests.ee7a832d
 MSBuild version:   17.11.31+933b72e36

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.411/

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.

Host:
  Version:      9.0.4
  Architecture: x64
  Commit:       f57e6dc747

.NET SDKs installed:
  6.0.428 [/usr/share/dotnet/sdk]
  7.0.410 [/usr/share/dotnet/sdk]
  8.0.411 [/usr/share/dotnet/sdk]
  9.0.203 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.36 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.17 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.36 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.17 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  /home/pavel/w/tests/delme123/ignite-3/modules/platforms/dotnet/global.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedRequest triage from a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions