XDocumentExtensions.

GetPackageReferences(XDocument) Method

Summary

Returns all <PackageReference> entries declared in the project, resolving PrivateAssets / IncludeAssets / ExcludeAssets attributes or child elements and any TargetFramework condition on the element or its parent ItemGroup.

Syntax

public static ICollection<ParsedPackageReference> GetPackageReferences(this XDocument document)

Parameters

Name Type Description
document XDocument the document

Return Value

Type Description
ICollection<ParsedPackageReference> the collection of parsed package references