I am having trouble synchronising SpecLog requirements with TFS. What can I do?

Synchronising requirements in SpecLog with a TFS server takes place using a plugin on the server. Make sure you have configured the plugin correctly as described here. We strongly recommend using V2 of the TFS plugin; V1 is only provided for backwards compatibility. The following can help troubleshoot issues with synchronising requirements in SpecLog with TFS.

Check Your Card Templates

Verify that your requirements are set to be synchronised correctly in the card templates (accessible from the Repository settings). Ensure that the TechTalk.TFSSync option is enabled under Sync Agents for those requirement types you want to synchronise with TFS.

Test Your Connection

You can test your connection with the TFS server using the SpecLog.TfsPlugin.TestClient.exe command line tool, which is located in the /server/plugins directory of your SpecLog installation. The syntax used by the tool is as follows:
SpecLog.TfsPlugin.TestClient <tfsUrl> [/userName:<value>] [/userDomain:<value>] [/password:<value>]

Parameters in square brackets ([]) are optional; replace values in angled brackets (<>) with your values, e.g.:
SpecLog.TfsPlugin.TestClient.exe https://MyTFS.location/tfs /username:John /userDomain:DOMAIN /password:P@55w0rD1234

More information on the connection test tool is available here.
If you are unable to establish a connection using the tool, ensure that you have configured your TFS server correctly; in particular check that the synchronisation user has the necessary permissions.

Check the Server Logs

Warnings and errors are logged using Microsoft Enterprise Library, and can be configured in service.entlib.config to help you troubleshoot any issues. An example of how to configure this file is available here. We also recommend starting the server from the console instead of as a service, so that all errors are output to the console.
The log file will include information on what elements are being synchronised and any errors that occur.

Ambiguous Work Item References

Your log file may contain an entry similar to the following:
System.InvalidOperationException: Ambiguous work item references encountered
2 work items for requirement 'a43dfef4-6ef2-4352-9a9f-12c07d5e04a0': 11447, 12143

The last two number (11447 and 12143 in this case) are the IDs of the associated work items. To fix this conflict:
  1. Open TFS and navigate to one of the conflicting work items.
  2. Open the LINKS at the bottom right.
  3. Locate the entry under Hyperlink starting with "speclog://" and containing the requirement's GUID and delete it.
  4. SpecLog will automatically update the link correctly the next time data is synchronised with TFS.

Check Visibility in TFS

If the log file contains no errors, this can be a sign that the synchronisation is working correctly, but that the synchronised items are not visible in TFS. Ensure that your user has the necessary privileges to view all entries in TFS and that all areas are displayed in TFS, in case items have been synchronised with areas that are not visible to you.

Try Editing a Requirement

Before despairing, try making a minor edit to a requirement (e.g. add a space character to a field) to ensure that SpecLog registers the requirement as having been updated. This will also force SpecLog to attempt to resynchronise the requirement with TFS.

Feedback and Knowledge Base