How can I connect to on-premises TFS using Visual Studio Code?

前端 未结 2 858
日久生厌
日久生厌 2021-01-21 16:21

How can I connect to on-premises TFS using Visual Studio Code? Is that possible the same way as in Visual Studio?

相关标签:
2条回答
  • 2021-01-21 16:53

    First you need to install the official Azure DevOps Extension for Visual Studio Code which released by Microsoft.

    It supports both TFVC and GIT version control type.

    Clone your Git repository

    With Git, the extension uses the remote origin of your repository to determine how to connect to Team Services (or your Team Foundation Server), in most cases you will need to have a Git repository already cloned locally. If you intend on cloning an existing repository, do so before proceeding. If you do not have a Git repository cloned locally but already have a Team Services account (or a Team Foundation Server instance), you may create a local repository (via git init) and once you set the "origin" remote for that local repository, the extension will detect the change to the remote and attempt to contact the Team Services account (or Team Foundation Server).

    Create your TFVC workspace

    With TFVC, the extension uses information about the current workspace to determine how to connect to Team Services (or your Team Foundation Server). Workspaces can be created using the Visual Studio IDE, Eclipse or with the JetBrains IDEs (e.g, Android Studio, IntelliJ).

    Note: At this time, you will need to have a local TFVC workspace already available on your local machine. More information about the difference between the two types (and how to determine which one you're using) can be found here.

    You could also take a look at below videos to help get you started using the extension quickly:

    • Set up the Team Services extension for Visual Studio Code - If you haven't used the extension before, this video will show you how to set it up, create a personal access token and get up and running.
    • Walkthrough of the Team Services extension for Visual Studio Code - This is a walkthrough of most of the features of the Team Services extension.
    • TFVC Source Code Control for Visual Studio Code - This video shows you how to set up the TFVC support on Windows and demonstrates much of the functionality available for Team Foundation Version Control.

    Above is for Windows machine, if you are working on Mac, please take a look at this answer.

    Note:

    1. VS Code will leverage your machine's Git installation, so you need to install Git first before you get these features. Make sure you install at least version 2.0.0.

    2. You need Team Foundation Server 2015 Update 2 or later.

    0 讨论(0)
  • 2021-01-21 17:03

    If you need to use Git, all you need is Visual Studio Code. Git is a built-in feature.

    In order to also use TFVC you'll need to install an extension. You'll need Visual Studio Code and the Azure Repos Extension and a recent version of Team explorer and/or Team Explorer Command Line Client.

    To edit Azure Pipelines (available in Azure DevOps Server 2019), you'll need to also install this Azure Pipelines extension.

    The naming is a bit confusing, but these Azure DevOps extension also work with recent version of Team Foundation Server and Azure DevOps Server (new name).

    0 讨论(0)
提交回复
热议问题