Getting Started with TFS File Sharer

We just released another internal tool under the MIT license, this time it is an extension for Team Foundation Server 2005 (2008 version will ship soon) that helps organisations mimic the file linking capability of repositories like Visual SourceSafe.

In the field I’ve seen a lot of customers struggling with adopting TFS because the configuration of their VSS repositories rely heavily on the ability to get file linking happening to update common source files. TFS File Sharer should hopefully help customers side step this problem, here is the description from the project homepage on CodePlex:

“The TFS File Sharer is a tool designed to assist development teams who have migrated from version control stores that support the concept of linked files where one file update automatically updates all the other linked files – for example VSS.

The TFS File Sharer reads a configuration file that lists out all of the shared files within an environment and then when it notices a check-in that changes one of those shared files it updates all the other files that have explicitly been listed as being linked to it.

Using this tool will allow users migrating from other source systems to more easily adopt Team Foundation Version Control and then slowly phase out the use of file linking.”

Now lets look at what it takes to get it running in your environment.

Installing and Configuring the File Sharer

In order to install the File Sharer component you need to first download the release from CodePlex. From this zip file you need to extract the following files:

  • FileSharer.exe
  • FileSharer.exe.config
  • FileSharer.xml

These three files should be placed somewhere on the file system of your TFS server. I would recommend “C:\Program Files\File Sharer”. Once these files are in place you should issue the following command at the command prompt:

  • C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /i “[install path]\FileSharer.exe”.

During the installation process a dialog will be displayed asking for valid windows credentials. This needs to be an account that has check-out/check-in rights to all the files that are going to be shared using this tool. The configuration file, FileSharer.xml lists out all of the files.

image

The files are organised into sets with names, and each set has multiple file references. If one of the files referenced is updated, then all the files referenced will be overwritten with that copy of the file. The tool has some de-duping logic built into it so if that two files are changed from the same set, it will pick a winner but because independent versions are checked in before being overwritten you shouldn’t loose any data.

Finally, once you have it all configured you can start the service using the following command:

  • net start FileSharer

Once it is running you should see follow-up check in notifications when you check-in a shared file as it is updating the other shared files. Just remember that it doesn’t force the updates down into other users workspaces.

What’s next? Want to help out?

If you have any feedback please use the Issue Tracker and create a work item. Finally if you would like to help out with the project I’ve got the following roles available:

  • Documentation Writer; responsible for updating CodePlex wiki and producing installation guide.
  • Tester; responsible for testing installation process and operation of the tool.
  • Developer; joint responsibility with me in designing and developing the TFS File Sharer moving forward.

If you are interested contact me via my CodePlex profile page. Thanks for listening! I hope you find the TFS File Sharer useful in your organisation.

P.S. Please note that once we get real documentation in the CodePlex wiki this page will become obsolete, but I will put a link to the equivalent documentation at the top of the page.

9 thoughts on “Getting Started with TFS File Sharer

  1. Pingback: Some great new TFS add-ons - Noticias externas

  2. Lars Andersson

    We are just starting to work with TFS and we use TFS 2008.

    Can we use the TFS File Sharer “as is” and what are the tings that
    won’t work ?

    You state that it is released for TFS 2005 and that a version for TFS 2008
    will follow. What is the difference? Is there some way we can contribute?

  3. Mitch Denny Post author

    Hi Lars,

    It should work as the API that it uses should be compatible. The only thing that you _may_ need to do is putt in a few binding redirects. But you might not need to do that even.

  4. Lars Andersson

    Hi Mitch

    I tried to run TFS File Sharer on our server and nothing happened, so I
    decided to run it on my development machine under a debugger.
    I got your code into Visual Studio, compiled it and when I try to launch
    it with parameter “/console” I get the following error:

    A first chance exception of type ‘System.IO.FileLoadException’ occurred in FileSharer.exe
    An unhandled exception of type ‘System.IO.FileLoadException’ occurred in FileSharer.exe

    Additional information: Could not load file or assembly ‘Microsoft.TeamFoundation.VersionControl.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

    I removed the references to Microsoft.TeamFoundation.xxx and put them back again, recompiled but I still get the same error.
    Was this where your binding redirects would help?

    Any help appreciated

    /Lars

  5. Derek

    Does this have to be installed on the TFS machine, or will any machine with the 2005 Team Explorer installed do?

  6. Pingback: Miguel Madeira : TFS add-ons list

  7. Pingback: Miguel Madeira : TFS add-on list

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s