Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.47 KB

package_dependencies.md

File metadata and controls

37 lines (24 loc) · 1.47 KB
-api-id -api-type
P:Windows.ApplicationModel.Package.Dependencies
winrt property

Windows.ApplicationModel.Package.Dependencies

-description

Gets the packages on which the current package depends.

-property-value

The packages on which the current package depends.

-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.

-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;

-see-also

FindRelatedPackages,App package information sample