How to: Reconnect a Microsoft Project File to Team Foundation Server

Visual Studio 2008

If you make a change to Team Foundation Server that changes the URL in any way, your change breaks the association between Microsoft Project files and Team Foundation Server. For example, if you change the name of the Team Foundation Server or change the port number, any Microsoft Project files associated with that Team Foundation Server will become disassociated. This is because the Team Foundation Add-in for Microsoft Project stores the URL of the server when you save the file. If the URL changes in any way, the file can no longer be connected to the server. The only way you can repair a file is to re-create it.

The following procedure describes how to re-create a Microsoft Project file and connect it to the correct Team Foundation Server. As you follow the procedure, it is a good practice to print the old project file task sheet and Gantt chart to use as a reference as you work.

To re-create a project file, you create a new project file and get the same work items that were in the older project file.

To create a new project file that is based on the existing project file

  1. Create a new Microsoft Project file.

  2. Connect to the correct Team Foundation Server and team project.

    For more information, see How to: Connect to Team Foundation from Microsoft Excel or Microsoft Project.

  3. Open the old Microsoft Project file that is no longer associated with Team Foundation Server.

  4. From the View menu, click Team System Task Sheet.

  5. Select all the numbers in the Work Item ID column.

  6. From the Edit menu, click Copy Cell (or press Ctrl+C) to copy the numbers to the clipboard.

  7. Start Notepad.

  8. From the Edit menu, click Paste (or press Ctrl+V) to paste the ID numbers into Notepad.

  9. Modify the list of numbers so that they are in a comma-delimited list on one line.

    1. Place a comma after every number.

    2. Delete all carriage returns.

    The completed list of numbers should be comma delimited as in the following example:

    30,45,20,77,22,23

  10. From the Edit menu, click Select All.

  11. From the Edit menu, click Copy (or press Ctrl+C) to copy the comma-delimited list of numbers to the clipboard.

  12. Switch to the new Microsoft Project file that you created in step 1.

  13. From the Team menu, click Get Work Items.

  14. In the Get Work Items dialog box, select the IDs option.

  15. Paste the comma-delimited numbers from the clipboard by pressing Ctrl+V.

  16. Click the Find button to retrieve all the work items.

  17. Click OK

    The system retrieves and displays work items as tasks in the project file.

Next, you must re-create the local data stored in the old project file. This includes predecessors, tasks that are not published, and values from any columns that are not synchronized with Team Foundation Server.

To restore all additional project data

  1. Set both the old and new project files to the same Team System Gantt view.

    Using the same view in both files makes it easier to copy data consistently.

    • From the View menu, select Team System Gantt.

  2. If there are any tasks in the old project file that did not have a work item ID, copy them over to the new project file. Use the following steps to copy a task.

    1. In the old project file, click the task or resource ID number of the row to copy.

    2. From the Edit menu, click Copy Task.

    3. In the new project file, select the row where you will insert the task.

    4. From the Edit menu, click Paste.

  3. In the new project file, change the order of the tasks so that they match the old project file.

    If the order is already correct, you can skip this step.

    • To move a task, click the task or resource ID number and drag it to the correct location.

  4. In the new project file, change the task hierarchy so that it matches the old project file.

    1. From the Insert menu in the old project file, click Column.

    2. In the Column Definition dialog box, set the Field name box to Outline Level, and then click OK.

    3. Repeat steps a and b for the new project file.

    4. Change the outline level values in the new project file so that they match the old project file. Use the outline level column from the old project file as a reference,

      NoteNote:

      You can also re-create the correct outline by using the indent buttons. For more information, see the Microsoft Project help.

  5. Copy the predecessor data from the old project file to the new project file.

    1. Select the Predecessors column in the old project file.

    2. From the Edit menu, click Copy Cell.

    3. In the new project file, select the Predecessors column.

      NoteNote:

      Be sure the task list is in the same order as the old project plan. Otherwise, the predecessor information will be incorrect when you paste it.

    4. From the Edit menu, click Paste.

  6. Read over the old project file and copy any additional relevant data that may be missing.

    For example, you must copy any notes on tasks individually.

  7. Save the new project file.

Community Additions

ADD
Show: