TFS 2017 Removing orphaned workspace with pending changes

After we migrated our TFS 2010 installation to latest TFS 2017 it turned out that there are some conflicts with the workspaces. Here is a simple solution how to handle such problems. The conflicts was mostly due to the facts that together with TFS migration we also created new account for all contributors. Old accounts were abandoned but the glorious TFS version control still h…

By Mirek on (tags: TF, TFS 2017, categories: tools, infrastructure)

Handling builds via Team Foundation Server 2017 REST API

In this post I am going to show you how to utilize the new TFS 2017 REST API. In particular you will see how easy is to list, queue and manage builds for your team project. The plan is to Authorize to TFS 2017 on premise and connect to its web rest api. Get a list of team projects For particular team project get a list of build definitions Queue particular build definition Chec…

By Mirek on (tags: build, HttpClient, REST, tfs, categories: infrastructure, web)

Signing ClickOnce with password protected PFX certificate

This time I had to find out how to make the TFS build step use a PFX certificate file to sign the ClickOnce manifest. It turned out to be quite a tricky task though. But let me first describe the situation. Normally when you want to sign the ClickOnce manifests you need to go the the project properties in Visual Studio and in Signing tab provide an appropriate certificate The c…

By Mirek on (tags: certificate, ClickOnce, deployment, Mage.exe, tfs, categories: tools, infrastructure)

Upload custom build task after TFS 2017 Update 1

Over a year ago I’ve posted a guide on how to upload a custom build task to Team Foundation Server 2015. The solution was based on a TFS REST api which allowed to manipulate build tasks easily. Things have changed since then unfortunately… Now in TFS 2017 after Update 1 this option is not available any more. The REST API is still there and you can get the json definition of the…

By Mirek on (tags: build, tfs, vNext, categories: tools, infrastructure)

TFS 2017 copy build definition template between team projects

Over a year ago I’ve presented a solution to copy build definitions between team projects in new Team Foundation Server 2015. That was a workaround for missing functionality in TFS, so there was no standard way to save the build definition as a template and reuse it outside the scope of current team project. Well, in TFS 2017 it hasn’t change yet… There is still no way to reuse…

By Mirek on (tags: build definition, Powershell, tfs, vNext, VSO, categories: tools, infrastructure)

TFS 2015 – Setting up build agent on separate machine

Recently we’ve installed and configured the Team Foundation Server on premise infrastructure. This was described here. In this post I would like to show you how to install and configure the build agent to work on a different machine separately from the TFS server, as it turned out to be quite tricky. My way to successfully set up the build agent for TFS 2015 was basically a try…

By Mirek on (tags: build, tfs, categories: tools, infrastructure)

TFS 2015 – Upgrade from TFS 2010 on new hardware

Few weeks ago I wrote a post describing how to set up the Team Foundation Server 2015 on premise. This time I will show you how to upgrade from TFS 2010. This is the current situation: I have TFS 2010 SP1 running on one server. The databases weight about 9GB together. Now the goal is to move the TFS to the new machine and upgrade it to TFS 2015. As it turned out the process of …

By Mirek on (tags: tfs, upgrade, categories: tools, infrastructure)

TFS 2015 – MSBuild in custom step

If you didn’t yet happen to create a custom build step for Team Foundation Server 2015 take a look at my previous posts here and here. Today I will show you the right (IMHO) way of calling MSBuild from the custom build step. I had a task to create a custom build step which took the list of projects names and has to publish a ClickOnce installers for them. It first searches for …

By Mirek on (tags: build, ci, msbuild, Powershell, tfs, categories: tools, infrastructure)

TFS 2015 build vNext – Upload directory to FTP

In previous post I showed you how to create a custom build step, upload and use it in the Team Foundation Server 2015. This time we will try to create more complex build task. This will be FTP uploader. Keep reading. There is already a step which gives you the possibility to upload files to FTP location and it comes out of the box with TFS 2015. This is called cURL and you can …

By Mirek on (tags: build, ftp, Powershell, tfs, categories: tools, infrastructure)

TFS 2015 build vNext - Deploy nuget package

If you have a nuget packages that you deploy from your source code and want to move to the TFS 2015, there are good news. Packing and publishing nuget packages is fully supported in vNext build definition. Let’s see how to achieve that. The goal is to pack the nuget package from a .csproj  project file, create the .nupkg and then publish it to the nuget server. Let’s go to…

By Mirek on (tags: nuget, package, tfs, categories: tools, infrastructure)