Bagikan melalui


Visual Studio Conversion Wizard

Use this wizard to convert a solution or project to the project file format that is used by the current version of Visual Studio. The wizard lets you can create a backup copy before conversion. The converted solution or project is created in the same location as the current solution or project. All projects in a solution are converted.

To access the wizard, on the File menu, point to Open and then click Project/Solution, WebSite, or File. In the Open dialog box, select one of the following file types: .vcproj, .csproj, .vbproj, or .sln.

Converting Solutions or Projects

Solutions or projects that have the formats of Visual Studio versions that are earlier than Visual Studio 2008 must be converted to the format of this version of Visual Studio before you can work with them in this version. Converted solutions or projects are no longer compatible with Visual Studio versions that are earlier than Visual Studio 2008.

When a solution is converted, all projects in the solution are converted. If any project cannot be converted, it is unloaded and marked as unavailable in Solution Explorer. In this situation, address the problems indicated in the upgrade report as you try to reload the projects that are marked (unavailable). When you try to reload projects, the Conversion Wizard starts again. For information about the errors that might occur, see Upgrade Report at the end of this topic.

Upgrading Projects to Enable.NET Framework 3.5 Features

Visual Studio 2008 projects let you target a specific version of the .NET Framework, either 2.0, 3.0, or 3.5. Because this feature was not available in earlier versions of Visual Studio, converted projects automatically target .NET Framework 2.0. However, you can upgrade projects to target the current .NET Framework version to gain access to its new features. For more information, see Targeting a Specific .NET Framework.

Converting Source-Controlled Solutions or Projects

If you are converting a source-controlled solution or project, it is checked out automatically during the conversion. Ensure that no files are exclusively checked out by another user because the projects that contain those files will not be converted.

Batch Conversion of Solutions or Projects

To automate the conversion of many solutions or projects, you can create a batch file that uses the command-line upgrade tools. For more information, see /Upgrade (devenv.exe). The upgrade report provides information about source-controlled solutions or projects that were not converted because files in them were checked out. After those files are checked in, you can run the batch file again to convert those solutions or projects.

Web Projects

Visual Web Developer manages Web sites (projects) and files differently than Visual Studio versions that are earlier than Visual Studio 2008 do. For information about conversion of Web projects, see Web Project Conversion from Visual Studio .NET.

Converting to Visual Studio 2008 from Versions of Visual Studio Earlier than Visual Studio .NET 2002

Visual Basic 6.0 projects can be converted directly to the project file format that is used by this version of Visual Studio. For more information, see Upgrading Applications in Visual Basic.

By using the Conversion Wizard, Visual C++ 6.0, 5.0, and 4.0 projects can be converted to the project file format that is used by this version of Visual Studio. For more information about how to work with converted projects, see How to: Upgrade Wizard-Generated Managed Extensions for C++ Code.

Welcome Page

This page introduces you to the Visual Studio Conversion Wizard.

Choose Whether to Create a Backup Page

On this page, you specify whether a copy of your solution or project in its current format is made before the solution or project is converted. We recommend that you create a backup if the solution or project is not source controlled or if you want to open the solution or project in your earlier version of Visual Studio.

For some solutions and projects, you can specify the backup location; for others, the backup files are created in the same folder as the files that are being converted. Refer to the following table for detailed information.

Project type

Backup options

Visual Basic

You can specify the backup location for Visual Basic projects and for solutions that contain Visual Basic projects and any combination of Visual C# or Web projects.

Backup files for solutions that contain both Visual C++ and Visual Basic projects are created in the same folder as the files that are being converted.

In solutions that contain Visual Basic projects and both Web and Visual C++ projects, only the Web projects can be backed up.

Visual C#

You can specify the backup location for Visual C# projects and for solutions that contain Visual C# projects and any combination of Visual Basic or Web projects.

Backup files for solutions that contain both Visual C++ and Visual C# projects are created in the same folder as the files that are being converted.

In solutions that contain Visual C# projects and both Web and Visual C++ projects, only the Web projects can be backed up.

Web

You can specify the backup location for Web projects and for solutions that contain Web projects and any combination of Visual Basic or Visual C# projects.

Only the Web projects can be backed up in solutions that contain both Web projects and Visual C++ projects or solutions that contain Web projects, Visual C++ projects, and any combination of Visual Basic or Visual C# projects. You can specify the backup location.

Visual C++

Backup files are created in the same folder as the files that are being converted for Visual C++ projects and for solutions that contain both a Visual C++ project and any combination of Visual Basic or Visual C# projects.

In solutions that contain both Web and Visual C++ projects or solutions that contain Web projects, Visual C++ projects, and any combination of Visual Basic or Visual C# projects, only the Web projects can be backed up.

Do you want to create a backup before converting?

  • No
    Specifies that a backup is not created. You cannot work with the solution or project again in Visual Studio .NET 2002, Visual Studio .NET 2003, or Visual Studio 2005.

  • Yes, create a backup before converting
    Specifies that a backup is created. Specify the Location for backup if you are converting one of the following project types or a solution that contains any combination of these project types: Visual Basic, Visual C#, and Web.

  • Yes, create a backup of all Web projects
    Specifies that a backup is created. Specify the Location for backup for the Web projects if you are converting a solution that contains both Web and Visual C++ projects or a solution that contains Web projects, Visual C++ projects, and any combination of Visual Basic and Visual C# projects.

  • Location for backup
    Specifies the location of the backup files. The location can be a folder on the computer or a UNC path, but not a URL.

  • Browse
    Displays the Select backup folder dialog box, which lets you navigate to the folder where you want to put the backup files.

Ready to Convert Page

On this page, you can review a summary of the conversion options that you have selected and then start the conversion.

Confirm that the solution and all projects are listed. If you specified a backup location, confirm that it is correct. All converted solutions or projects are created in the same location as the current solution or project (in-place conversion).

To change the conversion information, click Previous to return to the Choose Whether to Create a Backup page.

Conversion Complete Page

On this page, you are informed whether the conversion was completed successfully. If any projects were not converted, they are unloaded and marked (unavailable) in Solution Explorer..For information about the status of each file, select the check box to show the conversion report when the wizard is closed.

Conversion Report

The conversion report provides information about the status of each file in the solution or project after conversion. The conversion report is located in the root directory for the solution or project.

If any project cannot be converted, it is unloaded and marked (unavailable) in Solution Explorer. In this situation, address the problems indicated in the conversion report and then try to reload the projects. When you try to reload projects, the Conversion Wizard starts again. The errors that might occur are as follows.

  • Error creating backup file
    A backup copy of the solution file cannot be created. Check whether there is already a file that has the same name.

  • Error creating backup of project file
    A backup copy of the project file cannot be created. Check whether there is already a file that has the same name.

  • File is not writable
    The file is read-only or is located on a read-only network share. Source-controlled files that are exclusively checked out by another user are read-only.

  • Internal Non Fatal Error
    An error has occurred with Visual Studio. To try to repair Visual Studio, in the Add or Remove Programs dialog box, select the product you have installed and then click Change/Remove.

  • Unable to open project file to perform upgrade
    The project file cannot be opened. Check whether the project file has been opened and locked by another application.

  • Unable to parse project file
    The project file is corrupted or is a version that cannot be upgraded.

  • Unable to save upgraded project file
    An internal error may have occurred.

  • Web project component not installed. Unable to upgrade project
    The project is a Web project. Visual Web Developer Express edition is the only Express edition that can be used to convert Web projects.

See Also

Tasks

How to: Upgrade Projects Created in Earlier Versions of Visual Studio

Walkthrough: Converting a Visual Studio 2005 Web Application Project to a Visual Studio 2008 Web Application Project

Walkthrough: Converting a Visual Studio 2005 Web Site Project to a Visual Studio 2008 Web Site Project

Walkthrough: Converting a Visual Studio .NET 2003 Web Project to a Visual Studio Web Application Project

Walkthrough: Converting a Visual Studio 2005 Web Site Project to a Visual Studio 2008 Web Application Project

Other Resources

Solution, Project, and File User Interface Elements