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

FSharp.Data.Core.Tests.CSharp.csproj: [NU1504] Duplicate 'PackageReference' items found. #1463

Closed
gustav21 opened this issue Aug 24, 2022 · 2 comments · Fixed by #1467
Closed

Comments

@gustav21
Copy link

I have the following compilation error:

FSharp.Data.Core.Tests.CSharp.csproj: [NU1504] Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: Microsoft.NET.Test.Sdk 16.9.1, Microsoft.NET.Test.Sdk 17.3; NUnit3TestAdapter 3.17.0, NUnit3TestAdapter 4.2.1; NUnit 3.13.1, NUnit 3.13.1.

I can add NoWarn, but didn't anyone else have the same? Or did everyone added NoWarn, but don't commit? )

@vzarytovskii
Copy link
Collaborator

vzarytovskii commented Aug 29, 2022

NuGet turned on this warning by default some time ago. It is safe to ignore it in this case.
However, it seems paket is adding reference (via Paket targets file, which is included in tests csproj), and later on they're again added in csproj.

<ItemGroup>
	  <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
	  <PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
	  <PackageReference Include="NUnit" Version="3.13.1" />
</ItemGroup>

@CaptnCodr
Copy link
Member

See also: dotnet/sdk#24747 (comment)

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 a pull request may close this issue.

3 participants