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.
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.



[...] TFS File Sharer - Mimics SourceSafe like file sharing. [...]
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?
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.
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: 0×8013141A)
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
Hi Lars,
What version of Team Explorer do you have installed on the machine? Did you install this on the TFS server? If so, which version?
Does this have to be installed on the TFS machine, or will any machine with the 2005 Team Explorer installed do?
It can be installed on another machine.
[...] TFS File Sharer - Mimics SourceSafe like file sharing.TFS Continuous Integrator - A TFS 2005 based continuous integration solution. Of course, it’s built in if you are using TFS 2008.TFS Dependency replicator - A tool to make changes in the source tree when certain events occur (like copying files when a build completes).TFS Build Virtualizer - Rather than having one physical machine for each team or build server configuration, manage a pool of virtual machines automatically.SLR TFS Get Latest Version on Check-Out Outlook 2003 TFS AddinTeam Foundation Server Administration ToolWork Item Subscription Tool [...]
[...] TFS File Sharer - Mimics SourceSafe like file sharing. TFS Continuous Integrator - A TFS 2005 based continuous integration solution. Of course, it’s built in if you are using TFS 2008. TFS Dependency replicator - A tool to make changes in the source tree when certain events occur (like copying files when a build completes). TFS Build Virtualizer - Rather than having one physical machine for each team or build server configuration, manage a pool of virtual machines automatically. SLR TFS Get Latest Version on Check-Out Outlook 2003 TFS Addin Team Foundation Server Administration Tool Team Foundation Server Event Subscription Tool [...]