In this blog post, we will walk through How to integrate your Windows/Windows Phone 8.1 apps to Windows 10 Apps (Universal App Platform).
“Writing for Windows 10, is writing for all devices.”
First of all, we will have to make some modifications in package.appxmanifest but, unfortunately there’s no tools in Visual Studio CTP and Windows 10 Developer Tools yet.
But, to solve this problem at the meanwhile, there’s a Powershell script is written to do most of work till the full version, and you can get this file from HERE.
After you download the Powershell file, unzip it and place unzipped folder in the C Drive.
And you can get these tools from HERE.
Now, Let’s Start 🙂
- Open your Win/WP 8.1 Project and Right Click the project and hit Open in File Explorer.
- Click File > Open command prompt > Open command prompt as shown:
- Then, write following command.
And hit Enter.
This will convert the .csproj to UAP and will update the package.appxmanifest
- Now, you will find your project migrated to UAP.
- Make some edits in package.appxmanifest by adding uap: before some capabilities and Application Extensions and Protocols like shown below:
- And if you are migrating Windows 8.1 App, Change the tile size like shown below:
- Before you run, you have to add some extensions to solve Platform Specific issues (e.g phone back button), Right Click References and then hit Add Reference > Universal App Platform > Extensions
Add: Windows Desktop Extension SDK and Windows Mobile Extension SDK
- Now, Run your App, you might face some issues in xaml like Phone Styles, change them to public style that could run in Windows 10 UAP.
- About the Charms, they are not existed anymore in Windows 10 with the same UI but, you should replace them with in-app UI for (Search – App Settings – Sharing).
And Here are some tips to put in your consideration while migrating to Windows 10:
- Don’t forget to add Reference to Platform Extension SDKs, if needed.
- Review conditional code (#if…) and convert to adaptive code where appropriate.
- Replace calls to deprecated APIs, if any.
- Replace references to undefined styles in XAML (as we mentioned above).
- Update code that integrates with Charms bar.
- Extend your UI to create a great, adaptive UI that works across multiple device families.(The most Important)
This was a very simple scenario for migrating you Win/WP 8.1 App to Windows 10.
Keep in mind, it’s still a preview 😉