Tuesday, June 2, 2015

TIPP: VS Team Explorer 2012 Required for Associating Work Items with Changesets from Toad For Oracle 12.6 to Team Foundation Server 2013

As stated in the Toad for Oracle 12.1 - Release Notes, this version introduced the following feature “When using Team Foundation Server (TFS) in Toad, you can now check-in TFS Work Items and link one or more TFS work items to the check-in change set.” In other words, it should be possible to associate work items with database changes while performing a check-in action from Toad for Oracle.

Additionally, the next version “Toad 12.5 supports Microsoft Team Foundation Server 2013 (TFS)”, as stated by Toad for Oracle 12.5 – Release Notes.

I am currently working with Toad 12.6.0.53 with Team Coding 7.1 – Trial, and I found out that the feature for associating work items during check-in unfortunately does not work out of the box on a client machine where Visual Studio 2013 Update 3 or Team Explorer for Visual Studio 2013 bits are installed. In order to solve the error you need to install Team Explorer for Visual Studio 2012.

1 - Associating Work Items with Changesets from Toad For Oracle 12.6 - Installed SW-all

Walkthrough

You first need to set up Work Item Association as part of the Team Coding Configuration, as shown in the following picture:

2 - Associating Work Items with Changesets from Toad For Oracle 12.6 - Toad Set Up

Now, when you load the Check-in dialog you do not see the Work Item tab:

3 - Associating Work Items with Changesets from Toad For Oracle 12.6 - CheckIn Dialog Without Work Item Tab

Note: Depending on the Visual Studio related bits installed on your machine, you can get errors when connecting to TFS saying “Failed to initialize Work Item store” – please see notes on the end of this post. Additionally, you may also see the Work Item tab in the Check-in dialog, but it will not show any work items.

In order to solve the error you need to install Team Explorer for Visual Studio 2012.

Restart Toad and open the Check-in dialog. Now you see the list of available Work Items from the TFS Team Project you are connected to from Toad.

6 - Associating Work Items with Changesets from Toad For Oracle 12.6 - CheckIn Dialog - Associating With Work Items

Note: In case the list of Work Items is empty, remove the Work Item Association feature in the Team Coding Configuration and add it again. Also restart the connection to the Team Foundation Server from Toad (VCS Logon). Then it should work.

The functionality now behaves correctly allowing you to associate work items with changes to database objects!

5 - Associating Work Items with Changesets from Toad For Oracle 12.6 - CheckIn Dialog With Work Items

7 - Associating Work Items with Changesets from Toad For Oracle 12.6 - CheckIn Dialog - Changeset with Associated Work Item

Setup

Here is a recommended list of actions to enable work item association from Toad for Oracle 12.6, which depends on the Visual Studio bits you have already installed:

Note: Both Team Explorer for Visual Studio 2013 and Team Explorer for Visual Studio 2013 are free clients for Team Foundation Server.

Notes

Note 1: The error does not depend on the fact that I am using the trial version of Toad. The same behavior is seen for example in the Toad For Oracle Basic edition .

Note 2: I am using the Visual Studio 2013 Application Lifecycle Management Virtual Machine currently with TFS 2013 Update 3 and Visual Studio 2013 Update 3, where I have additionally installed the Oracle Demo DB locally (Oracle Database 11g Release 2 (11.2.0.1.0) for Microsoft Windows (x64)) and Toad 12.6.0.53 with Team Coding 7.1 – Trial.
As this image is already preconfigured with TFS 2013, it has some Visual Studio 2010 and Visual Studio 2012 bits already installed. This scenario happens on the clean machine until you uninstall Microsoft Visual Studio 2010 Shell (Isolated) - ENU. The error you get in the Toad Output window is following:

“Error: Failed to initialize Work Item store for URI: http://vsalm:8080/tfs/DefaultCollection : Failed to load TFS Assemblies : Error loading assembly: Microsoft.TeamFoundation.Client, Version={0}, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies”

After uninstalling the Visual Studio 2010 bits, you can use work item association from TFS 2013, without additionally installing Team Explorer 2012. This is because the TFS 11.0.0.0 assemblies for TFS 2012 referenced by Toad are already present on this demo image
(check GAC for
Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=AMD64).