Skip to content

Detecting Windows App SDK version at runtime #2796

Answered by DrusTheAxe
FreddyDgh asked this question in Q&A
Discussion options

You must be logged in to vote

If I have a Windows App SDK 1.1 app, is there a reliable way to determine which version of the runtime is being used?

Yes. Do you want the version of the MSIX packages? Or the version of the WinAppSDK release (1.1.3, etc)?

For the former, walk the current process' package graph looking for the 1st match for the framework package's family name, then the package's version field has the answer.

For the latter do same, but then pull out the major version's bottom 3 digits for the patch level e.g. WinAppSDK release 1.1.3 has MSIX packages with version 1003.x.y.z. You already know the release's major.minor version you're built with (the '1.1' in '1.1.3') so the MSIX package version.major % 1000

Replies: 2 comments 20 replies

Comment options

You must be logged in to vote
2 replies
@FreddyDgh
Comment options

@FreddyDgh
Comment options

Comment options

You must be logged in to vote
18 replies
@DrusTheAxe
Comment options

@Balkoth
Comment options

@DrusTheAxe
Comment options

@FreddyDgh
Comment options

@fabianoriccardi
Comment options

Answer selected by FreddyDgh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants