A couple of conferences ago, we announced that we are planning to build a variety of bridges to simplify the tasks of developers on porting applications for different platforms to Windows Store, including Windows. Each of the bridges announced at that time had its own fate, and one of the most anticipated - Project Centennial or Desktop Bridge - became available to all developers not so long ago, simplifying the transfer of Win32 / .NET applications to the Windows Store, which will be discussed inside.
If you want to talk on this topic with me personally, come
on March 20 for a practical event .

A simple case: an application for storing from a Win32 application in 5 minutes
The easiest way to transfer your Win32 or .NET application to the installation package from the Windows Store is the Desktop App Converter (DAC), which can be
downloaded from the Windows Store itself . It is a set of libraries and a PowerShell script, which allows you to convert non-interactive installation of your application into a package for Windows Store. In order to solve the problem of collecting data that occurs during installation, the Windows Containers technology is used, respectively, this determines the requirements for the machine on which the conversion can be performed, and the need to download
reference images of operating systems . The version of the image that you download must match the version of your operating system on which the conversion procedure is performed. Then you need to initialize the DAC with the appropriate way, and you are ready to convert.
')
If your application is just an application in itself, such as many of the classic games, then this is quite enough to prepare your application for publication in the Windows Store. However, the Desktop Bridge does not support all the scripts and interactions that are available to a regular desktop application, and if your application does something that is
not supported at the moment , you will have to put in a little more effort.
A good example of an application that I myself use for demonstration is 7-zip: a few minutes and from the installer of the Windows application I get the appx package for deployment through the Windows Store.
Reverse history: UWP application with Win32 capabilities
The quick-witted reader probably already asks himself a question, but what if ... Yes! Technically, no one bothers to expand existing UWP applications with available Win32 capabilities using the Desktop Bridge technology. There are many scripts, especially for a variety of embedded solutions or utilities.
What should one know who chose to do just that? Your account in the Windows Store must have permissions to publish applications in Full Trust mode, namely the Desktop Bridge applications work in it.
Complicated story: Win32 application with incompatible features
In this case, you will have to remove all incompatibilities and replace them with the same UWP API functionality. Why this may be required?
As
the easiest option that immediately comes to mind, imagine that your application is very popular and free, it downloads a lot, so you need to think all the time about where to place it so that everyone can download it quickly. Convert it to the Windows Store application - magic - now, wherever there is a Windows Store, you can not worry about the availability of your application.
The second,
corporate version , Windows Store application can be distributed through the internal application store within the organization. If it is aimed at large companies, perhaps such a convenient way of distribution with self-service will be in demand.
These are just two of the simplest scenarios, why you might need to build a Windows Store application from your Win32 / .NET application. Let's discuss your suggestions for scripts in the comments. :)
The story: converted what next?
In fact, the story is just beginning here! After the conversion, your application receives the UWP ID and you can call all the UWP APIs available on the platform, for example, you can easily add work with live tiles, alerts and so on.
For example, if you need an application that is touch friendly, you can run a Win32 application as an App Service, write a new interface on XAML, and communicate to perform the application’s immediate tasks with the App Service application, without displaying its classic interface to the user.
If you have any questions and you want to ask them to me personally, I want to remind you that on March 20 I will be one of the speakers on the Desktop Bridge: from Win32 and .Net in the Windows Store . Participation is free, but registration is required.A short video introduction about what I have described for so long in the article: