Description
When building an app with mismatched SDKs (tiapp and selected SDK are different) the emulator prompt will only show 8.1 emulators as the forked command will have
--wp-sdk 8.1
added to it. It appears that it is set on [this](
https://github.com/appcelerator/titanium_mobile_windows/blob/master/cli/commands/_build/config/wpSDK.js#L23) line where the defaultTarget is set to the 'selected' Windows SDK, which on my machine is set to 8.1, even with
windows.wpsdk.selectedVersion = "10.0"
in the ti config.
Steps to reproduce
Run appc ti sdk install -b 5_4_X -d
Set your SDK inside the tiapp to an SDK different to the above, such as 5.3.0.GA
Build using appc run -p windows -T wp-emulator
Actual result
Only 8.1 emulators are shown in the prompt
Expected result
All emulators should be shown in the prompt
Confirmed that this issue is fixed by TIMOB-23661.
Validated fix using the following environment: NPM Version: 2.15.9 Node Version: 4.6.0 Windows OS: 10 Pro, Version 1607 Build 14393.693 Appc CLI: 6.1.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20170123141052 Appcelerator Studio, build: 4.8.1.201612050850 I first reproduced the issue by setting the SDK version in tiapp.xml to 6.0.1.GA, and the SDK Select version on the command line to 5.5.1.GA. When building the app with the commands in the description, I found that the user had a choice of Windows 8.1 emulators only. I then only edited the SDK version in tiapp.xml to 6.1.0, and found that when building a new app, the user was presented with a choice among both Windows 10 and Windows 8.1 emulators.