Freigeben über


How to specify a target version for a new app project for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

When you create a new Windows Phone app or game with the Windows Phone SDK 8.0, you can target Windows Phone 8 or Windows Phone OS 7.1. For more information, see Windows Phone versions.

When you open an existing Windows Phone OS 7.1 app or library project, you can upgrade the app to target Windows Phone 8, or you can continue to target Windows Phone OS 7.1. For more information, see How to upgrade an app project to Windows Phone 8.

You can also create a solution that includes multiple projects that target different versions. In this way, you can more easily maintain an app that targets both Windows Phone 8 and Windows Phone OS 7.1. For more information, see How to target multiple versions with your app for Windows Phone 8.

Any solution can contain multiple projects that target different Windows Phone versions. In a multi-project solution, a Windows Phone 8 project can reference a Windows Phone OS 7.1 project; however, a Windows Phone OS 7.1 project cannot reference a project that targets Windows Phone 8. For more information, see Windows Phone versions.

Setting the target version for a new Windows Phone project

When you create a new Windows Phone app project, you select the target version in the Windows Phone platform selection dialog box in Visual Studio.

To set the target version for a new Windows Phone project

  1. In Visual Studio, on the File menu, click New Project.

    The New Project dialog box opens.

  2. In the Installed Templates list, select your preferred programming language - Visual C#, Visual Basic, or Visual C++. Then select the Windows Phone category.

    You will see the list of project templates for developing Windows Phone apps in the specified language.

  3. Select a template from the list of available project templates. For more information about the available templates, see How to create a new app project from a template for Windows Phone 8.

  4. At the bottom of the dialog box, choose a name and a file system location for the project. Then click OK.

    The Windows Phone platform selection dialog box appears, as shown in the following illustration.

    When you create a project using one of the new templates added in Windows Phone SDK 8.0, this dialog box does not appear. These projects always target Windows Phone 8.

  5. In the Windows Phone platform selection dialog box, select the Windows Phone platform that you want to target with your app - Windows Phone 8 or Windows Phone OS 7.1. Then click OK.