简体   繁体   中英

How to test apps on older builds of Windows 10?

I have an app that targets Windows 10 build 10240, but my local machine has the latest update.

for phone I see there are various emulators in Visual Studio. Is there a way to test an app on older versions of Windows 10 desktop?

(I know one way is to actually find an older windows and run it on a virtual machine, but I want an easier way)

Thought I should write an answer just to make it clearer.

Currently, if your target version is 15063 and min version is 10240 , you do get some benefits like what's shown in the following picture -

在此处输入图像描述

Properties like FocusVisualMargin will be highlighted as

The property 'FocusVisualMargin' on type 'ListViewItem' is not available in the target platform minimum version (10.0.10240.0) supported by this project.

However, resources like ListViewItemForeground are also not available in 10240 but they are not highlighted. Same as in the following picture -

在此处输入图像描述

This SetImplicitShowAnimation API is also not available in 10240 but it's not highlighted.

This tells me Visual Studio doesn't not fully recognise everything in each version. This may change in the future, but for the time being, it's just a lot safer to either run it on a 10240 machine, or reduce the target version to 10240 , then run and test.

If you want to create Version Adaptive Code , see here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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