Skip to main content

Posts

Showing posts with the label Team System

TFS Build error - System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.Administration.Interop.IAppHostWritableAdminManager'.

After replacing one of our build servers, we got the following error when trying to execute a custom XAML build Workflow activity: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.Administration.Interop.IAppHostWritableAdminManager'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FA7660F6-7B3F-4237-A8BF-ED0AD0DCBBD9}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155). at Microsoft.Web.Administration.ConfigurationManager.CreateAdminManager[TClass,TInterface](WebConfigurationMap webConfigMap, Boolean isAdminConfig) at Microsoft.Web.Administration.ConfigurationManager.CreateConfiguration(WebConfigurationMap configMap, String configPathToEdit, Boolean isAdminConfig) at Microsoft.Web.Administration.ConfigurationManager.GetConfiguration(String rawConfigurationPath, String cacheKey, ...

TFS Build - Agent 'AgentName' is using a deprecated version '1.105.7'

A colleague mentioned to me he was the following warning on our build server: Agent 'AgentName' is using a deprecated version '1.105.7'. You will not be able to use this version of agent with the next major version of Team Foundation Server. Migrate to the latest 2.x version of agent. For more information, see https://go.microsoft.com/fwlink/?linkid=851067 . I was suprised to see this as I recently updated all agents . Still I’m stuck with version 1 agents… It turns out that there are 2 types of agents: Windows specific agents having number 1.x cross platform agents having number 2.x The thing is that the Update All Agents button will only upgrade to a more recent minor version but will not do an upgrade to a new major version. If you want to upgrade to a new major version of the agent, you’ll have to uninstall the old agent and install the new one yourself.

tfignore file for .NET developers

I blogged earlier about the existence of the .tfignore file in Team Foundation Server source control similar to the .gitignore file in GIT. Still they are a lot of developerd who are unaware of the existence of this file. With the .tfignore file, you can configure which kinds of files are ignored by placing it in the folder where you want rules to apply. The effects of the .tfignore file are recursive. However, you can create .tfignore files in sub-folders to override the effects of a .tfignore file in a parent folder. Here is a good sample file to get started with: To automatically generate a .tfignore file In the Pending Changes page, in the Excluded Changes section, select the Detected link. The Promote Candidate Changes dialog box appears. Select a file, open its context menu, and choose Ignore this local item , Ignore by extension , Ignore by file name , or Ignore by folder . Choose OK or Cancel to close the Promote Candidate...

Taking screenshots of desktop applications using the Test and Feedback extension

Microsoft released a Test and Feedback extension for Chrome and Firefox as a replacement for the exploratory testing feature in Microsoft Test Manager. Earlier versions of this extension were rather limited in functionality but with the most recent version you can: Take screenshots of any application on your desktop(not only inside the current browser chrome) Take screen recordings and save them as videos Getting started Go to the Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=ms.vss-exploratorytesting-web Click on one of the links in the Supported Browser section I’m using Chrome, so I click on Install . You will be taken to Google Chrome web store in a new tab. Follow the steps from Chrome web store to install the extension. After the installation is done, you see a new icon on the top right in your browser, next to the address bar. When you click on the icon, a popup is shown. ...

Test Impact Analysis is back!

A loooong time ago in Visual Studio 2010 Microsoft introduced a great new feature Test Impact Analysis. Test Impact Analysis tries to predict based on your code changes which tests should be executed. In more recent versions of Visual Studio this feature disappeared…until now. Version 2 of the Visual Studio Test task reintroduces the “Run only impacted tests” checkbox. Checking this checkbox will automatically configure the Test Impact data collector to identify and run only the impacted tests. Remark: If you don’t see this option, check that you are not still using version 1 of the Visual Studio Test task: More information: https://blogs.msdn.microsoft.com/devops/2017/03/02/accelerated-continuous-testing-with-test-impact-analysis-part-1/

TFS–View Test Results for your Test Cases

I had a hard time yesterday finding out how I could see what Test Results are available for specific Test Cases. In case I ever need it again(or someone else is as bad in finding it’s way through the TFS interface as me), here are the steps: Open the TFS web portal and go to a specific Team Project. Go to the Test Tab Select a Test plan from the dropdown on the left and click on the Test suite that contains your test cases On the right you see the list of available test cases Click on the Show/Hide details button in the far right corner A detail pane is shown on the right Click on the ‘Test case’ text next to the Pane and change it to ‘Test results’

TFS–How to see the executed commands and parameters

TFS keeps track of an activity log of all recent activities. This information is stored in 2 tables inside Tfs_Configuration and Tfs_ collectionname called tbl_Command and tbl_Parameter. These tables keep a record of every single command that every single user has executed against TFS for the last 14 days(!) . So if you want to know which query is used to execute a specific action, it’s not that hard to find it through the Activity log. If you don’t like to open SQL Server Management studio, you can also browse to the ‘hidden’ management pages at http://<tfsurl/_oi Note: You can only access these pages when you do it directly from your TFS application server When you click on the … next to the command you can see the related details

Team Explorer is back

Visual Studio 2013 and before had a seperate installer for Team Explorer. This allowed non-developers to access Team Foundation Server and all it’s functionality without the need to install a Visual Studio version. In VS 2015, Microsoft did not release a standalone Team Explorer but pointed customers to the free Express SKUs and Community editions, which included Team Explorer functionality. This week with the Visual Studio 2017 Update release , the standalone Team Explorer installer is back. This is a free download for non-developers who connect to Team Foundation Server or Visual Studio Team Services. Remark: Note that you probably still need a CAL(client access license).

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...

Using work item templates in TFS 2015 and VSTS

Last week I heared a colleague that he had to customize the TFS work item templates to prepopulate some fields with default values. I had some good news for him. TFS (and VSTS) has a nice productivity feature; work item templates. With work item templates you can quickly create work items which have pre-populated values for your team's commonly used fields. And that’s exactly what he needed. Here are the steps required to create a work item template: Open the TFS web portal Go to the Work hub and click on the Queries tab Click on New and choose the Work Item type you want to create a template for On the New Work Item form fill in the default values you want the template to contain. Next, If you are using VSTS choose the Copy template URL option from the context menu: If you are using TFS on premise, click on the Copy template URL button: An URL is generated and copied to your clipboard. Here is an example of the...

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:

VSTS–Live updates on Kanban board

Yesterday I discovered a nice new feature on the VSTS Kanban board, I noticed the addition of a new icon If you click on it, live updates of the board will be activated. Once enabled, everyone in your team, can observe changes made to the board immediatelly. So no need anymore to refresh the screen. It’s great how I keep finding hidden gems that improve our workflow.

TFS Build vNext - Nunit 3.0 Test Adapter error

When trying to run my NUnit tests on the build server, my build turned red with the following error message inside the Test step: 2016-04-28T08:46:53.3339665Z ##[error]Error: Exception System.ArgumentException, Exception thrown executing tests 2016-04-28T08:46:53.3339665Z ##[error] 2016-04-28T08:46:53.3349431Z ##[error]Error: Illegal characters in path. 2016-04-28T08:46:53.3349431Z ##[error] This problem is caused by a bug in the NUnit 3.0.8 test adapter when used through the NuGet package(and not through the VSIX extension). Luckily a fix is already available, so upgrade to the latest version of the NUnit test adapter and the problem should disappear.

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 ...

Team Foundation Server: How to migrate TFS Version Control project by project–Part 2

If you want to migrate a full TFS collection, support is built-in. But what if you want to migrate a specific project but want to keep the source code history? I blogged about a solution I used before by using Git as a way to move code between 2 TFS Version Control repositories. (Here is the link in case you cannot find it: http://bartwullems.blogspot.be/2015/05/team-foundation-server-how-to-migrate.html ). I used this approach multiple teams with great success. However some people who tried to do the same thing complained that the approach I described didn’t work when you have multiple branches. So time to solve this and add the misssing steps required to migratie multiple branches: Extract the old TFS project including all branches with the git-tfs tool : git-tfs clone --with-branches http://oldtfs:8080/tfs/DefaultCollection $/BranchingDemo/Main Open the .config file inside the .git folder and add a new remote:  [core] repositoryformatversion =...

TFS 2015–Uploading Build vNext tasks without enabling basic authentication

I talked about the tfs-cli tool before. This tool allows you to create and upload your own custom build steps both in VSTS and TFS on premise. Unfortunately to be able to use it on your local TFS instance, you have to enable Basic Authentication . If you don’t want to do that, you have to use the REST api’s to upload your custom task. Although this is certainly possible, it’s not that easy to do. Luckily a colleague spend some time creating a Powershell script to simplify the process: Just invoke the script, specify the location of your custom tasks, the url of your TFS instance and your windows credentials.

TFS 2015: The 'System.Collections 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.

After upgrading an existing solution to the new build system in TFS 2015, the build failed with the following errors: The 'System.Reflection.Extensions 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'. The 'System.Reflection.Primitives 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'. The 'System.Resources.ResourceManager 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'. The 'System.Collections 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'. The 'System.Diagnostics.Debug 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667...

SQL Server Performance issues after upgrading from Team Foundation Server 2010 to 2015

After upgrading a Team Foundation Server 2010 environment from a customer to Team Foundation Server 2015, we noticed an enormous spike in CPU and memory usage on the database server. When we drilled further into the issue, we saw the same SQL Server statement being executed over and over again: On the MSDN forums, we found some more information . This is a bug in the TFS 2015 upgrade process that only seems to exist when you upgrade from TFS 2010. A SQL script is available that solves the problem, but the issue is also fixed in TFS 2015 Update 1. So I would recommend that if you have this issue, upgrade to Update 1.

TechNet Virtual Labs

If you want to test a Microsoft product in a risk free environment, try TechNet Virtual Labs . It offers a wide range of virtual environments for testing Microsoft's newest products and technologies.     I forgot that this existed, until a colleague sent an email about it(Thanks Joeri). So if you want to play with for example the Team Foundation Server 2015 bits but don't want to put it on Azure or download and run a VM locally, just search for 'Team Foundation' and a large set of VMs and labs are available. Great stuff!