Skip to main content

Posts

Showing posts with the label TFS 2015

Azure Pipelines–Consolidate all build output in one folder

Today I was working at a customer who was still using Team Foundation Server 2013(!) and the XAML build feature. We are helping them to move away (finally) from this very old version and bring them to Azure DevOps Server 2022. The migration itself went quite smoothly. We had to do an upgrade first to TFS 2015 but from there we could directly upgrade to Azure DevOps Server 2022. Great work from the team at Microsoft that created the Upgrade Wizard. I can only imagine what a challenge it was to create an upgrade process that works for so many versions. That being said it was not yet the end of our journey because we also had to reverse engineer and migrate all XAML builds to the new task based Azure Pipelines. We decided to first migrate the builds ‘as-is’. One (small?) difference between the XAML builds and the new build system is that the XAML build puts the build output for all projects in the same folder. How can we mimic this behavior using the newer build system? The first ...

TFS –Work item not visible on Product Backlog

After splitting out some Product Backlog Items in TFS into smaller ones, we noticed that they were no longer shown on one of the boards. What is going on? The problem was that the we created the new PBI’s as children of the existing PBI.  As a consequence TFS no longer shows the parent PBI’s as it only shows the leaf nodes by design. In this sample it means that the Requirement 1.0 PBI is not shown, only Requirement 1.0.1 & 1.0.2 are visible on the board:

TFS Build vNext: Build artifacts are not cleaned up on UNC file share

A while ago, I got a message from one of my customers mentioning that their build servers were running out of disk space. As they had a lot of teams and projects and each of these projects had at least a CI, Nightly and Release build, the number of build artifacts was growing at a large pace. To keep this under control, we reconfigured the build retention policies for all our builds. I removed most of the old CI builds and we were good to go, at least that was what I thought… One week later, they called me again saying that one of the build server was again running out of disk space. I double checked all the retention policies, they all looked OK. However there were 2 things that I noticed: The builds that were consuming all the space were TFS vNext builds using the new task based system. XAML builds didn’t cause any trouble. Although I specified in the Build retention policy to only keep the latest build, I noticed in the drop folder that all previous builds were still ther...

TFS Build vNext : Running your JavaScript unit tests as part of your build process

Thanks to the Chutzpah test adapter , you can run your QUnit, Jasmine or Mocha unit tests inside Visual Studio using the built-in tools like the Unit Test Explorer. I’m using this VSIX for years, and it works great. But what if you want to run these same tests as part of your build process? I’ll explain the steps to get it up and running inside TFS Build vNext. Start by opening the solution that contains the test project in Visual Studio. Add the NuGet package for the Chutzpah test runner to your solution, this is a solution level package, so does not need to be associated with any project. Don’t forget to check-in the change into source control Now go to the TFS web portal. Open your build definition and add a Visual Studio Test build task: Configure the Test Assembly parameter inside the task to search for your JavaScript tests. All my JavaScript tests have ‘test’ as part of their filename so I used the following pattern; **\$(BuildConfiguration)\*...

TFS–User \ needs the 'ManageBuildResources' permission to add, update, or delete the build resources on the server.

When trying to install and configure a XAML Build controller I got the following error during the validation step: User <domain>\<username> needs the 'ManageBuildResources' permission to add, update, or delete the build resources on the server. Ok, no problem. I know that to configure the XAML Build and link it to a specific collection you need to be part of the Project Collection Administrators or Project Collection Build Administrators group. So I opened up the TFS Administration Console, browsed to the Collection where I want to add a build controller and clicked on Group Membership . The Global Groups window is loaded and here I can add the user(Click on Properties … –> Add ). Unfortunately this didn’t solve the problem. Although I had added the user to the correct groups, the error keeps appearing… However when I added the user to the same groups through the web portal, it did work. Strange! Open the Web Portal Go the Administration site Select t...

Team Foundation Server Administration Console: Index is out of bounds.

Got an email this morning from a customer asking me if I had seen the following error message before when opening the XAML Build Configuration inside the  TFS Administration Console: “Index 10985 is out of bounds.” This is an error I had never seen before. The thing is that the system itself was working as expected. I asked to take a look at the logs. There we noticed that an enormous amount of event messages were generated. Could this be causing the issue? And indeed after we cleared the event log, the XAML Build configuration appeared again. On the screen some Events related data is shown, probably this couldn’t handle the large load of messages…

Upgrading TFS–Don’t change the language of your TFS deployment during upgrade

I helped a customer upgrading their existing TFS 2010 environment to TFS 2015. Where the old version of TFS was using the English bits, for the 2015 installation they provided me the Italian installation media. When I started the configuration process to trigger the upgrade, the installation wizard gave the following warning: OK, it’s just a warning I thought, what harm could be done? So I clicked on the checkbox next to “ I have read the above warning and would like to continue anyway ”? Turns out, that this was not one of my brightest ideas . A few hours into the upgrade process, a failure popped up; [Info   @19:00:17.421] Executing step: 'Add Process Templates' ConfigurationProcess.AddProcessTemplates (716 of 765) [Info   @19:00:17.439] Loading process template: Deploy\ProcessTemplateManagerFiles\1033\MsfAgile\Metadata.xml [Error  @19:00:17.476] Value cannot be null. Parameter name: input [Info   @19:00:17.509] System.Ar...

TFS Build Test Task–How to exclude a set of tests

The Test Task in TFS Build allows you to specify which assemblies should be searched for (unit) tests. By using the Test Filter criteria, you can further filter the set of Tests you want to be executed: Based on the Tooltip you get the impression you can only specify which tests to include based on things like TestName, TestCategory, … But under the hood there is a lot more possible. You can not only include tests(using ‘=’), but also exclude tests(using ‘!=’), execute a contains check (using ‘~’) and group subexpressions (using ‘( <subexpression>)’). Here is a short sample where I exclude all PerformanceTests, include tests with Priority 1 and where the name contains the word ‘UnitTest’:

TFS Build: Failed to activate Xamarin license.

While helping a customer setting up a release pipeline for their Xamarin Mobile applications, I noticed that their CI(Continuous Integration) build was failing for some time. When opening the build results I saw the following error message: “Failed to activate Xamarin license. {"code":-3,"message":"Could not look up activation code."}” The build was failing on the Activate Xamarin license step: The acquisition of Xamarin by Microsoft made this license check obsolete, so just remove it and  you are good to!

Creating a release pipeline for your mobile applications

I’m currently working on a release pipeline for our mobile applications, making it easy to build, deploy and test the mobile solutions we are creating on top of the Xamarin platform. Everyone who ever tried to publish a mobile application to a store(Apple AppStore, Google Play Store, Microsoft App Store,…) knows that it is cumbersome process requiring things like certificates, keystores, a lot of configuration work and so on… To optimize the process we went fully automated by using a combination of the following tools: Visual Studio Team Services Hosted Build Service MacInCloud Xamarin Test Cloud HockeyApp A great help during our journey was the DevOps blog series by Richard Woollcott: Xamarin DevOps VSTS – Getting Started: http://www.thexamarinjournal.com/xamarin-dev-ops-with-vsts-getting-started/ Xamarin DevOps with VSTS - Setup iOS CI Builds With MacinCloud: http://www.thexamarinjournal.com/xamarin-dev-ops-with-vsts-setup-ios-ci-builds-with-macinc...

VSTS Build–Private Build slots; you only get one for free!

By default when you are using VSTS(aka Visual Studio Online), you get the following extra services as part of your subscription: Build and Deployment : Use this task-based service to create, queue, and monitor cross-platform builds. Use Hosted Agents that Microsoft runs, or Private Agents that you run so that you can install custom software. Build(XAML)/ Build and Deployment: Create build definitions  and run them in Visual Studio Team Services. Configure builds to run on demand at specific intervals, or for continuous integration (CI). Builds are charged per minute for the actual amount of computing time used to build your project. Cloud-based Load Testing : Create load tests using Visual Studio Ultimate 2013, Visual Studio Enterprise 2015, or later. Run those tests in Visual Studio Team Services. Load tests are measured and billed in virtual user minutes: the number of virtual users multiplied by the number of minutes that you set up for the load test run...

TFS Build–How to set log verbosity

After helping a customer upgrade to TFS 2015, they switched there existing build templates to the latest TFS (XAML) build process template(TfvcTemplate.12.xaml). However after doing that, they noticed that they could no longer change the log verbosity of the build. Starting from TFS (XAML) Build 2013 this is no longer necessary as the build diagnostics is always switched on. The easiest way to see the diagnostics is to browse to the web portal, open a build result and click on the Diagnostics tab:

TFS Build: Running your JavaScript unit tests during build

To run our JavaScript unit tests(you have them right?) inside Visual Studio we are using Chutzpah . Chutpzah is a JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha, CoffeeScript and TypeScript(!). Chutzpah has a test adapter for the Visual Studio Unit Test Explorer which makes it possible to run your JavaScript unit tests among your other tests. This week I spent some time in making these tests also work on the build server. Here are some of the lessons I learned among the way: Tip 1  - Add the Chutzpah nuget package as a reference to your unit test project Add the Chutzpah nuget package to the project that contains your JavaScript unit tests. This NuGet package contains all required DLL’s and tooling to be able to run your JavaScript tests. By using this approach you don’t need to install the Chutzpah test adapter on your build server or specify the location of your test adapter. The TFS Build testing tools will automatically detect...

Migrating from TFS Version Control to Git–Follow-up

A few months ago, I blogged about the Git-TF tool and Git-TFS tool I have been using to migrate TFSVC repositories. Last week I noticed a blog post by Richard Fennell from Black Marble where he describes in detail the steps needed to migrate a TFS VC team project to a Git team project. He not only talks about migrating the source code but also about migrating work items, retaining changesets, test plans and suites. He is using the same toolset I have been using but provides a lot more detail. So certainly worth a read… And of course, before I forget, here is the link to the article: https://www.microsoft.com/en-gb/developers/articles/week03aug14/migrating-a-tfs-tfvc-based-team-project-to-a-git-team-project/

Team Foundation Server: Migrate the TFS warehouse to a different server

Moving the TFS warehouse to a different server is not that hard and can be done with a few steps: Log in on the TFS server and open the TFS Administration console Go to the Reporting tab Click on Edit and click OK to stop all running jobs. Change the server name and instance to your new SQL server on the Warehouse and Analysis Services tab Click on Test Connection . It should succeed and display a message saying that the database does not exist but will be created. Click on Start Jobs .

Team Foundation Server 2015–Create a new Team Project from the web interface

For a long time, the only way to create a new Team Project in TFS on premise was through Visual Studio. With the introduction of Visual Studio Team Services(VSTS), an option was added to create your Team Project directly from the web interface. Unfortunately this feature was only available in the online version and I couldn’t find the same option on premise… or at least this was what I thought. Recently I discovered the following option inside the web interface(look at the last option at the bottom): Yes! The option is finally available. I have no clue when it was added, but I’m glad it’s there… When you click on it, the New team project window is shown: Note that you cannot create and configure Reporting Services and Sharepoint integration for your team project, if you decide to create your team project through the web interface.

TFS 2015 Update 2–Build badge

After upgrading to TFS 2015 Update 2, a build badge appeared on the Code hub: When you click on it, you can create a new build definition that will be linked to the code and the build badge. Unfortunately I couldn’t find a way to select an existing build definition instead. For most of my projects, a build definition already exist and I would prefer to use that one instead of creating a new one. Anyone who knows if this is possible and how this can be done?

TFS Work Item improvements

Work Items are a core concept of Team Foundation Server, representing any kind of  project related work like ‘Bugs, Tasks, Change Requests, …’. Work Items really are the glue between every aspect of TFS bringing a lot of information together. Unfortunately there were 2 features missing that limited the experience and usefullness of Work Items: You cannot change Work Items from one type to another. E.g. a bug work is created that after investigation turns out to be a change request. You cannot move Work Items from one Team Project to another. But good news! In the VSTS release notes from April 13 , these features were finally added! Change work item type You can now easily change the type of a work item, or multiple work items. Simply select your preferred type, add a comment, and hit change. The form will update as a result of the selected type and you will have a chance to review before saving to commit the change. Change type is also an option during a ...

TFS 2015–API documentation

TFS 2015 offers a rich (REST) API that can be used to manipulate and automate almost every aspect of Team Foundation Server. If you don’t know where to look for the documentation, here is the link https://www.visualstudio.com/en-us/integrate/api/overview . More information: Getting started: https://www.visualstudio.com/integrate/get-started/rest/basics   .NET client libraries: https://www.visualstudio.com/en-us/integrate/get-started/client-libraries/dotnet