Search code examples
c#visual-studiouwpwindows-10

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)


Solution

  • 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 -

    enter image description here

    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 -

    enter image description here

    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.