tfs-2015
TFS 2015 REST API Authentication
The OAuth mechanism is used against the VSO api at the time of writing this as you’ve seemingly identified. official docs for VSO OAuth tokens here. For on-prem however, the following is required: Via a javascript client (note I’m using jquery for the ajax request here) Since alternative creds or token based auth isn’t available … Read more
How to fail the build from a PowerShell task in TFS 2015
I’ve created a very simple script: Write-Error (“Some error”) exit 1 Save this as a PowerShell script. Create a new Empty Build definition and only add one PowerShell task that points to your script. When I do this I get a failed build with the following error: 2015-12-30T10:27:29.4872452Z . ‘C:\a\1\s\script.ps1’ 2015-12-30T10:27:29.6780242Z Executing the following powershell … Read more
How to get TFS2015 Build (Build.vnext) and NuGet package restore to use custom package sources
Alternatively you could also add a NuGet Installer build step before the Visual Studio Build step in your build configuration to restore all NuGet packages. There you can pass the location of your private repo as argument to nuget.exe: -source “https://www.nuget.org/api/v2/;http://mynugetserver”