Skip to content

Latest commit

 

History

History
41 lines (23 loc) · 2.1 KB

packagedependency_create_1257606184.md

File metadata and controls

41 lines (23 loc) · 2.1 KB
-api-id -api-type
M:Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependency.Create(System.String,Windows.ApplicationModel.PackageVersion)
winrt method

Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependency.Create(System.String,Windows.ApplicationModel.PackageVersion)

-description

Creates an install-time reference for a framework package dependency for the current app, using the specified package family name and minimum version. When you use this method, the framework package dependency is accessible to the current user only. To create a framework package dependency that is accessible to all users, use the CreateForSystem method instead.

-parameters

-param packageFamilyName

The package family name of the framework package on which to take dependency.

-param minVersion

The minimum version of the framework package on which to take dependency.

-returns

The object that represents the package dependency, and provides members you can use to manage the lifetime of the dependency.

-remarks

In your app's installer or during the first run of your app, call this method to specify a set of criteria for a framework package you want to use in your app. This informs the OS that your app has a dependency upon a framework package that meets the specified criteria. If one or more framework packages are installed that meet the criteria, Windows will ensure that at least one of these framework packages will remain installed until the install-time reference is deleted.

For more information, see Use the dynamic dependency API to reference MSIX packages at run time.

-see-also

Use the dynamic dependency API to reference MSIX packages at run time

-examples