How to build Ionic for Windows UAP?

430 Views Asked by At

When I run ,

ionic build windows

in command prompt, it says Windows Phone SDK 8.1 is not found. In case I'm trying to build for Windows UAP, do I still need SDK 8.1? I have Windows SDK 10.0 along with Visual Studio 2015 installed. I'm working on a Windows 64-bit platform.

Error: Windows Phone SDK 8.1 not found

1

There are 1 best solutions below

0
On BEST ANSWER

First and foremost thing after you create a new app, you would need to add a platform.

ionic platform add windows

And as for windows, I think it defaults to win 8.1/8. So, naturally it would search for windows 8.1 SDK. At this point you could tweak the config.xml file (present in the root of your app, not elsewhere) by adding these lines to it, as a child of the <widget/> tag.

<platform name="windows">
    <preference name="windows-target-version" value="10.0" />
</platform>

Then you should run

ionic build windows

for the changes to take effect. And then running

cordova requirements

would show you that all the requirements are met.

ionic build windows executes without error