aliasadidev / vscode-npm-gui

vscode nuget package manager gui https://marketplace.visualstudio.com/items?itemName=aliasadidev.nugetpackagemanagergui
MIT License
48 stars 16 forks source link

support multiple item groups #44

Open aliasadidev opened 2 years ago

eburnette commented 2 years ago

I ran into this one. I can't open my project because it has multiple item groups, some of which are conditional. The NuGet Package Manager GUI just spins and never finishes loading. I get an error about "More than one find."

jobou363 commented 1 year ago

I have also the same problem because in have 3 items groups. It seems I can't regroup and use one.

mikes-gh commented 1 year ago

This is unfortunate because this is the best tool out there. But I am multi targeting net6 net7 as I suspect a few others are making this extension non-functional. Mind you dependabot cant cope with this either (although it doesnt crash)

davidsr2r commented 5 months ago

Facing the same issue here, quite annoying!

enny1170 commented 4 months ago

Same problem here in a MAUI Project. I can't change to singe ItemGroup because the others has conditions needed. Pls find a way to support multiple item groups

Ghostbird commented 4 weeks ago

Yeah, I tried this extension, but it's completely useless because of this odd restriction. I did a brief scan of the code, and I think it's because the package reference elements are identified by index. That's a strange design choice that introduces all kinds of seemingly arbitrary restrictions. My first take on writing something like this, is that the package reference elements should be identified by their Include value.

For a quick estimate, I checked the repositories I currently have cloned on my machine, and out of 20 projects, only 2 had less than 2 ItemGroups. But those two were projects that only defined a few models and were referenced by other projects in the same solution. So for those repositories the extension still didn't work, as the referencing project file did have multiple ItemGroups.

Conclusion: Because of this arbitrary restriction, this extension cannot work in any of my normal use cases.

aliasadidev commented 4 weeks ago

I started it