Reputation: 9077
I can't figure out how to get a Win8.1 emulator running from Visual Studio 2015.
I am running Win10 Anniversary edition. I am also running Visual Studio Community 2015 with all service packs.
At the top of Visual Studio I see the following:
Yes, I see the [Download new emulators...] choice but it isn't very helpful because it takes you to web page with a vast array of options and they are not very descriptive. When you click that it takes you to: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
Does anyone know which option I should choose to get the Win 8.1 emulators?
I'm guessing it is this one, but it's an old version from the explanation (and it's 881MB download):
Also, here are the items that supposedly installs. I do not see an emulator mentioned at all...
Any Other Way
Is there any other way I can determine if my UWP will run properly on Win8.1?
Edit
There are numerous problems with deploying an Win 10? Win 8.1 app. Numerous. Is that why the troll down-voted this question without commenting? Very unhelpful, troll.
I had been writing my app in 2013 as (whatever Microsoft is calling that) UWA? That targets Win8.x exclusively. Then, I read the UWP documents and determined that I am supposed to write as a UWP (UNIVERSAL, Microsoft, I don't think you understand what that word means).
The Visual Studio 2013 Win8.x version doesn't like to build and run properly in Visual Studio 2015.
Like To Make Sure Win8.x Users Can Also Run My App
Yes, Microsoft, there are still people running Win8.x. I have also built the app in Visual Studio 2015 as a UWP but I want my app to run for Win8.x users also. You see, I'm actually attempting to make my app UNIVERSAL.
Visual Studio 2015 Building Win8.1 App
I took the advice of the person who answered this question and began building the Win8.1 version. I have Studio 2013 and 2015 available to me. I can build and run the win8.1 version on win10 so I was attempting to run it on a Win8.1 device -- anything! I attempted to do so and Visual Studio 2015 told me I needed to download an SDK. Okay, Visual Studio, I'll do that.
Then when the install completed and I rebooted, then I attempted to run it on an 8.1 emulator. No. In Microsoft's limited wisdom, they end up running it on a Win10 emulator.
Win 8.1 Emulator? Psych!
When I choose the following -- which clearly shows Win8.1 -- then it runs on a Win10 emulator.
Oh, okay, maybe I made the wrong choice...even though it said Win8.1. Let's choose a specific 8.1 phone emulator, shall we?
When you attempt to build in Visual Studio 2015 with that option then you get the following error:
Yes, that is correct, Microsoft. I do not have Win 8 x64 Professional. That is because you forced me to upgrade to Windows Anniversary Edition to do the Win10 development when I attempted to write this app as a UWP.
Support Two Different Versions of the App
Microsoft is so fragmented that nothing works. I will figure this out and create my workaround and that'll probably mean supporting two different versions of the app. That is fine. But, Microsoft, (and other nameless trolls (MSMVPs maybe?) don't go acting like there is an obvious answer to this question.
Good luck to all those who fall into this trap.
Edit 2 One more thing on something that was mentioned:
It makes sense, that new API is not compatible with older OS, it is done this way everywhere.
That does make sense. I'm also an Android developer and an iOS dev so I've used Android Studio and XCode to develop apps and target various hardware so I would like to comment on that. Actually, it's true. You can use old APIs that may no longer be supported or new APIs that weren't available on previous versions of Android, for example.
The Main Point
However, the point is that Android allows you to :
easily know when this situation occurs
easily test on various hardware emulators so you'll know
has way better, more thorough documentation.
Really, the same is true for XCode. It's obvious Microsoft jumped into this idea without knowing what their target even is. Rush to market.
Upvotes: 1
Views: 575
Reputation: 39072
You can't test UWP apps on Windows 8.1 simulator nor Windows Phone 8.1 emulator, because UWP apps are not backwards compatible with Windows 8.1.
UWP apps run on Windows 10 only, so you can only support devices that are upgraded to this version of the OS.
To target both Windows 10 and Windows 8.1, you will need to build a Windows 8.1 app rather than a UWP app. When your project is a Windows Phone 8.1 app, the Windows Phone 8.1 emulator will be available in the Debug menu.
The universal Windows API went through many changes over time before it arrived to this truly universal point.
There is a very helpful timeline, that helps to understand this:
As you can see, the convergence required a lot of under the hood changes to bring all the before separate operating systems into one unified Windows Core and unified programming model.
The changes between the Windows 8.1 Runtime API and UWP API are not huge, but the point is, that it needed to be a breaking change to transition to the final destination which is Windows 10.
Windows 10 is the last version of Windows. That means, that the apps you build today will definitely be universal and supported going forward. The new model allows not only targeting of multiple different device form factors (with the help of adaptive design), but also targeting a range of different versions of the OS.
Using the concept of version adaptive code, you can use simple if
statements to see if a particular feature or API is available before using it:
// Check for presence of type MediaPlayerElement.
if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Controls.MediaPlayerElement"))
{
mediaControl = new MediaPlayerUserControl();
}
else
{
mediaControl = new MediaElementUserControl();
}
The greatest advantage of this is that you can always target the newest API, but keep support for older versions in one single codebase, without any "hacking" required. You can fine-tune your code for specific release of the OS, for specific devices, for specific input, you name it.
I actually think the Windows 10 implementation of adaptive code is better than with Android now. It is all improved by the integration of Roslyn into Visual Studio, which allows custom analyzers such as PlatformSpecific.Analyzer which is able to let you know when you are using unsupported APIs and is even able to fix your code with the conditional adaptive code if
statements.
It has been a rocky road to get here, but from now on, it will all be that much better for us developers.
Upvotes: 7