Retarget your Windows Store app to Windows 8.1 Preview
[This documentation is preliminary and is subject to change.]
To migrate your Windows Store app to Windows 8.1 Preview, you must retarget your projects and update your code. For the smoothest transition, we recommend that you perform the following steps.
- Step 1: Copy your solution.
- Step 2: Retarget your projects.
- Step 3: Fix errors that relate to file paths and extension SDKs.
- Step 4: Update your code to target new APIs and features.
- Step 5: Service the Windows 8 version of your app.
Step 1: Copy your solution
If you want to continue to update the Windows 8 version of your app, we recommend that you copy your solution before you retarget it.
If you’re managing your solution in version control, we recommend that you create a branch for the Windows 8 version of your app. Then, you can retarget the solution in the main branch.
If you’re not using version control, we recommend that you copy your solution to another folder and then retarget that copy of the solution.
To create a branch in Team Foundation Service (for solutions in version control)
-
In Source Control Explorer, open the shortcut menu for the branch or folder that contains the solution files of the app that you want to retarget, and then choose Branch.
The Branch dialog box appears.
-
In the Target box, specify the path of the new branch.
-
(Optional) In the Branch from version section, specify whether to branch from the most recent version, a version from a specific date, or a specific changeset.
-
Choose the Branch button.
To create a folder (for solutions that aren't in version control)
-
Copy your solution folder to a place on your computer that makes sense to you.
-
Rename the original folder with a name that makes sense (for example, SolutionName_8.1).
-
If your solution references projects that are outside of your solution folder, copy them to a location that makes sense (for example, next to the SolutionName_8.1 folder).
Step 2: Retarget your projects
Change the target of each project in your solution from Windows 8 to Windows 8.1 Preview.
-
If you're managing your files in version control, make sure to check out the entire solution.
-
Open your solution in Microsoft Visual Studio 2013 Preview.
- If you're opening your solution in Microsoft Visual Studio Express 2013 Preview for Windows, your solution won't load. In the next step, you'll retarget the projects in your solution.
- If you're opening your solution in Microsoft Visual Studio Professional 2013 Preview, Microsoft Visual Studio Premium 2013 Preview, or Microsoft Visual Studio Ultimate 2013 Preview, your solution loads but still targets Windows 8.
-
In Solution Explorer, open the shortcut menu for a project that you want to migrate, and then choose Retarget to Windows 8.1.
-
In the Project and Solution Changes dialog box that appears, choose the OK button.
The project now targets Windows 8.1 Preview.
Step 3: Fix errors that relate to file paths and extension SDKs
Fix errors that relate to file paths
If your solution contains absolute paths to files in other projects, you might have to fix those paths so that they reference files in the versions that you created in Step 1: Create a copy of your solution.
When you build a project, errors and warnings might appear in the Error List and the Output Window if your project refers to files by using paths that are no longer valid. You can identify and fix file paths by using these errors and warnings. We recommend that you use relative paths whenever possible.
Fix errors that relate to extension SDKs
Errors might appear if your project references extension SDKs that are incompatible with Windows 8.1 Preview. Extension SDKs that were authored in C++ and created for Windows 8 aren't compatible with Windows 8.1 Preview. To resolve these errors, locate, download, and install versions of those SDKs that are compatible with Windows 8.1 Preview. If a compatible version of an SDK isn't yet available for download, refer to the Visual Studio readme file for guidance about how you can temporarily resolve the issue so that you can compile and run your app on your development computer. The following list shows some of the extension SDKs that might not be compatible with Windows 8.1 Preview.
Step 4: Update your code to target new APIs and features
Many APIs and features that were previously available in Windows 8 have been changed. In some cases, they've been replaced by new APIs and features. As you compile and test your app, you might encounter warnings that you’ll have to fix. For a complete list of changed API and features, see the following topics:
- API changes for Windows 8.1 Preview (Windows Store apps using C#/VB/C++ and XAML).
- API changes for Windows 8.1 Preview (Windows Store apps using JavaScript and HTML).
Project templates for Windows Store apps have changed because Windows 8.1 Preview offers new ways to accomplish certain scenarios. Visual Studio doesn't modify the structure or contents of your solution, so your solution might contain files that wouldn't be present in a new project that targets Windows 8.1 Preview. Your solution might continue to run successfully, but we recommend that you investigate how to optimize your app for Windows 8.1 Preview and apply new best practices. For more information, see the following topics:
- Migrating Windows 8 apps to Windows 8.1 Preview.
- Windows 8 to Windows 8.1 Preview for XAML developers.
For general information about the structure of project templates that you can use to build Windows Store apps in Visual Studio 2013 Preview, see the following topics:
Step 5: Update the Windows 8 version of your app
If you're managing your solution in version control, we recommend that you service the Windows 8 version of your app by updating files in the branch that you created in Step 1: Create a copy of your solution.
If you aren't using version control, we recommend that you service the Windows 8 version of your app by updating files in the original folder (not the copy).
You can service the Windows 8 version of your app by using any of the following versions of Visual Studio if you also install the Microsoft Windows 8 Development tools.
- Visual Studio Professional 2013 Preview.
- Visual Studio Premium 2013 Preview.
- Visual Studio Ultimate 2013 Preview.
- Microsoft Visual Studio 2012.
To add the Microsoft Windows 8 Development tools
-
In Control Panel, open Programs and Features, choose the item that represents your installation of Visual Studio, and then choose the Change button.
-
In the setup wizard for Visual Studio, choose the Continue button, and then choose the Modify button.
-
In the Optional features to install list, select the Microsoft Windows 8 Development check box, and then choose the Update button.
You can't service the Windows 8 version of your app by using Visual Studio Express 2013 for Windows. That version of the app won’t load in that version of Visual Studio until you retarget the solution to Windows 8.1 Preview.
Build date: 7/1/2013
