MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PackageVersion structure

Represents the package version info.

Syntax


var packageVersion = {
    build : /* Your value */,
    major : /* Your value */,
    minor : /* Your value */,
    revision : /* Your value */
}

Members

The PackageVersion structure has these fields.

FieldData typeDescription
Build | build

Number [JavaScript] | System.UInt16 [.NET] | uint16 [C++]

The build version number of the package.

Major | major

Number [JavaScript] | System.UInt16 [.NET] | uint16 [C++]

The major version number of the package.

Minor | minor

Number [JavaScript] | System.UInt16 [.NET] | uint16 [C++]

The minor version number of the package.

Revision | revision

Number [JavaScript] | System.UInt16 [.NET] | uint16 [C++]

The revision version number of the package.

 

Examples

Use the Package.Current | current property to get the package for the current app. Use the Package.Id | id property to get the package ID. This example gets package identity information by using members of the Package and PackageId classes.


var package = Windows.ApplicationModel.Package.current;
var packageId = package.id;
var version = packageId.version;

var output = [ "Name: \"" + packageId.name + "\"",
               "Version: " + version.major + "." + version.minor + "." 
                           + version.build + "." + version.revision,
               "Architecture: " + packageId.architecture,
               "ResourceId: \"" + packageId.resourceId + "\"",
               "Publisher: \"" + packageId.publisher + "\"",
               "PublisherId: \"" + packageId.publisherId + "\"",
               "FullName: \"" + packageId.fullName + "\"",
               "FamilyName: \"" + packageId.familyName + "\"",
               "IsFramework: " + package.isFramework ];


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel
Windows::ApplicationModel [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel
Windows::ApplicationModel [C++]

Metadata

Windows.winmd

Attributes

[Version(0x06020000)]

See also

PackageId.Version

 

 

Show:
© 2016 Microsoft