fsprojects / FSharp.Data

F# Data: Library for Data Access
https://fsprojects.github.io/FSharp.Data
Other
806 stars 288 forks source link

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

Closed gustav21 closed 1 year ago

gustav21 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

See also: https://github.com/dotnet/sdk/issues/24747#issuecomment-1126298533