-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Describe the bug
Recently NuGet added warnings for duplicate PackageReference/PackageDownload/PackageVersion items. Duplicate items could lead to an unpredictable behavior. You can learn about the motivation more in NuGet/Home#9864.
https://github.com/NuGet/Home/blob/dev/proposed/2022/duplicate-nuget-item-error-handling.md
NuGet added this in 6.0.400, so customers will start seeing this very soon.
To Reproduce
Originally filled in NuGet/Home#11720.
- Use latest SDK with NuGet version 6.3.0 or higher. Might not be 100% inserted today.
- Create a .NET Core Console App, netcoreapp3.1. project with PackageReference package installed.
- Run “dotnet restore” in Developer Command Prompt for VS 2022 Preview
- The warning “warning NU1505: Duplicate 'PackageDownload' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.” occurs as below screenshot.
This was was discovered by the NuGet test team, @v-luzh Can you please post the csproj in question?
Why is this important?
NuGet will raise a warning when it sees duplicate items, and warning as errors could cause failures for customers.
Exceptions (if any)
Further technical details
- Include the output of
dotnet --info - The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
Latest main version of NuGet tooling will have this.
julealgon, pea-sys and 0xfeeddeadbeefdominoFire and AraHaan
