FSharp.Data
FSharp.Data copied to clipboard
FSharp.Data.Core.Tests.CSharp.csproj: [NU1504] Duplicate 'PackageReference' items found.
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? )
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>
See also: https://github.com/dotnet/sdk/issues/24747#issuecomment-1126298533