aboutcode-org / nuget-inspector

Inspect and resolve .NET and NuGet package dependencies like dotnet and nuget do. Fetch manifests data. Runs on Linux, Windows and macOS as a standalone application.
https://github.com/nexB/nuget-inspector
4 stars 4 forks source link

Deduplicate some dependency resolutions with dupes #42

Closed pombredanne closed 1 year ago

pombredanne commented 1 year ago

This .csproj:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <IsTestProject>true</IsTestProject>
        <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
        <Configurations>Debug;Release;Azure</Configurations>
        <RestoreNoCache>true</RestoreNoCache>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="AutoFixture" Version="4.17.0" />
        <PackageReference Include="FluentAssertions" Version="6.8.0" />
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
        <PackageReference Include="xunit" Version="2.4.2" />
        <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
            <PrivateAssets>all</PrivateAssets>
        </PackageReference>
        <PackageReference Include="coverlet.collector" Version="3.2.0">
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
            <PrivateAssets>all</PrivateAssets>
        </PackageReference>
    </ItemGroup>
</Project>

will yield multiple versions of Microsoft.NETCore.Targets: 1.0.1 and 1.1.0. We should get only one when comparing with dotnet restore.

pombredanne commented 1 year ago

Fixed in v0.9.12