adrian-pavel / visual-nuget

Code for the Visual NuGet package manager extension for VS Code.
MIT License
30 stars 5 forks source link

Fix having multiple Elements with PackageReference #26

Closed LokiMidgard closed 3 months ago

LokiMidgard commented 1 year ago

When there are multiple ItemGroup Elements that have PackageReference, Now all PackageReferences are used.

In the following exalple only CSVParserGenerator and AutoInvoke.Generator would be displayed.

  <ItemGroup>
    <PackageReference Include="CSVParserGenerator" Version="1.6.0" />
    <PackageReference Include="AutoInvoke.Generator" Version="0.0.3" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
    <PackageReference Include="System.ServiceModel.Duplex" Version="4.10.*" />
    <PackageReference Include="System.ServiceModel.Http" Version="4.10.*" />
    <PackageReference Include="System.ServiceModel.NetTcp" Version="4.10.*" />
    <PackageReference Include="System.ServiceModel.Security" Version="4.10.*" />
    <PackageReference Include="System.ServiceModel.Federation" Version="4.10.*" />
    <PackageReference Include="Karambolo.Extensions.Logging.File" Version="3.4.0" />
    <PackageReference Include="Karambolo.Extensions.Logging.File.Json" Version="3.4.0" />
  </ItemGroup>

I at least hopa that this will fix it, I had problems to manual test it…

adrian-pavel commented 3 months ago

Hi, I know it's been a long time but only now I had some time to look at visual-nuget again. Thank you for your contribution. I created another PR with basically the same changes you proposed but in a slightly different format. https://github.com/adrian-pavel/visual-nuget/pull/34

Version 0.3.1 contains the fix.