If you have to maintain a farm of build servers it can be a pain to keep them updated will the latest versions of all the tools needed, and if you have a few servers you will have scripts to automate this. Normally chocolatey does a great job of this for me, however scripted update of VS build tools using chocolatey does not seem to work. The MS installer cli docs for this stuff are fairly comprehensive, but lacking coverage of just the build tool update scenario at the moment.

The following snippet of powershell will download the latest version of the VS 2017 build tools bootstrapper to a temp folder, and then use that to to actually update the build tools. using the currently installed version of the bootstrapper seems to struggle to update itself first in all versions, so a fresh download is more reliable


Invoke-webrequest -uri  https://aka.ms/vs/15/release/vs_buildtools.exe -OutFile c:\temp\vs_buildtools.exe
c:\temp\vs_buildtools.exe update --wait --passive --norestart --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"

Note that above I have hard coded to the default install path of build tools so your mileage may vary.

UPDATE: 8th Feb 2017

It seems like the latest Build Tools bits no longer include the Nuget build targets (Microsoft.VisualStudio.Component.NuGet.BuildTools) by default. In fact the entire Build Tools product seems like it is under heavy development as lots of new options are appearing in each release. If you rely on nuget pack actions configured in your csproj file then you will need to also install that extra workload like so:

Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList 'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" --passive --add Microsoft.VisualStudio.Component.NuGet.BuildTools' -Wait -PassThru

Hope that helps.