Recently I have been migrating a large solution from VS 2003 to VS 2005. In VS 2003 the solution was using Visual Source Safe but in VS 2005 it will be migrated to Team Foundation Server. At the same time of migrating, prior to putting the solution in TFS, an additional task was to reorganize the folder structure of the solution.
The migration portion has been pretty seamless by following this guide: Upgrading VS 2003 Web Projects to be VS 2005 Web Application Projects
The reason for moving the file structure around was that most of the solution was located at C:/development/solution but all the web projects were located at C:/wwwroot/inetpub/web projects and we wanted to centralize all the projects to one folder.
When moving a project you will want to have the solution closed in VS and then move the web project folder to where you want it. After you have moved it there are 4 changes that need to be made.
- Solution file (.sln)
Fine the line that defines the project you moved, it will look like this:
Project("{GUID}") = "Project Name", "path\to\Project.csproj", "{GUID}"
Change the path to the new relative path to your project.
- Project file of the project you moved (.csproj for c#)
Find the Project Reference section and change all the references to other projects to the new relative paths. A project reference looks like this:
<ProjectReference Include="..\ProjectFolder\Project.csproj">
- If the project is a web application you will need to change the physical path in IIS
- If any project references the moved project remove the refrence and re-create it for those projects. The best way to determine if you need to do this is just to compile the project and it will point out which projects reference the moved project.
If you have any other ways you have found to do this or have found any solutions to other issues with converting a project from VS 2003 to VS 2005 please post in the comments below.