aquemini
aquemini

Reputation: 960

Visual Studio/TFS 2012 - Retrieve original filepath from .tmp files in comparison

I'm working on developing a specific comparison tool in Visual Studio 2012 with TFS 2012 installed, and am having trouble getting around TFS's use of temporary files for comparison. In Tools > Options > Source Control > Visual Studio TFS > Configure User Tools..., shown here:

enter image description here

I'm modifying the command for comparing .xml files, and TFS gives me the following options to add as command lines parameters to Powershell:

enter image description here

The issue is, I'm calling a custom Powershell script that will do some processing and determine what action to take based on the files that are being compared. However, some of the information required to process is the actual source control filepath of each file; which would appear to be stored in command line args %1 and %2. Unfortunately, TFS uses .tmp files to actually perform comparisons, so each of those paths points to the .tmp (stored in local AppData) file instead of the original .xml filepath that I need.

The contents of the files do not have the information I'm looking for, and the filepath is guaranteed to. Is there any way at all to use any other of the command line arguments provided by TFS to pass through the original filepaths to Powershell, or can I somehow tie back the .tmp files to the .xml path? I'm kinda stuck at this point. Thanks!

Upvotes: 0

Views: 48

Answers (1)

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31093

There is no option to specify the file in the argument. I've tested on my side with TFS2015 + VS2015, when added the PS tool to compare .xml file, it did compare .xml files, not .tmp file.

You can also specify the Source Path and Target Path when you compare the .xml files:

enter image description here

Upvotes: 0

Related Questions