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

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
主站蜘蛛池模板: 城固县| 崇义县| 通榆县| 抚宁县| 临江市| 翁牛特旗| 双峰县| 同心县| 西和县| 林周县| 个旧市| 苏尼特右旗| 永寿县| 中宁县| 定陶县| 宁武县| 沽源县| 英山县| 孝义市| 建宁县| 高州市| 扎赉特旗| 县级市| 沅江市| 辽中县| 二手房| 巍山| 威远县| 邵阳县| 平度市| 隆尧县| 万州区| 萨嘎县| 阿拉善左旗| 内乡县| 永宁县| 成武县| 汝城县| 南涧| 宝应县| 阿克陶县|