XPlat Windows APIs
  • XPlat Windows APIs
  • Getting started
  • XPlat.ApplicationModel
    • IPackage
    • IPackage2
    • IPackage3
    • IPackageId
    • Package
    • PackageId
    • PackageVersion
  • XPlat.ApplicationModel.DataTransfer
    • Clipboard
    • DataPackage
    • DataPackageView
    • IDataPackage
    • IDataPackageView
  • XPlat.Core
    • AppPermissionInvalidException
    • CollectionExtensions
    • NSDateExtensions
    • NSObjectExtensions
    • PackageManifestHelper
    • RequestCodeHelper
    • TaskSchedulerAwaiter
    • TimeoutTask
  • XPlat.Device.Display
    • DisplayRequest
    • IDisplayRequest
  • XPlat.Device.Geolocation
    • BasicGeoposition
    • Geocoordinate
    • GeolocationAccessStatus
    • Geolocator
    • Geoposition
    • IGeocoordinate
    • IGeolocator
    • IGeopoint
    • IGeoposition
    • IStatusChangedEventArgs
    • PositionAccuracy
    • PositionChangedEventArgs
    • PositionStatus
    • PositionStatusExtensions
    • StatusChangedEventArgs
  • XPlat.Device.Launcher
    • ILauncher
    • Launcher
    • LaunchQuerySupportStatus
  • XPlat.Device.Power
    • BatteryStatus
    • BatteryStatusChangedEventArgs
    • BatteryStatusChangedEventHandler
    • IPowerManager
    • PowerManager
  • XPlat.Device.Profile
    • AnalyticsInfo
    • AnalyticsVersionInfo
    • IAnalyticsVersionInfo
  • XPlat.Foundation
    • CollectionChange
    • IMapChangedEventArgs
    • IObservableMap
    • IPropertySet
    • MapChangedEventHandler
    • ApplicationData
    • StringMapChangedEventArgs
    • TypedEventHandler
  • XPlat.Media.Capture
    • BitmapExtensions
    • CameraCaptureUI
    • CameraCaptureUIMode
    • CameraCaptureUIPhotoCaptureSettings
    • CameraCaptureUIVideoCaptureSettings
    • ICameraCaptureUI
    • StorageFileExtensions
  • XPlat.Services.Maps
    • IMapAddress
    • IMapLocation
    • IMapLocationFinderResult
    • MapAddress
    • MapLocation
    • MapLocationDesiredAccuracy
    • MapLocationFinder
    • MapLocationFinderResult
    • MapLocationFinderStatus
  • XPlat.Storage
    • ApplicationDataContainer
    • ApplicationDataContainerSettings
    • ApplicationDataCreateDisposition
    • ApplicationDataLocality
    • BasicProperties
    • CreationCollisionOption
    • FileAccessMode
    • FileAttributes
    • IApplicationData
    • IApplicationDataContainer
    • IBasicProperties
    • IImageProperties
    • ImageProperties
    • IMusicProperties
    • IStorageFile
    • IStorageFileExtras
    • IStorageFolder
    • IStorageFolder2
    • IStorageFolderExtras
    • IStorageFolderQueryOperations
    • IStorageItem
    • IStorageItem2
    • IStorageItemContentProperties
    • IStorageItemProperties
    • IVideoProperties
    • KnownFolders
    • MusicProperties
    • NameCollisionOption
    • PhotoOrientation
    • StorageFile
    • StorageFileExtensions
    • StorageFolder
    • StorageItemContentProperties
    • StorageItemContentPropertiesExtensions
    • StorageItemCreationException
    • StorageItemException
    • StorageItemNotFoundException
    • StorageItemTypes
    • VideoOrientation
    • VideoProperties
  • XPlat.Storage.Pickers
    • FileOpenPicker
    • IFileOpenPicker
  • XPlat.UI
    • DispatcherTimer
    • IDispatcherTimer
  • XPlat.UI.Core
    • CoreDispatcher
    • CoreDispatcherPriority
    • DispatchedHandler
    • ICoreDispatcher
Powered by GitBook
On this page
  • Supported platforms
  • Example
  • Fields
  • Major
  • Minor
  • Build
  • Revision
  • Related information
  • References
  1. XPlat.ApplicationModel

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;

Related information

References

PreviousPackageIdNextClipboard

Last updated 5 years ago

PackageVersion - Microsoft Docs