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 ASP.NET Web Application Projects.
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.
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.
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
In Visual Studio 2008, in the File menu, click Open, and then click Project.
The Open Project dialog box is displayed.
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.
The Conversion Wizard prompts you to create a backup before converting the project.
To create the backup, click Yes.
Click Browse, select the folder in which the backup should be created, and then click Next.
The backup starts.
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.
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.
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.
The wizard displays status information about the conversion.
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
If you know about changes that are required in your code to run with the new version of the .NET Framework, make those changes.
In the Build menu, click Build.
Any missing references or other compilation issues in the project are displayed in the Error List window.
In Solution Explorer, right-click the Web page that will be used to launch the application, and then click Set as Start Page.
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.
Verify that the converted project runs as expected.
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.