Consume VSTS hosted NuGet packages in VS Code

Recently, I started using NuGet package hosting in Visual Studio Team Services. I quickly found that in order to consume those packages in Visual Studio Code on my mac, I had to perform a few extra steps outside of simply connecting to the package url, which I’ve outlined here.

  1. If you haven’t already done so, install the dotnet sdk
  2. Login to VSTS and navigate to the User menu > Security option:
  3. Create a Personal Access Token (PAT):
      • Enter a description for the token
      • Set the expiration to 1 year
      • Ensure the selected account is correct
      • Set either of the following Authorized Scopes:
        • Packaging (read and write)
        • Packaging (read)
      • Click the Create Token button
  4. On the Personal Access Tokens window, copy the PAT value:
  5. From a terminal, enter the following command:
    nuget sources add -Name <YOUR_REPO_NAME> -Source <YOUR_REPO_SOURCE_URL> -UserName <YOUR_EMAIL_ADDRESS> -Password <PAT_VALUE> -StorePasswordInClearText -ConfigFile ~/.nuget/NuGet/NuGet.Config
  6. After the command completes, you should see the following output:
    Package Source with Name: <YOUR_REPO_NAME> added successfully.

After you’ve performed these steps, you should be able to successfully install and restore your custom NuGet packages from your VSTS repo.

My MacBook Setup

After being inspired by Andrew Connell and Scott Gruber posting their MacBook setup instructions, I decided I would share my setup since I recently upgraded. The instructions below rely heavily on homebrew and are really more for quickly installing required pieces of software for development related tasks. All commands should be run from the terminal unless otherwise stated.

Standard Apps (mostly)

  • Install HomeBrew
    • /usr/bin/ruby -e "$(curl -fsSL"
  • Install Cask
    • brew tap caskroom/cask
  • Install Firefox Developer Edition
    • brew cask install firefoxdeveloperedition
  • Install Slack
    • brew cask install slack
  • install Git
    • brew install git
  • install Node + NPM
    • brew install node
    • npm config set prefix /usr/local
  • Install GitHub Desktop
    • brew cask install github
  • Install iterm2
  • Install dotnet cli
    • brew cask install dotnet
  • Install dotnet sdk
    • brew cask install dotnet-sdk
  • Install Java
    • brew cask install java
  • Install TEE (Team Explorer Everywhere)
    • brew install tee-clc
    • Follow this link to use tee with Java 9: TEE CLC not working on Mac – Expicon AB
        • Edit this file using the instructions from the link above: /usr/local/Cellar/tee-clc/14.123.1/libexec
        • tf eula
  • Install VS Code
    • brew cask install visual-studio-code
  • Install Sql Operations Studio
    • brew cask install sql-operations-studio
  • Install Visual Studio for Mac
    • brew cask install visual-studio
  • Install Docker
    • brew cask install docker
  • Install MS Office
    • brew cask install microsoft-office
  • Install Skype For Business
    • brew cask install skype-for-business
  • Install Brackets
    • brew cask install brackets
  • Install Acquia Dev Desktop
    • brew cask install acquia-dev
  • Install Image Magick
    • brew install imagemagick

Premium Apps

  • Install Reflector
    • brew cask install reflector
  • Install Sublime Text
    • brew cask install sublime-text
  • Install Alfred
    • brew cask install alfred
  • Install 1password
    • brew cask install 1password
  • Install Encryptme
    • brew cask install encryptme
  • Install Carbon Copy Cloner
    • brew cask install carbon-copy-cloner
  • Install Omni Focus
    • brew cask install omnifocus
  • Install Mind Node
    • brew cask install mindnode-pro
  • Install SQLPro Studio
    • brew cask install sqlpro-studio
  • Install Screens
    • brew cask install screens
  • Install Paragon NTFS
    • brew cask install paragon-ntfs
  • Install Parallels
    • brew cask install parallels
  • Install Hazel
    • brew cask install hazel
  • Install Clean My Mac
    • brew cask install cleanmymac
  • Install Bartender
    • brew cask install bartender
  • Install Adobe Creative Cloud
    • brew cask install adobe-creative-cloud
  • Install Coda
    • brew cask install coda
  • Install Transmit
    • brew cask install transmit
  • Install CodeKit
    • brew cask install codekit
  • Install Mamp
    • brew cask install mamp
  • Install Versions
    • brew cask install versions
  • Instal Balsamiq Mockups
    • brew cask install balsamiq-mockups

Don’t be trapped by dogma

Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma – which is living with the results of other people’s thinking. Don’t let the noise of other’s opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.

Steve Jobs