PackageVersion

Namespace: XPlat.ApplicationModel

Represents the package version info

public struct PackageVersion

Supported platforms

Platform

Version

.NET Standard

2.0

Xamarin.Android

9.0

Xamarin.iOS

1.0

UWP

10.0.16299

Example

Use the Package.Current property to get the package for the current app. Use the Package.Id property to get the package ID, from which you can then get the version.

using XPlat.ApplicationModel;

Package package = Package.Current;
IPackageId packageId = package.Id;
PackageVersion version = packageId.Version;

Fields

Major

The major version number of the package.

public ushort Major;

Minor

The minor version number of the package.

public ushort Minor;

Build

The build version number of the package.

public ushort Build;

Revision

The revision version number of the package.

public ushort Revision;

References

PackageVersion - Microsoft Docs

Last updated