Azure Repos Extension for Visual Studio CodeThis extension allows you to connect to Azure DevOps Services and Team Foundation Server and provides support for Team Foundation Version Control (TFVC). It allows you to monitor your builds and manage your pull requests and work items for your TFVC or Git source repositories. The extension uses your local repository information to connect to either Azure DevOps Services or Team Foundation Server 2015 Update 2 (and later). Here is the Walkthrough of the Azure Repos extension for Visual Studio Code video that shows many of the features of the extension. PrerequisitesAzure DevOps ServicesIf you are using the extension with Azure DevOps Services, ensure you have an Azure DevOps Services organization. If you do not have one, sign up for Azure DevOps Services. Team Foundation ServerIf you are planning on using the extension with Team Foundation Server, you must be running Team Foundation Server 2015 Update 2 or later. Earlier versions of Team Foundation Server are not supported. Clone your Git repositoryWith Git, the extension uses the remote origin of your repository to determine how to connect to Azure DevOps 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 an Azure DevOps Services organization (or a Team Foundation Server instance), you may create a local repository (via Create your TFVC workspaceWith TFVC, the extension uses information about the current workspace to determine how to connect to Azure DevOps 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. The issue tracking support for Server workspaces is here. InstallationFirst, you will need to install Visual Studio Code To install the extension with the latest version of Visual Studio Code (version 1.13.1 is the latest as of this writing), bring up the Visual Studio Code Command Palette ( AuthenticationAzure DevOps ServicesIf you are connecting to Azure DevOps Services, you will need a personal access token (PAT). With the release of v1.121.0 of the extension, you have a choice of whether you would like to create a token yourself manually and provide it when prompted, or use a new experience in which you are authenticated to Azure DevOps Services using your web browser. In the new experience, a personal access token is still created on your behalf but only after you are authenticated. The created token has All Scopes permissions but can be updated in your profile settings. Both tokens (manual or the new experience) are stored securely on your machine. Manual Token CreationShould you wish to create a personal access token yourself, go here to read how. You can also view our video on how to do the same.
Browser-based AuthenticationWhen using the new authentication experience, you will be prompted to copy a device code used to identify yourself to the authentication system. Once you accept the prompt to begin authentication, your default web browser will be opened to a login page. After supplying that device code and having it verified, you will then be prompted to authenticate with Azure DevOps Services normally (e.g., username and password, multi-factor authentication, etc.). Once you are authenticated to Azure DevOps Services, a personal access token will be created for you and the extension will be initialized normally. To see what this experience is like, view this video. Team Foundation ServerIf you are connecting to Team Foundation Server, you will only need your NTLM credentials (domain name, server name and password). It is assumed that you have the proper permissions on the TFS Server. Details on how to connect to either Azure DevOps Services or Team Foundation Server are found in the next section. TFVC SupportOnce you have a local TFVC workspace available, you must configure the TFVC support in Visual Studio Code. You can find that information (including demo videos) in our TFVC documentation. Open a local Repository folderOnce you have installed the extension, open either the root folder or a sub-folder of the repository. Once an Azure DevOps Services or Team Foundation Server 2015 Update 2 (or later) repository is detected by the extension, you will need to provide your credentials (if credentials weren't already found). If you are required to provide your credentials, there will be an indicator in the status bar whose message will indicate that you need to sign in. The indicator looks like this: To sign in, run the Once your credentials are verified, the status bar indicators will be active and the remaining commands will
be ready to use. The stored credentials will be used for each connection to the server until they are either
removed by the Note: In order for the extension to be activated, a repository folder must be opened. The extension won't be activated if only a single file in the repository is opened. Status Bar Indicators
CommandsIn addition to the status bar integrations, the extension also provides several commands for interacting with
Azure DevOps Services and Team Foundation Server. In the Command Palette (
Secure Credential StorageWhen you run the How to disable telemetry reportingThe Azure Repos extension collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, add the following entry to Settings (File > Preferences > Settings):
Polling intervalThe polling interval for the pull request and build status bar indicators defaults to ten minutes. You can change this value in the Visual Studio Code Settings by adding an entry like the one below. The minimum value is 10.
LoggingThere may be times when you need to enable file logging to troubleshoot an issue. There are five levels of logging (
The log file will be placed at the root of your workspace and will be named Private buildsIn order to facilitate more debugging, you may be provided with a "private build" of the extension. The private build will
likely come in the form of a .ZIP file named similarly to the VSIX that gets deployed to the Marketplace (e.g., To install the private build, you must uninstall the previous version and then side load the new one. First, remove the .ZIP extension from the file and then follow these instructions to install the VSIX. Pinned Work Item QueriesYou can customize the pinned work item query by adding the following in the Visual Studio Code Settings. You need to provide the following:
Using Query Text
Using Query Path
You can also create a global pinned query which will be the default if you have not configured one by replacing dev.azure.com/organization with global in the previous examples. Using External (non-Microsoft) Source RepositoriesStarting with version 1.113.0, you can now use the extension with repositories that are not hosted with either Azure DevOps Services or Team Foundation Server. You will be able to monitor your builds (for a specific build definition) and work items that are hosted with either Azure DevOps Services or Team Foundation Server by specifying your server information. To do this, set the following settings in VS Code. It is recommended that you set these in your Workspace Settings (and not User Settings). You will, of course, still need to authenticate (provide credentials). Note: If you're using a Team Foundation Version Control repository, you should not use these settings. Have a look at the TFVC Quick Start.
To determine your build definition id, open the build summary for the build you'd like to monitor and grab the value of the buildId= parameter in the url. SupportSupport for this extension is provided on our GitHub Issue Tracker. You can submit a bug report, a feature request or participate in discussions. Contributing to the ExtensionSee the developer documentation for details on how to contribute to this extension. Code of ConductThis project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. Privacy StatementThe Microsoft Visual Studio Product Family Privacy Statement describes the privacy statement of this software. LicenseThis extension is licensed under the MIT License. Please see the third-party notices file for additional copyright notices and license terms applicable to portions of the software. |