Connect to Team Projects

Before you can interact with resources that are stored in Visual Studio Team Foundation Server, you must first connect to a team project. Each workspace in Eclipse is associated with a single instance of Team Foundation Server. Additionally, if you connect to Visual Studio Team Foundation Server 2010, the Eclipse workspace is associated with a single team project collection. If you are working on multiple Eclipse projects that are on different instances of Team Foundation Server or in different team project collections, you must have one Eclipse workspace for each project. You can work with multiple team projects if they are on the same instance and, for Visual Studio Team Foundation Server 2010, in the same team project collection.

In this topic, you connect to an existing team project to access one or more Eclipse projects that are already managed by version control. If you instead want to put a new Eclipse project under version control in an existing team project, see Placing Files under Version Control (Team Explorer Everywhere).

You must use a different Team Foundation client if you want to create a team project or a team project collection. For more information, see the following topic on the Microsoft Web site: Launching a New Team Project.

In this topic

Required Permissions

To connect to a team project, you must be a member of both the Team Foundation Valid Users security group and the Readers security group for the team project. If the necessary security permissions are set explicitly, your View server-level information permission must be set to Allow and your View project-level information permission on the team project must be set to Allow. For more information, see Team Foundation Server Permissions.

Connecting to Team Projects

Each Eclipse workspace that you define is associated with a single instance of Team Foundation Server and a single team project collection (for Visual Studio Team Foundation Server 2010). To connect to a different instance, you must connect from a new Eclipse workspace and then import one or more Eclipse projects into that workspace. To connect to a different team project collection, you must either remove all of the Eclipse projects from your workspace that are bound to Team Foundation, or you must connect from a new Eclipse workspace.

Create an Eclipse Workspace

  1. On the File menu, point to Switch Workspace, and then click Other.

    The Workspace Launcher dialog box appears.

  2. In Workspace, type the path and name of the workspace that you want to create.

    You can also click Browse.

  3. Click OK.

    The Eclipse client closes and reopens to load the new workspace. The Welcome page appears.

  4. Click Workbench.

    An empty Project Explorer appears. Next you must import your Eclipse project from Team Foundation Server.

Import an Eclipse Project from Team Foundation Server

  1. On the File menu, click Import.

    The Import dialog box appears.

  2. In Select an import source, type team to filter the list to the Team node.

    You can also expand the Team node manually.

    Note

    In older versions of Eclipse, this list might be flat, instead of hierarchical.

  3. In the list, click Microsoft Team Foundation Server.

  4. Click Next.

    The Import Project from Team Foundation Server dialog box appears.

  5. Specify the server instance that hosts the team project to which you want to connect.

    If the server to which you want to connect is not listed, you can add it. For more information, see Add an Instance of Team Foundation Server.

  6. In the Team Project Collections list, click the collection that contains the team project to which you want to connect.

  7. In the Team Projects list, select the check box for each team project to which you want to connect, and then click Next.

  8. On the TFS Workspace page, specify the Team Foundation Server workspace that you want to use for version control, and then click Next.

    Note

    You can optionally click Edit on the TFS Workspace page to configure the working folders. You can specify whether each folder is active or cloaked. Active folders will be copied to your local Eclipse workspace, and cloaked folders will not. You can also specify local folders for each working folder.

  9. On the Project Selection page, in the Import Project(s) list, specify the Eclipse project or projects that you want to import.

    To import multiple Eclipse projects, highlight each project that you want to import. For Eclipse projects, you must select the folders that contain the .project file. The projects are not imported if you instead specify the parent folder.

    Note

    To highlight multiple project folders, you can hold down CTRL and click the folders. You can highlight a range of folders if you hold down SHIFT and click the first and last folder in the range that you want to import.

  10. (Optional) You can perform any of the following steps:

    • Click the Save button to export the specified Eclipse projects to an XML file.

      You can send that XML file to other users on your team, which might be useful if you must import many Eclipse projects into your workspace.

    • Click the Load button to import a list of Eclipse projects from an XML file.

    • Select the Add project to Working Set check box if you want to group related Eclipse projects in a container that is called a working set.

      This grouping affects only how Eclipse projects appear, not working folders.

    • Select the Show the New Project Wizard for folders that are not Eclipse Projects check box if you want to create an Eclipse project from each of those folders.

      The wizard appears only for selected folders that are not already Eclipse projects.

    • Select the Perform a Force Get Latest of files in the selected projects check box if you want to force a download of all items from the server, even if they already exist on the local file system. By default, the most recent versions of files are retrieved if they do not already exist on the local file system. You should need to select this check box only if you already have set working folder mappings for the specified folders in the Team Foundation Server workspace but the local copy is somehow corrupted.

      Note

      You can always get the most recent version of your files after you complete the import operation. For more information, see Getting a Local Copy of Files from the Version Control Server (Team Explorer Everywhere).

  11. Click Next.

  12. On the Confirmation page, review the projects that you specified to import. If the list is correct, click Finish. If you must make corrections, click Back.

    The specified Eclipse projects appear in Project Explorer or Package Explorer. You must manually open Team Explorer to display the associated team project. For more information, see Open Team Explorer.

Reconnecting to an Eclipse Workspace

If you already have one or more Eclipse workspaces on your local computer that are associated with an instance of Team Foundation, you can quickly reconnect by switching to one of those workspaces.

If you must frequently access different team project collections or different instances of Team Foundation, you can create a single Eclipse workspace that contains no Eclipse projects that are bound to Team Foundation. From this workspace, you can connect to any instance or team project collection if you click Add Existing Team Project on the Team Explorer toolbar.

To reconnect to an Eclipse workspace that is associated with an instance of Team Foundation Server

  • On the File menu, point to Switch Workspace, and then click the Eclipse workspace to which you want to reconnect.

    The Eclipse client closes and reopens, and the Eclipse workspace that you specified loads. When the workspace loads, the connection to the associated instance of Team Foundation Server is automatically created.

Resolving Problems Connecting to Team Foundation Server

If you experience problems connecting to Team Foundation Server from the Team Foundation Server plug-in for Eclipse, Team Foundation Server may not be running, the network might have a problem, or you may not have sufficient permissions. Perform the following actions to try to resolve the connection issue:

  1. Verify whether you have sufficient permissions for the actions that you are performing. If the errors that you receive indicate read-only or blocked actions, you may not have permission to act on the data.

    For more information, see Team Foundation Server Permissions.

  2. If a red X icon appears on the Documents node in Team Explorer, the Team Foundation Server plug-in for Eclipse has lost communication with SharePoint Products. You may also notice that the list of individual documents that appeared under the Documents node has disappeared. Any of the following conditions can cause a loss of communication:

    • The local computer is not connected to the network. To resolve this issue, confirm that the local computer is plugged into the network and can access network resources.

    • The server that hosts SharePoint Products is offline, or the computer network is not operating. To resolve this issue, contact the administrator for SharePoint Products to confirm that the server is available on the network.

    • The permissions that are granted to your user account in SharePoint Products are not sufficient to access the team portal site. Contact the administrator for SharePoint Products, and request that your user account be added to the Contributor group. Your project management may also be able to grant you the required permission.

  3. If a red X icon appears on the Reports node in Team Explorer, you might not have permissions to access the reports, or the Team Foundation Server plug-in for Eclipse might have lost communication with the server that hosts SQL Server Reporting Services. In these instances, check with your project administrator to make sure that you have permissions to access the Reports node and that the server that hosts Reporting Services is running.

    A red X icon appears next to the Reports node if both of the following conditions are true:

    • The Team Foundation Server plug-in for Eclipse is running on the same computer as Reporting Services.

    • You are not logged on as an administrator, or enhanced security is enabled for Internet Explorer.

    To correct these issues, log onto your computer as an administrator, or open Internet Explorer, open Internet Options, click the Security tab, and clear the Enabled Protected Mode check box.

  4. Verify whether network connections on your computer are functioning correctly. Try to run other applications that also require network connections. If they also have problems, you probably have a network problem.

  5. Verify whether your team project has been moved to another team project collection in Team Foundation Server. If it has been moved, you must create a connection to the new server name.

  6. Verify that the associated team project collection is not offline.

    This symptom applies only to Visual Studio Team Foundation Server 2010.

  7. Verify that the proxy server settings are correct.

    If you must use a proxy server to access your instance of Team Foundation Server, you configure the proxy information on the Proxies tab in step 5 of the import procedure in Connecting to Team Projects earlier in this topic. If you configured a proxy server for your host computer but your instance of Team Foundation Server is on your local network, you should set no proxy server on the Proxies tab.

    By default, the Team Foundation Server plug-in for Eclipse will try to connect by using the proxy server for the system if such a server is configured.

See Also

Other Resources

Getting Started with Team Explorer Everywhere and Team Foundation Server

Placing Files under Version Control (Team Explorer Everywhere)

Getting a Local Copy of Files from the Version Control Server (Team Explorer Everywhere)