官术网_书友最值得收藏!

Enabling UWP app development on Windows 10

To get started with UWP app development, you must first enable app development for your Windows 10 device. If you are familiar with app development on Windows 8.X, you will recall the need to possess a developer license that had to be periodically renewed with Microsoft. That is no longer the case for UWP apps—once you have enabled development support, you are good to go. Let's look at how to do that.

Getting ready

Have Windows 10 installed on your computer. VS Express for Windows 10 will install all the necessary tools for you by default, so if you are running a different version of VS2015, make sure you have opted to install the Universal Windows App Development Tools for your particular installation of VS2015. You can rerun the VS2015 installer, if needed, to install them.

The following screenshot shows the items that should be installed. Note that specific version numbers may change between the time of writing this and when you read it, but that is okay. You will want the latest of the following:

How to do it…

Now that we have successfully installed a version of VS2015 suitable for UWP development, we will enable Developer Mode on our computer running Windows 10. If you are using VS Express for Windows 10, you will be prompted to do this when you start Visual Studio. If running Community Edition or one of the premium editions, you will be prompted to do so when you begin a UWP project. The following screenshot provides an example of this prompt:

To enable Developer mode, you will actually need to make some changes in your system settings (formerly known as the Control Panel). You can get there by clicking the settings for developers link shown in the preceding screenshot, or look for Update & Security in your Windows 10 settings page, and then click on For developers. Once there, you will want to select Developer mode, as shown in the following screenshot:

For security purposes, Windows 10 will present a confirmation box when you make the selection, so confirm your intent and proceed.

How it works…

UWP app development simply requires the host device to be in Developer mode. This greatly simplifies a process that was needlessly convoluted when developing apps for Windows 8.X, whereby a specific Developer License had to be obtained and renewed. Now a single set-and-forget setting change can be made, and your system is ready for UWP app development. Besides your day-to-day development, this makes testing your app easier, as you can easily enable this setting on test machines (including tablets, virtual machines, and others) without having to get (and renew) developer licenses for those environments too.

There's more…

When you publish your UWP app to the Windows Store, a user can download and use it without any system modification. Distributing your UWP app outside of the Windows Store is possible via the method described in this recipe or via sideloading.

Tip

In some Windows upgrade scenarios, upgrading a developer machine from Windows 8.1 to Windows 10 can result in a situation where the now-unnecessary Windows Developer License remains. To ensure your Windows 10 development is hassle free, open a PowerShell command prompt with Administrator privileges, and run the following command:

unregister-windowsdeveloperlicense
主站蜘蛛池模板: 东兴市| 马公市| 新泰市| 永靖县| 灵璧县| 南投县| 乌兰察布市| 定陶县| 浏阳市| 莫力| 石景山区| 辰溪县| 家居| 综艺| 镇平县| 宜川县| 汤阴县| 蒲江县| 肥乡县| 高要市| 察雅县| 平南县| 廉江市| 兰考县| 格尔木市| 三河市| 油尖旺区| 盐城市| 南平市| 阳曲县| 无棣县| 渭源县| 湾仔区| 乌兰察布市| 宁波市| 苏州市| 三河市| 靖州| 罗定市| 罗山县| 通州市|