-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
needs-triageHave yet to determine what bucket this goes in.Have yet to determine what bucket this goes in.
Description
I'm using Microsoft.Build on version 17.1.0 as a library inside a .NET 6 simple application. My main goal is to have the attributes of PackageReference (Include and Version) starting at ProjectRootElement.Open(path), but when I loop thou the ItemGroups, I'm not able to find any other attribute than Version:
project.ItemGroups
.SelectMany(rootElement => rootElement.Items)
.Where(itemElement => itemElement.ElementName == "PackageReference")
.ToList()
.ForEach(item =>
{
var metadata = item.Metadata.ToList();
metadata.ForEach(d =>
{
Console.WriteLine($"{d.Name}: {d.Value}");
});
});If these questions do not fit here, please bring me some direction.
Many thanks for considering my request.
Information about my runtime:
- .NET SDK: 6.0.201 (commit
ef40e6aa06); - OS Name: Mac OS X;
- OS Version: 12.2;
- OS Platform: Darwin;
- RID: osx.12-arm64.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-triageHave yet to determine what bucket this goes in.Have yet to determine what bucket this goes in.