Thursday, November 20, 2014

Setting up a client trace with TFS 2013

Users may report performance issues with Team Foundation Version Control. Sometimes it may be something the TFS client is doing or sometimes it may be the server side.  I have seen a post around source control permissions causing the issue.  This is unlikely the cause in my case because the user was able to work around the slowness by converting their workspaces to server workspace's and then back to local.  I am trying to figure out what is causing this and came across this post regarding TFS Client Tracing.  With a few tweaks I was able to get it to work with Visual Studio 2013 Update 4.

Below is an updated version for Visual Studio 2013.

  1. Shut down Visual Studio
  2. Using Windows Explorer navigate to the following directory (my install was in Program Files (x86) directory):
    C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE
  3. Make a backup copy of the devenv.exe.config
  4. Edit devenv.exe.config by adding the following before the last </configuration> :
<system.diagnostics>
<switches>
<add name="TeamFoundationSoapProxy" value="4" />
<add name="VersionControl" value="4" />
</switches>
<trace autoflush="true" indentsize="3">
<listeners>
<add name="myListener" type="Microsoft.TeamFoundation.TeamFoundationTextWriterTraceListener,Microsoft.TeamFoundation.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" initializeData="c:\tf.log" />
<add name="perfListener" type="Microsoft.TeamFoundation.Client.PerfTraceListener,Microsoft.TeamFoundation.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</listeners>
</trace>
</system.diagnostics>

  1. Trace data will be written to "c:\tf.log (blold above).  Change this file name if you prefer
  2. Save the file
  3. Start Visual Studio
  4. Run steps you are interested in tracing
  5. Open c:\tf.log or the file you specified it in step 5
  6. This writes a lot of data so you will want to restore to the original setting when finished by copying the original devenv.exe.config file back or commenting out the lines in step 4 by surrounding the lines with <!-- and --> .

Tuesday, November 4, 2014

Switching Workspace Location on a Mac

vswhitelogoOne of our developers is doing development on a Mac.  The user has TEE (Team Explorer Everywhere) plug-in installed for Eclipse.  The user initially created a server workspace and wanted to switch it to a local workspace.  Unfortunately when doing that in the UI it did not work and gave a permission denied error.  How to fix that?

As luck would have it they did not take a screenshot of the error and I didn’t want to bug him too much to recreate it.  Developers at my company are very busy and they need time to focus (so I minimize disruptions to them). 

Looking at the file in question we could see that it had these permissions

--r—r—r root staff

Our best guess is the Eclipse UI did not have enough rights to alter the permissions on the file.  Upon doing some research there is no command line option to alter the location to local using the tf workfold nor the tf workspace commands.  The only time you can set this on the command line is when creating a NEW workspace.

So my final recommendation to this poor soul was to have 2 workspaces.  One server workspace for managing (branch/merge) whole branches and create a second workspace that is local.  The day to day work on his cards would be done there.

One note I have asked him to run Eclipse with sudo so we will see if that works.  I will update the post if I hear good news.