简体   繁体   English

在不同版本的Windows上测试UWP应用?

[英]Testing UWP apps on different builds of Windows?

I built an app targeting Windows 10240 and above. 我构建了一个针对Windows 10240及更高版本的应用程序。 However, I mistakenly used the Windows.Services.Store namespace for IAP in an update. 但是,我在更新中错误地将Windows.Services.Store命名空间用于IAP。

This made it through review, and now I'm seeing crash reports from users on older builds of Windows 10. 这是经过审查后得出的,现在我可以看到旧版本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) (如果可能,不包括启动四个VM或构建测试PC)

The only way to test properly is to use VMs or actual machines; 进行正确测试的唯一方法是使用VM或实际计算机。 there's no way to have Windows "forget" that an API actually exists. Windows无法“忘记” API实际上已经存在。 (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). (Windows将根据您的MaxVersionTested属性来模拟较早版本的OS的行为 ,但不会阻止您的应用访问更新的API)。

The way you can conditionally call APIs is via the ApiInformation class - if it's there, use it, otherwise don't. 您可以有条件地调用API的方式是通过ApiInformation -如果存在,请使用它,否则请不要使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM