Microsoft shows how to turn a desktop app to a Windows 10 UWP app

Microsoft has a new developer blog post where it breaks down how to turn a desktop app to a Windows 10 UWP app with the company's Desktop Bridge tools.

The highly technical post shows how the bridge tools can be used to change the code of a simple Windows Forms app. The first step is to convert the code and then enhance it in Visual Studio, before debugging it. Microsoft says:

With the conversion, a number of immediate platform benefits become available automatically, such as Start menu integration, clean install/update/uninstall, and distribution of the .appx package via your choice of distribution.

The next step is to add an app identity so it can access the UWP AFI files. This allows it to support Windows 10's Live Tile feature, among other things. Then the developer can extend the app to support more UWP components. Next. the UI code of the app has to be migrated and changes so it can support touchscreens. Finally, the final desktop parts of the code are changed over to the UWP-compliant ApplicationData API. This will allow the app to work on any Windows 10-based device, including a Windows 10 Mobile smartphone, the Xbox One and Microsoft HoloLens.

John Callaham
23 Comments
  • Awesomesauce.
  • This might save windows from the android attack in forms like 'one compute', which shows continuum is possible on android too. But if windows can make run the legendary apps from the windows 10 mobile, then yes, its good. I still cant believe microsoft is not making a big deal out of this. up until now they said apps converted via project centennial wont run on win 10 mobile.
  • Right, because Windows is a massive failure that needs saving.
  • Haha funny
  • I think because W10M is technically missing some OS components to make these Centennial apps possible to run it. It requires some several changes under the hood which is at the moment, not much. Also there is a bit issue of recompiling those apps into ARM architecture, which may not that all simple and even its possible just to recompile it and then run it, optimization still needs work and may be the hell. Still possible though and we already have a real world example, Windows RT, which is literally an ARM version of regular Windows 8.X PC OS recompiled and optimized for ARM. I hope Microsoft to act fast about it (but not being rushed) around next year. The more it takes longer, the harder for W10M to penetrate the already saturated market that it already lost even more share recently. W10M doesn't have to be top market share, it just have to be decent enough that everybody will care about it, not just us. Sent from Turing Machine
  • That's nice
  • If it's possible to make desktop apps run on mobile even if a lighter version we're looking at a game changer -IF EMBRACED BY DEVELOPERS -
  • That's kinda what I was thinking too.  I didn't even know this was possible.
  • This is seriously awesome that this is extending to mobile as well.
  • Bringing desktop apps to mobile may be big but they need to think of a good UI template to do so, which needs a lot of work. Applications with simple icon click commands can be easily moved to XAML, but those with ribbon menu or other complex UI elements...... Not so easy.
  • Yeah. It's a bridge for that reason. The apps won't come to Mobile immediately, they will still look and work very much like desktop apps except they will run as the user, not an administrator (ever!). They'll not be sandboxed, however. This allows minimal code changes and allows developers to get their apps on the Store for desktops (the biggest Windows 10 market right noow). This does not even impact the .exe in any breaking way and the same package works on Windows 7 and 8 as well. In addition, Microsoft is letting developers use UWP features like live tiles on their desktop apps. They can add XAML pages here and there. And slowly begin "converting" their desktop apps to UWP apps and once that's complete, they can of course target Mobile. Project Centennial seems more like an attempt to bring the many high quality and powerful apps to the Windows 10 Store for users. It makes installation/uninstallation easy and clean, improves security (all rootless code), and no "winrot" or clogging of the registry unnecessarily. (Each app gets its own virtualized registry; the system lies to the apps and they see no change.) And the best part, no DLL hell.
  • Even if the bridge can get the x86 app to compile and run on a windows phone, that is a HUGE start. XAML is fairly easy to pick up. Even the more complex UI elements only require a few lines of C# code to get functional.
  • Having to run these desktop apps on W10M Continuum is more than a huge start, it's literally makes the Continuum and W10M truly useful and have a unique and solid relevance in the market. If that also paired with having desktop environment (without having to port Windows Explorer shell), it will be a tremendous boost of use. Unfortunately there seems to be no sign from Microsoft about this anytime soon, I hope they could make this happen fast. Sent from Turing Machine
  • Even if they would not scale properly in the beginning, I see this useful since you could run them through Continuum.
  • waiting to have all the AGE OF EMPIRES games on the store :o
  • That would be awesome!! Sent from Turing Machine
  • The highly technical post shows how the bridge tools can be used to change the code of a simple Windows Forms app.
    And once again WCentral gets it wrong. No code is actually converted. None. At most some configuraiton files are altered. On a side note, it's about as technical as a cooking recipie. Do A, then do B, then do C....
  • Absolutely correct! From the 5 steps outlined in the arcticle, only the first step is done by the bridge...the remaining 4 steps are all manual work and anything else than effortless. I also agree with your second assertion, the article has no technical depth at all.
  • Its not supposed to be very technical they have done it that way so it's easy to convert a desktop app to a uwp
  • What a drivel. Before someone invests money to rewrite LOB apps to XAML, he will convert it to HTML+bootstrap+Typescript+Angular. You can then use a cheap and cheerful Chromebook, a RaspPi, an iPad or a Windows computer to run a business. The days of vendor lock in needs to end.
  • The best is "for feature suggestions use the uservoice page". Did this on a couple of other teams pages, no one ever seemed to care, no one read, nobody gave feedback. So, sorry, never again.
  • How about showing how to turn a windows device into a Linux device lol
  • Not really "that" funny (except to yourself apparently), especially for a necropost. If it was hilarious claps all around, alas no dice, gotta do better when you necro ;)