At the Build 2016 conference, we released the Desktop App Converter which enables you to bring your existing desktop applications to the Universal Windows Platform (UWP).
With the Desktop App Converter, a number of important improvements are being made to the Windows platform for all developers. First, you can convert existing Windows desktop apps or games to Universal Windows Platform (UWP) packages so your users will be able to install them easily and experience seamless updates. Once converted to the UWP application model, the desktop app has access to new UWP APIs which previously were inaccessible to desktop apps, such as Live Tiles and push notifications.
Introducing Desktop to UWP Packaging Project in Visual Studio
Visual Studio “15” adds support for a new packaging project that makes it easier to build and test apps converted with the Desktop Bridge directly from within Visual Studio to make your development experience more productive:
- The packaging project has a configuration file that allows Visual Studio to deploy any updates you make to the binaries from editing your desktop app projects directly into the UWP app package.
- You can launch and debug the UWP app package directly from within Visual Studio when you hit F5. You can set a break point in your existing code and step through it.
Enabling support for Desktop to UWP packaging project
To try this out, make sure you’re set up to use the Desktop App Converter.
- Make sure you’re running Windows 10 Insider Preview Build 14342
- Install Desktop App Converter Preview (Project Centennial)
- Install Visual Studio “15” Preview 2 or higher
- Download Desktop to UWP Packaging VSIX from the Visual Studio Gallery
Creating new projects
You will find a new project type in the New Project Dialog that you can add to your existing desktop app solution, the output of which was previously run through the converter.
There is a new Package Layout property in the Desktop to UWP Packaging project that let you configure where to copy your code’s build output into the UWP:
Deploying changes from desktop app projects into the UWP app package
The project also contains a mapping file (AppXPackageFileList.xml) which specifies the files to copy from the existing app’s project build output into the UWP app package. You need to configure this file to copy files (such as .dll, .exe or any other resources) your application might need and were modified inside Visual Studio.
Debugging the application
You can set the packaging project as the start-up project and hit F5 to start the debugger. The desktop app project will build, followed by the packaging project copying the artifacts from the build output and launching the debugger on the updated UWP app package.
Check out this MSDN article Dev Center article for more detail on how you can leverage this workflow. We would love to hear your feedback on how we can make your experience of brining your Win32/.NET application to the Universal Windows Store even better.
As you explore the tools on current preview builds, we’re very keen on hearing about your experiences and receiving your feedback. The best place to make feature suggestions is on the Windows Developer UserVoice site. For questions and bug reports, please head over to the Developing Universal Windows apps forums.
|Pete Faraday, Program Manager, VS ClientPete works on the Windows Tools team within Visual Studio. Originally from the UK, he has been in Seattle for the last 20 years. In his spare time, he enjoys coffee, home repairs and life near the waterfront.|