TFS 2017 NuGet publisher task fails with 401 – Unauthorized exception

With TFS 2017, we have added the new Package Management feature, which lets you host your NuGet packages in TFS. Here is a walk-through of how you can use team build to restore and publish NuGet packages, by making use of the NuGet Publisher task Recently, I have been working with a customer who was…


XAML build service fails with: “The type initializer for LibGit2Sharp.Core.NativeMethods’ threw an exception”

I recently worked on a case where the TFS XAML build service was failing with the below exception: The type initializer for ‘LibGit2Sharp.Core.NativeMethods’ threw an exception. The setup included a TFS 2015 server and a separate machine running the XAML build service. The issue was noticed when the builds began to get stuck in the…


vNext Build fails with error message ‘Cannot find solution’ because it does not exist.

Issue Recently we have seen some cases where a vNext build, when queued, would fail with a message like below: · Cannot find path ‘<build agent working folder>\<team project name>\path to solution> because it does not exist. ·        MSBUILD : error MSB1009: Project file does not exist. ·        Unexpected exit code received from msbuild.exe: 1…


Building ClickOnce apps using build vNext

We had earlier posted a blog that explains how to build ClickOnce applications using XAML build definition http://blogs.msdn.com/b/tfssetup/archive/2015/09/15/build-and-publish-a-clickonce-app-using-team-build-vso.aspx Based on popular demand, we’ll now see how to build ClickOnce Apps using Build vNext, on-prem/VSO First, create a new build definition of Type vNext. We have two steps – Visual Studio Build and Publish Build Artifacts…


Enabling Code coverage from build definition in TFS

This is a quick walkthrough of how to enable Code coverage from a build definition in TFS. Environment: TFS 2013.4 Steps: a. Create a build definition. b. In Tests section, click on the highlighted ellipses button as below: c. Below dialog box will popup, click on the edit button highlighted below: d. Then ensure the,…


TFS build fails to trigger coded UI tests.

We have come across an issue where TFS build fails to trigger coded UI tests, based on how the Test Settings file is specified in the build definition. The failure message returned is as below: Error calling Initialization method for test class <projectname>.CodedUITest1: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set…