Sie sind auf Seite 1von 12

5/27/2016

Packaging Universal Windows apps for Windows 10

Packaging Universal Windows apps for


Windows 10

To sell your Universal Windows app or distribute it to other users, you need to create an appxupload package
for it. When you create the appxupload, another appx package will be generated to use for testing and
sideloading. You can distribute your app directly by sideloading the appx package to a device. (What is
sideloading?).
For Windows 10, you generate one package (.appxupload) that can be uploaded to the Windows Store. Your
app is then available to be installed and run on any Windows 10 device.
(If you need to create an app package for a Windows 8.1 app, go here.)
Here are the steps:
1. Before packaging your app: Follow these steps to make sure your application is ready to be packaged
for store submission.
2. Congure an app package: Use the manifest designer to congure the package. For example, add tile
images and choose the orientations that your app supports.
3. Create an app package: Use the wizard in Visual Studio and then certify your package with the Windows
App Certication Kit.
4. Sideload your app package: After sideloading your app to a device, you can test it works correctly.
Once youve done this, you are ready to sell your app in the Store. If you have a lineofbusiness (LOB) app,
that you dont plan to sell because it is for internal users only, you can sideload this app to install it on any
Windows 10 device.

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 use Visual Studios proling and debugging tools to optimize the
performance of your Universal Windows app. For example, the Timeline tool for UI responsiveness,
the memory Usage tool, the CPU Usage tool, and more. Learn about them here.
3. Check .NET Native compatibility (for VB and C# apps): With the Universal Windows Platform, 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 conguration enables the .NET native toolchain, so it is important to test your app
https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

1/12

5/27/2016

Packaging Universal Windows apps for Windows 10

with this Release conguration and check that your app behaves as expected. Some common
debugging issues that can happen with .NET Native are explained in more detail here.

Congure an app package


The app manifest le (package.appxmanifest.xml) has the properties and settings that are required to
create your app package. For example, properties in the manifest le 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 le without editing
the raw XML of the le.
Visual Studio can associate your package with the Store. When you do this, some of the elds in the
Packaging tab of the manifest designer are automatically updated. How do I associate my package with the
store?

Congure a package with the manifest designer


1. In Solution Explorer, expand the project node of your Universal Windows app.
2. Doubleclick the Package.appxmanifest le.
If the manifest le is already open in XML code view, Visual Studio prompts you to close the le.
3. Now you can decide how to congure your app. Each tab contains information that you can congure
about your app and links to more information if necessary.

https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

2/12

5/27/2016

Packaging Universal Windows apps for Windows 10

Check that you have all the images that are required for a Universal Windows app on the Visual
Assets tab. How do I create images to handle all the dierent screen resolutions for Windows 10
devices?
From the Packaging tab, you can enter publishing data. This is where you can choose which
certicate to use to sign your app. All Universal Windows Apps must be signed with a certicate. In
order to sideload an app package, you need to trust the package. The certicate must be installed on
that device to trust the package. Learn more about sideloading onto Windows 10 devices.
4. Save your le 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 Visual Studio 2015:

To create your app package


1. In Solution Explorer, open the solution for your Universal Windows app project.
2. Rightclick 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 Universal Windows project.

The Create App Packages wizard appears.


https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

3/12

5/27/2016

Packaging Universal Windows apps for Windows 10

3. Select Yes in the rst 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. Learn how to set up your devices for sideloading with Windows 10.
4. Sign in with your developer account to the Windows Dev Center. (If you dont have a developer
account yet, the wizard will help you create one.)
5. 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.

6. Make sure you select all three architecture congurations (x86, x64, and ARM) in the Select and
Congure 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 le to upload (.appxupload). The single bundle will contain
all the necessary packages to deploy to devices with each processor architecture.

https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

4/12

5/27/2016

Packaging Universal Windows apps for Windows 10

7. It is a good idea to include full PDB symbol les for the best crash analytics experience from the
Windows Dev Center. You can learn more about debugging with symbols here.
8. Now you can congure the details to create your package. When youre ready to publish your app,
youll upload the packages from the output location.
9. Click Create to generate your appxupload package.
10. Now you will see this dialog:

https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

5/12

5/27/2016

Packaging Universal Windows apps for Windows 10

Validate your app before you submit it to the Store for certication on a local or remote machine.
(You can only validate release builds for your app package and not debug builds.)
11. To validate locally, leave the Local machine option selected and click Launch Windows App
Certication Kit. Learn how to test your app with the Windows App Certication Kit.
The Windows App Certication Kit performs tests and shows you the results. See Windows App
Certication Kit tests.
If you have a remote Windows 10 device, that you want to use for testing, you will need to install the
Windows App Certication Kit manually on that device. The next section will walk you through these
steps. Once youve done that, then you can select Remote machine and click Launch Windows App
Certication Kit to connect to the remote device and run the validation tests.
12. After WACK has nished and your app has passed, you are ready to upload to the store. Make sure
you upload the correct le. It can be found in the root folder of your solution \
[AppName]\AppPackages and it will end with .appxupload le 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 using these instructions.

Important
https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

6/12

5/27/2016

Packaging Universal Windows apps for Windows 10

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 Certication Kit remotely.
Start the remote debug monitor as described here.
3. Download the required version of the Windows App Certication 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
conguration that supports validation. Learn how to test your app with the Windows App
Certication Kit.

5. Specify a device from 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 Certication 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 Certication Kit tests.

Sideload your app package


With Universal Windows app packages, you cannot simply install an app to your device like Desktop apps
for example. 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
dont want to sell in the Store, like a lineofbusiness (LOB) app, you can sideload that app so that other
users in your company can use it.
To sideload your app package to a Windows 10 device, follow these steps:
Enable your device
To install your app to a desktop, laptop, or tablet, follow the steps in the section below.
To install an app to a Windows 10 Mobile device, use the WinAppDeployCmd.exe.
https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

7/12

5/27/2016

Packaging Universal Windows apps for Windows 10

After you have sideloaded your app to test it, you can upload your package to sell your app in the Store, or
you can sideload your app to any Windows 10 device. Learn about ways to sideload a lineofbusiness
(LOB) app to other users in your company.

Install 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 youve created an app bundle, then you will have a folder based on the version number and an
_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 dont 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.
3. Rightclick the AddAppDevPackage.ps1 le, 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 rightclick, hold until
a complete circle appears, and then lift your nger. The shortcut menu appears after you lift your
https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

8/12

5/27/2016

Packaging Universal Windows apps for Windows 10

nger.

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

Q&A
Q: How do I create a developer account from Visual Studio?
A: From the Project menu, choose Store > Open Developer Account. This opens the Dev Center for Store
apps. From there, you can create a develop account, which youll need to upload apps to the Store. Learn
more about the App Developer Agreement.

Q: How do I reserve a name for my app? How long is it reserved for?


A: From the Project menu, choose Store > Reserve App Name. Sign in to the Store. After your credentials
are checked, you can reserve a name for your app. When the Store is open for app submissions, you can
reserve an app name for one year. If you dont submit an app within the next year, the reservation expires,
and another developer could reserve the name. Learn more about naming and describing your app.

Q: Can I associate my app with the Store?


A: From the Project menu, choose Store > Associate App with the Store. If you do this, you can test
purchase and notication scenarios in your app. When you associate your app with the Store, these values
are downloaded to the app manifest le for the current project on your local machine:
Package Display Name
Package Name
Publisher ID
Publisher Display Name
Version
If you override the default package.appxmanifest le by creating a custom .xml le for the manifest, you
cant associate your app with the Store. If you try to associate a custom manifest le with the Store, you will
see an error message.

Q: How do I take screenshots of my app to use when I submit it to the Store?


A: From the Project menu, choose Store > Capture Screenshots. This builds the current project and
launches the app in the simulator. When the simulator opens, choose the Copy screenshot button on the
simulator side bar.

Q: How do I upload my app package to the Store?


A: From the Project menu, choose Store > Upload App Packages. Sign in to the Store. After your
https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

9/12

5/27/2016

Packaging Universal Windows apps for Windows 10

credentials are checked, the Dashboard opens. If you reserved a name for your app, you will use this tool
to edit the existing release. If you didnt reserve the name, choose Submit a new app, and then follow the
instructions on the screen.

Q: How do I install a certicate and my app package separately?


A: Open the folder that contains the PowerShell script to install your app package. For example,
C:\Projects\MyApp\MyApp\AppPackages\MyApp_1.0.6.0_Test.
1. Doubleclick the certicate le in the folder, and then click Install Certicate. This displays the
Certicate Import Wizard.
2. In the Store Location group, tap the radio button to change the selected option to Local Machine.
3. Click Next.
4. Tap OK to conrm the UAC dialog.
5. In the next screen of the Certicate Import Wizard, change the selected option to Place all
certicates in the following store.
6. Tap the Browse button. In the Select Certicate Store popup window, scroll down and select Trusted
People, and then tap OK.
7. Tap the Next button; a new screen appears. Tap the Finish button.
8. Use the addappxpackage cmdlet for PowerShell addappxpackage cmdlet details.

Q: Why use an app bundle?


A: Users can download faster with an app bundle because they only download the assets that they need. If
your app contains languagespecic resources, a variety of image scales, or resources that apply to specic
versions of DirectX, you should generate an app bundle. If you don't generate one, your app will run just
ne, but your users will have to download a larger app. Learn more about app bundles.
One app bundle can contain the packages for all architectures, so you only need one bundle per app.
If you create an app bundle, you can submit your app to the Store more easily. You only have to upload one
.appx le no matter how many architectures your app supports. For example, only one upload to support
x86 and x64. If you don't create an app bundle, you must upload an .appx le for all supported
architectures.

Q: How do I create images to handle all the dierent screen resolutions for Windows 10
devices?
A: You can add dierent versions of each image that identify your app using the package manifest designer
image assets in your app, logos and splash screen images. Then, you can test them to ensure that they
look good on a variety of devices that have dierent screen resolutions. Learn how to manage and organize
le and image resources for these and other images.
When thinking about dierent screen resolutions for your Windows 10 devices, its also important to create
a responsive design for Universal Windows apps.
https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

10/12

5/27/2016

Packaging Universal Windows apps for Windows 10

Q: How can I localize the description of my app for users?


A: You can make your app more attractive to international audiences by localizing its display name,
description, and other identifying features, which are described in the package manifest le. Learn how to
load resource les based on the language. Go to the Loading strings from the app manifest section in
that topic.
You can also localize your app itself by using resource les.

Q: Can I create an app package from the command prompt?


A: Yes. You can run MSBuild from a Visual Studio command prompt, or use Team Foundation Build.
Open a Visual Studio command prompt, and then build the app project with MSBuild. If you dont specify
any additional ags or targets, MSBuild creates the app package in the same location as the other build
output of the project. By default, that output appears in a projectspecic subfolder. For example:
MSBuild MyApp.csproj /p:OutDir=C:\builds\droplocation\

The app package and other build output would then be created in the following location:
C:\builds\droplocation\MyApp\
To select a specic conguration and platform that you build for the package, you can add this parameter:
/p:Platform=x86;Conguration=Release

/p:Platform=x86;Configuration=Release

Q: How can I setup which resources are installed on a device?


A: Use the Resource Management System that has a tool to help you create Package Resource Index (PRI)
les with the MakePRI tool. Each PRI le contains a named collection of resources, referred to as a resource
map.

Q: The PowerShell script for the app package doesnt run. Why?
A: If the PowerShell script doesnt run and there is no error message, the user access control (UAC) on the
machine might have been changed. The default UAC setting is Notify me only when apps try to make
changes to my computer (default), but it can be changed to Never notify me. If you use a standard user
account to log on to a machine whose UAC is set to Never notify me, any changes that require
administrator permissions are automatically denied. Under these circumstances, the PowerShell script
starts but requires administrative permissions to continue. The UAC dialog box doesn't appear, and
Windows automatically prevents the script from making changes. To resolve this issue, either change the
UAC setting or run the script as an administrator.

https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

11/12

5/27/2016

Packaging Universal Windows apps for Windows 10

See Also
Preparing your app for the Windows Store
How to test your app with the Windows App Certication Kit
App Packaging and Deployment
App Package Manifest Details
Package details
App Packager

2016 Microsoft

https://msdn.microsoft.com/en-us/library/hh454036(d=printer).aspx

12/12

Das könnte Ihnen auch gefallen