Publish desktop applications in the Microsoft Store part1

Page creation date :

Environment

Windows
  • Windows 10
Visual Studio
  • Visual Studio 2019

※ Works in other versions, but is unconfirmed

At first

In the past, only applications that can be published in the Microsoft Store were in the UWP format, but by using Desktop Bridge, Desktop applications created in Windows Form, WPF, Win32, and so on can now be published in the Microsoft Store.

This article provides step-by-step instructions on how to create a package for publishing desktop applications in a relatively simple way.

However, as a precaution, applications that are packaged and installed It is different from the execution environment when you distribute and run in the traditional ZIP(EXE) distribution and installer format (MSI), so there is no guarantee that the migrated one will work 100%. If you are thinking of distributing desktop applications in the Store, we recommend that you check the behavior after packaging. In some cases, you may need to modify the program for the Store.

Pre-preparation

  • You have created and completed the desktop application you want to publish in Visual Studio.
  • You're registering an account so that your application can be published in the Microsoft Store (it's desirable to have other apps published because creating an account in the Microsoft Store is not the subject)

Create a package project

Open the desktop application project that you created in Visual Studio. Here is an example of tablelayoutSyncer, a tool that allows me to synchronize the table layoutof two databases I have created.

image

Add a new project in the solution.

image

Select Windows Application Package Project from the template to add it. The project name is anything but Setup.

image

Select the target platform for Windows 10. The target version is basically up-to-date and fine. For the minimum version, decide what features and library versions you want to use.

image

The package project is added.

image

Set up a package project

Browse projects

Set which projects are included in the package. Right-click Applications and select Add Reference.

image

Select the projects that you want to include. EXE projects are referenced directly by library projects, so you don't need to check them.

image

Associate applications with stores

If you already have an account on the Microsoft Store side, link the information between the application s it publishes and the store. Right-click the package project and select Publish or Associate Application with Store.

image

Select Next.

image

If you haven't registered your application information yet on the Microsoft Store, put your name in "Book New Application Name" below and click the "Book" button.

After booking, or if you have already registered the application information in the Microsoft Store, the application name will appear in the list. Select the application you want to link from among them.

image

Click the Association button.

image

Edit Package.appxmanifest

Edit Package.appxmanifest to set up the application you want to publish. The contents are almost the same as when you create a UWP application, so i'll write only the desktop-specific part.

image

Application

If you associate it with a store, you'll have the same display name.

In Description, type a description of the application.

"Supported rotation" is a desktop application, so you don't have to apply anything.

image

Visual Assets

The Microsoft Store requires images for apps of various sizes to suit your usage. You don't have to have all the sizes available, but you'll need to get it all ready in the dozens.

By using the "asset generator" to prepare one icon image for the app for the time being You can also create the sizes you want in bulk. However, please adjust the image individually at that time because it might not necessarily become the image expected.

image

Features

Set what features the publishing application uses.

However, there are basically no functional constraints in desktop applications, so there is no point in setting this item.

image

Declaration

Set it if necessary.

image

Content URI

Set it if necessary.

image

Packaging

If you are associating a store, its value is set and you can use it as is.

image

Save when you're done.

Testing packages

Make sure that the package is installed and run successfully. Right-click the package project and select Debug or Start New Instance.

image

Make sure the program works correctly.

image

Make sure it's registered in the Start menu.

image

Create a package

Create a package to publish the application. Right-click the package project and select Publish or Create App Package.

image

Select <Account Name><In the Microsoft Store as Application Name> and select Next.

image

Modify the version to match the application.

In the architecture, check the platforms to be released. For desktop applications, you will usually check "x86" or "x64". Any CPU can cause package creation to fail, so let's create x86 and x64 architectures in exe projects beforehand.

Remember to make sure that the solution configuration is Release.

image

If the build is successful, you will see the following screen:

The package is generated in the "output location", so click the link to upload it later to open Explorer.

Because it is the first registration this time, it does not send it automatically to the Microsoft Store.

To see if the package and app work correctly, click the "Launch Windows App Certification Kit" button to see if it works.

image

Make sure that the package is created at the package destination. You will register a file with the extension ".appxupload" in the Microsoft Store.

image

Summary

That's all there is to creating packages in the local environment. Next time, I'd like to make a public setting on the Microsoft Store side.