locked
How to find TF.exe installed by Visual Studio 2017 RC? RRS feed

  • Question

  • I have Visual Studio 2017 RC installed on two servers and the location of tf.exe command utility is different on each server.

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\1splm2or.ac4\

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\mh3pjr3w.dz2\

    Also, unlike previous version of Visual Studio there does not seem to be an environment variable like VS150COMNTOOLS set that would provide a consistent way to find it.

    This url https://www.visualstudio.com/en-us/docs/tfvc/use-team-foundation-version-control-commands states that

    Visual Studio 2017 users: The tf.exe binary is no longer in a fixed location in the Visual Studio install path as in previous releases (for example, C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE). Scripts using tf.exe should not hardcode a path to the file based on the Visual Studio 2017 install path.

    So if we should not hard code the path because it changes from machine to machine how do we locate it in a generalized way?

    -- Steven

    Wednesday, February 8, 2017 5:28 PM

Answers

All replies

  • See the section "The location of tf.exe (Team Explorer command-line) has changed" of my post:

    Some implications of the new modular setup of Visual Studio 2017 for VSX developers

    http://www.visualstudioextensibility.com/2016/11/23/some-implications-of-the-new-modular-setup-of-visual-studio-2017-for-vsx-developers/


    My portal and blog about VSX: http://www.visualstudioextensibility.com<br/> Twitter: https://twitter.com/VSExtensibility<br/> MZ-Tools productivity extension for Visual Studio: https://www.mztools.com

    • Proposed as answer by Carlos J. Quintero Thursday, February 9, 2017 5:39 AM
    • Marked as answer by StevenIBSI Thursday, February 9, 2017 5:02 PM
    Thursday, February 9, 2017 5:39 AM
  • Thanks Carlos,

    So using a link that includes the Team Explorer shortcut eliminates the <random folder> portion of the path...

    "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe"

    Thursday, February 9, 2017 5:02 PM
  • While Carlos' post has more details, this one is the more directly useful that most people are probably looking for.

    The pattern holds (for me) with VS 2019 as well:

    "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe"


    --Seek Truth, and you will find Joy!


    Monday, May 20, 2019 6:38 PM