While in the process of setting up a new environment I thought I would share the steps I took to configure Visual Studio Code (VS-Code) with Visual Studio Team Services (VSTS) online.
Installation
- Navigate to: https://code.visualstudio.com
- Select the relevant version for your machine e.g. macOS or Windows x64 and click Download
- Double click on the installer, if it doesn’t automatically open, follow the wizard
- Open Visual Studio Code (VS-Code)
- Click on the Extensions icon (left hand side)
- Search for Visual Studio Team Services and click Install
Configuration
- Click on Source Control icon (left hand side)
- Click on Initialize Repository icon (top-left hand side)
- Select a folder in which to store the code. For example: C:\Code\Project
- Click Initialize Repository
- You will have two options to authenticate: Manually provide a Key or Automatically provide a key…
Manually create a VSTS access token
If you’re not prompted for your Username and Password, follow these instructions on how to create personal access tokens to authenticate access: https://docs.microsoft.com/en-us/vsts/accounts/use-personal-access-tokens-to-authenticate
For ease of use I would recommend using the Automatic approach, however here is how to manually create a VSTS access token.
- Sign in to either your VSTS account https://account.visualstudio.com
- from your home page; click on your profile icon and then security details
- Click Personal access tokens (left hand side) and Add
- Enter the following:
- Description: e.g. Bob’s VS-Code Win 10
- Expires in: e.g. 90 days
- Accounts: e.g. select the default
- Authorized Scopes: e.g. All scopes
- Click Create Token
- Make a copy of token, e.g. werwqefslz2hhldesdfwfwvsdafqfq2aadsfdpalaifa5ppuyikuik
- Back to VS-Code
- Enter the code…
Supporting information
- Download Visual Studio Code: https://code.visualstudio.com
- Quick Start: Team Foundation Version Control (TFVC) Support: https://github.com/Microsoft/vsts-vscode/blob/master/TFVC_README.md#quick-start
- Authenticate access with personal access tokens for VSTS and TFS: https://docs.microsoft.com/en-us/vsts/accounts/use-personal-access-tokens-to-authenticate
- Walkthrough of the Team Services extension for Visual Studio Code: https://www.youtube.com/watch?v=sk6LrzQX4P8&feature=youtu.be
You must be logged in to post a comment.