Before packaging your app

  1. Test your app. Before you package your app for store submission, make sure it works as expected on all device families that you plan to support. These device families may include desktop, mobile, Surface Hub, XBOX, IoT devices, or others.
  2. Optimize your app. You can useVisual Studio’s profiling and debugging tools to optimize the performance of your UWP app. For example, the Timeline tool for UI responsiveness, the memory Usage tool, the CPU Usage tool, and more. For more information about these tools, see Run diagnostic tools without debugging.
  3. Check .NET Native compatibility (for VB and C# apps). With the UWP, there is now a new native compiler that will improve the runtime performance of your app. With this change, it is highly recommended that you test your app in this compilation environment. By default, the Release build configuration enables the .NET native toolchain, so it is important to test your app with this Release configuration and check that your app behaves as expected. Some common debugging issues that can happen with .NET Native are explained in more detail here.

Configure an app package

The app manifest file (package.appxmanifest) has the properties and settings that are required to create your app package. For example, properties in the manifest file describe the image to use as the tile of your app and the orientations that your app supports when a user rotates the device.

Visual Studio has a manifest designer that makes it easy for you to update the manifest file without editing the raw XML of the file.

Visual Studio can associate your package with the Store. When you do this, some of the fields in the Packaging tab of the manifest designer are automatically updated.

Configure a package with the manifest designer

  1. In Solution Explorer, expand the project node of your UWP app.
  2. Double-click the Package.appxmanifest file. If the manifest file is already open in the XML code view, Visual Studio prompts you to close the file.

Now you can decide how to configure your app. Each tab contains information that you can configure about your app and links to more information if necessary.

Check that you have all the images that are required for a UWP app on the Visual Assets tab.

From the Packaging tab, you can enter publishing data. This is where you can choose which certificate to use to sign your app. All UWP apps must be signed with a certificate. In order to sideload an app package, you need to trust the package. The certificate must be installed on that device to trust the package. For more information about sideloading, see Enable your device for development.

  1. Save your file after you have made the necessary edits for your app.

Create an app package

To distribute an app through the Store you must create an appxupload package. You can do that by using the Create App Packages wizard. Follow these steps to create a package suitable for store submission with Microsoft Visual Studio 2015.

To create your app package

  1. In Solution Explorer, open the solution for your UWP app project.

Right-click the project and choose Store->Create App Packages. If this option is disabled or does not appear at all, check that the project is a UWP project.

The Create App Packages wizard appears.

Select Yes in the first dialog asking if you want to build packages to upload to the Windows Store, then click Next.

If you choose No here, Visual Studio will not generate the required .appxupload package you need for store submission. If you only want to sideload your app to run it on internal devices, then you can select this option. For more information about sideloading, see Enable your device for development.

  1. Sign in with your developer account to the Windows Dev Center. (If you don't have a developer account yet, the wizard will help you create one.)

Select the app name for your package, or reserve a new one if you have not already reserved one with the Windows Dev Center portal.

Make sure you select all three architecture configurations (x86, x64, and ARM) in the Select and Configure Packages dialog. That way your app can be deployed to the widest range of devices. In the Generate app bundle listbox, select Always. This makes the store submission process much simpler because you will only have one file to upload (.appxupload). The single bundle will contain all the necessary packages to deploy to devices with each processor architecture.

  1. It is a good idea to include full PDB symbol files for the best crash analytics experience from the Windows Dev Center. You can learn more about debugging with symbols by visiting Debugging with Symbols.
  2. Now you can configure the details to create your package. When you're ready to publish your app, you'll upload the packages from the output location.
  3. Click Create to generate your appxupload package.

Now you will see this dialog.

Validate your app before you submit it to the Store for certification on a local or remote machine. (You can only validate release builds for your app package and not debug builds.)

  1. To validate locally, leave the Local machine option selected and click Launch Windows App Certification Kit. For more information about testing your app with the Windows App Certification Kit, see Windows App Certification Kit.

    The Windows App Certification Kit performs tests and shows you the results. See Windows App Certification Kit tests.

    If you have a remote Windows 10 that you want to use for testing, you will need to install the Windows App Certification Kit manually on that device. The next section will walk you through these steps. After you've done that, then you can select Remote machine and click Launch Windows App Certification Kit to connect to the remote device and run the validation tests.

  2. After WACK has finished and your app has passed, you are ready to upload to the store. Make sure you upload the correct file. It can be found in the root folder of your solution \[AppName]\AppPackages and it will end with the .appxupload file extension. The name will be of the form [AppName]_[AppVersion]_x86_x64_arm_bundle.appxupload.

Validate your app package on a remote Windows 10 device

  1. Enable your Windows 10 device for development by following the Enable your device for development instructions. Important You cannot validate your app package on a remote ARM device for Windows 10.
  2. Download and install the remote tools for Visual Studio. These tools are used to run the Windows App Certification Kit remotely. You can get more information about these tools including where to download them by visiting Run Windows Store apps on a remote machine.
  3. Download the required Windows App Certification Kit and then install it on your remote Windows 10 device.
  4. On the Package Creation Completed page of the wizard, choose the Remote Machine option button, and then choose the ellipsis button next to the Test Connection button. Note The Remote Machine option button is available only if you selected at least one solution configuration that supports validation. For more information about testing your app with the WACK, see Windows App Certification Kit.
  5. Specify a device form inside your subnet, or provide the Domain Name Server (DNS) name or IP address of a device that's outside of your subnet.
  6. In the Authentication Mode list, choose None if your device doesn't require you to log onto it by using your Windows credentials.
  7. Choose the Select button, and then choose the Launch Windows App Certification Kit button. If the remote tools are running on that device, Visual Studio connects to it and then performs the validation tests. See Windows App Certification Kit tests.

Sideload your app package

With UWP app packages, you cannot simply install an app to your device like Desktop apps. Typically, you download these apps from the Store and that is how they are installed on your device. But you can sideload apps to your device without submitting them to the Store. This lets you install them and test them out using the app package (.appx) that you have created. If you have an app that you don’t want to sell in the Store, like a line-of-business (LOB) app, you can sideload that app so that other users in your company can use it.

The following list provides requirements for sideloading your app.

Sideload an app to a desktop, laptop, or tablet

    1. Copy the folders for the version that you want to install to the target device.

      If you've created an app bundle, then you will have a folder based on the version number and a _test folder. For example these two folders (where the version to install is 1.0.2):

      • C:\Projects\MyApp\MyApp\AppPackages\MyApp_1.0.2.0
      • C:\Projects\MyApp\MyApp\AppPackages\MyApp_1.0.2.0_Test

      If you don't have an app bundle, then you can just copy the folder for the correct architecture and the corresponding test folder. For example these two folders.

      • C:\Projects\MyApp\MyApp\AppPackages\MyApp_1.0.2.0_x64
      • C:\Projects\MyApp\MyApp\AppPackages\MyApp_1.0.2.0_x64_Test
    2. On the target device, open the test folder. For example, C:\Projects\MyApp\MyApp\AppPackages\MyApp_1.0.2.0_Test

Right-click on the Add-AppDevPackage.ps1 file, then choose Run with PowerShell and follow the prompts.

When the app package has been installed, you will see this message in your PowerShell window: Your app was successfully installed.

Note To open the shortcut menu on a tablet, touch the screen where you want to right-click, hold until a complete circle appears, then lift your finger. The shortcut menu appears after you lift your finger.

    1. Click the Start button and then type the name of your app to launch it.

打包一个UWP APP的更多相关文章

  1. 利用 Win32 启动和检测 UWP App 的方法

    一种启动和检测 UWP 应用的方法 背景 我们发布过多款 UWP 平台的同类型 App ,最近有一个需求:用传统 Win32 程序启动我们的 UWP 程序.因为我们的每一个UWP App在客户机器上都 ...

  2. 创建一个UWP 打包签名

    Create a certificate for package signing 2017/2/8 3 min to read [ Updated for UWP apps on Windows 10 ...

  3. xamarin.forms uwp app部署到手机移动设备进行测试,真机调试(device portal方式部署)

    最近学习xamarin.刚好 手上有一个lumia 930.所以试一试把uwp app部署到手机上,并真机调试一把. 目前环境: 1.开发pc电脑是win10,版本1607.加入了insider,所以 ...

  4. Cordova 打包 Android release app 过程详解

    Cordova 打包 Android release app 过程详解 时间 -- :: SegmentFault 原文 https://segmentfault.com/a/119000000517 ...

  5. 如何用 React Native 创建一个iOS APP?(三)

    前两部分,<如何用 React Native 创建一个iOS APP?>,<如何用 React Native 创建一个iOS APP (二)?>中,我们分别讲了用 React ...

  6. UWP app HelloWorld 的创建

    步骤 1:在 Visual Studio 中创建新项目 启动 Visual Studio 2015 RC.将出现 Visual Studio 2015 RC 起始页. (从现在开始,我们将 Visua ...

  7. BEGINNING SHAREPOINT&#174; 2013 DEVELOPMENT 第7章节--打包并部署SP2013 Apps 打包并公布App

    BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第7章节--打包并部署SP2013 Apps 打包并公布App         如今既然你理解了一个app的四个主要部分, ...

  8. 在Xbox和Hololens 上部署、调试UWP App

    在Windows 10 Device 上,UWP App可以快速部署进行调试.PC(平板)和Phone就不用多说,网上的文章比较多.今天专门介绍一下怎么在Xbox One和HoloLens上部署调试U ...

  9. 如何设计和实现一个web app

    web app简介 web app其实不算是什么新鲜的东西,相比于传统的web和传统的app,web app这种web和app相结合的产物有的优点如下: 1. 开发上web app更有便捷性,ios开 ...

随机推荐

  1. Windows10下使用python+selenium实现谷歌浏览器的自动控制

    第一 谷歌浏览器一直是开发人员最喜欢的浏览器,python爬虫在进行抓包时尤其好用,今天为大家带来python+selenium进行自动化控制的安装教程 安装selenium windows下在cmd ...

  2. JS上传文件、导入文件

    //开始导入 function Import() { var filepath = $('#txtUpload').val(); //校验是否选择表格 if (filepath == '') { $( ...

  3. [intoj#7]最短距离

    190227模拟 题目描述 给定一张 N 个点的有向图,点 i 到点 j 有一条长度为 i/gcd(i,j) 的边. 有个 Q 询问,每个询问包含两个数 x, y,求从点 x 出发到点 y 的最短距离 ...

  4. pip install报错Can't roll back cryptography; was not uninstalled

    当使用pip install或者pip install --upgrade报错 Can't roll back cryptography; was not uninstalled 可以进行以下的尝试: ...

  5. Vue.js 系列教程 2:组件,Props,Slots

    原文:intro-to-vue-2-components-props-slots 译者:nzbin 这是关于 JavaScript 框架 Vue.js 五个教程的第二部分.在这一部分,我们将学习组件, ...

  6. 面试 9:Java 玩转冒泡排序

    面试 9:用 Java 实现冒泡排序 南尘的朋友们,新的一周好,原本打算继续讲链表考点算法的,这里姑且是卡一段.虽然在我们 Android 开发中,很少涉及到排序算法,因为基本官方都帮我们封装好了,但 ...

  7. ASP.NET Core 添加区域步骤(详细)

    1 前言 早就想总结一下,但是没时间,这次有时间了,就详细的把步骤写出来. 2 步骤 2.1 添加区域 右键项目->添加->区域,如图1: 区域名称:Ceshi 添加完之后解决方案管理器会 ...

  8. CountDownLatch和CyclicBarrier模拟同时并发请求

    有时候要测试一下某个功能的并发能力,又不要想借助于其他测试工具,索性就自己写简单的demo模拟一个并发请求就最方便了.如果熟悉jemter的测试某接口的并发能力其实更专业,此处只是自己折腾着玩. Co ...

  9. 正确理解CAP定理

    前言 CAP的理解我也看了很多书籍,也看了不少同行的博文,基本每个人的理解都不一样,而布鲁尔教授得定义又太过的简单,没有具体描述和场景案例分析.因此自己参考部分资料梳理了一篇与大家互相分享一下. 标题 ...

  10. Python-初识算法-51

    # 什么叫算法# 计算的方法 : 人脑复杂 计算机简单 # 99 * 13 = 1287 = 13*100 - 13# 查找 : 找数据# 排序 :# 最短路径 # 我们学习的算法 都是过去时# 了解 ...