Package.Dependencies Property

Definition

Gets the packages on which the current package depends.

public:
 property IVectorView<Package ^> ^ Dependencies { IVectorView<Package ^> ^ get(); };
IVectorView<Package> Dependencies();
public IReadOnlyList<Package> Dependencies { get; }
var iVectorView = package.dependencies;
Public ReadOnly Property Dependencies As IReadOnlyList(Of Package)

Property Value

The packages on which the current package depends.

Examples

// Get the app package
Package currentPackage = Package.Current;

// Get a list of dependencies for the app package. This includes all resource packages, framework packages, and optional packages.
IReadOnlyList<Package> dependencies = currentPackage.Dependencies;

Remarks

Important

Although the Package class is supported in an unpackaged process (that is, a process belonging to an app that lacks package identity), the Package.Current property is supported only in a packaged process (that is, a process belonging to an app that has package identity). To access a package's dependencies from an unpackaged process, use GetPackageInfo. And for more info about packaging, see Package a desktop or UWP app in Visual Studio.

Applies to

See also