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

This walkthrough describes how to convert a Visual Studio 2005 Web application project to a Visual Studio 2008 Web application project. The Web application project format in these two versions of Visual Studio is similar. You can use the Visual Studio Conversion Wizard to simplify the process. For more information about Web application projects, see Web Application Projects Overview.

This walkthrough demonstrates the following tasks:

  • Opening the Visual Studio 2005 Web application project in Visual Studio 2008 and creating a backup of the project files.

  • Upgrading the .NET Framework version that the project targets.

  • Converting the project file and the Web.config file.

  • Testing the converted project.

Prerequisites

To complete this walkthrough, you will need:

  • Visual Studio 2008.

  • A Web application project that was created in Visual Studio 2005 that compiles and runs without errors.

Converting the Project and Upgrading the .NET Framework Version

To begin, you open the project in Visual Studio 2008, which starts the conversion. It offers you an opportunity to back up the project before converting it.

Note

It is strongly recommended that you back up the project. The conversion works on the original project files, which cannot be recovered if the conversion is not successful.

To convert the project

  1. In Visual Studio 2008, in the File menu, click Open, and then click Project.

    The Open Project dialog box is displayed.

  2. Browse to the folder that contains the project or solution file for the Visual Studio 2005 Web application project, select the file, and then click Open.

    The conversion wizard starts.

  3. Click Next.

    The Conversion Wizard prompts you to create a backup before converting the project.

  4. To create the backup, click Yes.

  5. Click Browse, select the folder in which the backup should be created, and then click Next.

  6. Click Finish.

    The backup starts.

    Note

    There might be significant delays as the Conversion Wizard copies files, with no updates or progress indicated. Wait until the process finishes before you continue.

    When the conversion finishes, the wizard prompts you to upgrade the targeted version of the .NET Framework for the project. 

  7. To upgrade to the .NET Framework 3.5, click Yes.

    It is recommended that you leave selected the check box that asks whether you want to upgrade all Webs in the solution.

    Ifyou upgrade to .NET Framework 3.5, the project's Web.config file is modified at the same time as the project file.

    Note

    You can change a project's .NET Framework version manually later. To do so, in Visual Studio open the property pages for the project, click the Application tab, and then select a new version from the Target Framework list.

  8. Click OK.

    The wizard displays status information about the conversion.

  9. Click Close.

Testing the Converted Project

After the conversion has finished, you can test the project to make sure that it runs. This will also help you identify code in the project that must be updated.

To verify that the project runs

  1. If you know about changes that are required in your code to run with the new version of the .NET Framework, make those changes.

  2. In the Build menu, click Build.

    Any missing references or other compilation issues in the project are displayed in the Error List window.

  3. In Solution Explorer, right-click the Web page that will be used to launch the application, and then click Set as Start Page.

  4. On the Debug menu, click Start Debugging.

    If debugging is not enabled, the Debugging Not Enabled dialog box is displayed. Select the option to add a Web.config file that has debugging enabled, and then click OK.

  5. Verify that the converted project runs as expected.

Next Steps

If you want to convert a Visual Studio 2005 Web site project that contains AJAX features to Visual Studio 2008, the overall process is similar but requires additional steps. After converting the Visual Studio project, perform the steps that are described in How To: Upgrade an ASP.NET AJAX 1.0 Web Project to .NET Framework 3.5.

You might want to convert other types of projects from earlier versions of Visual Studio to Visual Studio 2008. For more information, see Overview: Converting Visual Studio Web Sites and Projects to Visual Studio 2008.

See Also

Tasks

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

Concepts

Overview: Converting Visual Studio Web Sites and Projects to Visual Studio 2008

.NET Framework Targeting for Web Sites

Migrating and Converting ASP.NET Web Sites