Search code examples
uwpwindows-store-apps

Testing UWP apps on different builds of Windows?


I built an app targeting Windows 10240 and above. However, I mistakenly used the Windows.Services.Store namespace for IAP in an update.

This made it through review, and now I'm seeing crash reports from users on older builds of Windows 10.

Is there a way I can test that my app runs successfully on these older builds?

(Excluding starting up four VMs, or building testing PCs if possible)


Solution

  • The only way to test properly is to use VMs or actual machines; there's no way to have Windows "forget" that an API actually exists. (Windows will emulate the behaviour of older OS releases depending on your MaxVersionTested attribute, but it won't stop your app from accessing the newer APIs).

    The way you can conditionally call APIs is via the ApiInformation class - if it's there, use it, otherwise don't.