Welcome to MSDN Blogs Sign in | Join | Help

Configuring the new TreeDiff Power Toy

Someone asked me in a comment on my post announcing the new TFS Power Toys if there was any way to make it ignore certain files (like .obj files).  The answer is yes.  Rather than respond directly in a comment I decided to write a new post about it because there's more you can configure.

If you run regedit.exe and look in:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\TeamFoundation\PowerToys\TreeDifference]

you'll see a variety of TreeDiff settings.  Including:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\TeamFoundation\PowerToys\TreeDifference\NonRelevantMasks]

FileExtensions=*.pdb;*.obj;*.dll;*.exe;*.res;*.resources;*.cache;*.ilk
FolderExtensions=obj;objd

These settings allow you to configure files and/or folders that TreeDiff will ignore when doing comparisons.  Unfortunately, there is a bug that results in a mismatch in the default setting of this registry value and the code that interprets it.  The FileExtensions value needs to be manually changed to:

FileExtensions=.pdb;.obj;.dll;.exe;.res;.resources;.cache;.ilk

With the proper FileExtensions setting (and the already set default FolderExtensions setting), tree diff will skip comparing and files with .pdb, .obj, .dll, .exe, .res, .resources, .cache, .ilk extensions or any file what-so-ever under a folder called obj or objd.

Additional settings in the registry include:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\TeamFoundation\PowerToys\TreeDifference\Colors]

There are a variety of values here that allow you to customize the colors tree diff uses to highlight differences.  The names of the values are fairly self explanatory, so I won't list them here.

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\TeamFoundation\PowerToys\TreeDifference\ViewOptions]

Controls what kinds of comparison results get displayed (e.g. files that match, files that don't, files only in the source, files only in the target).  You don't really need to mess with these registry keys as they can all be set from the right click menu in Tree Diff.

By the time this feature makes it into the shipping product, I expect that we will have UI to configure all of these values.  We just figured you'd like to use this feature before we got that far :)

Have fun,

Brian

Published Friday, September 08, 2006 8:11 AM by bharry

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# VSTS Links - 09/08/2006

Aaron Hallberg on Visual Studio Team System Chat and MSBuild Batching - Generate a Cross-Product (continued)....
Friday, September 08, 2006 9:59 AM by Team System News

# TFS Power Toys Links

Brian Harry on New TFS Power Toys Available and Configuring the new TreeDiff Power Toy.

Buck Hodges...
Friday, September 08, 2006 10:01 AM by Mickey Gousset

# re: Configuring the new TreeDiff Power Toy

As a HUGE fan of BeyondCompare, any way we can get the differences piped into BeyondCompare's folder-difference mode?
Friday, September 08, 2006 6:56 PM by Any chance we can BeyondCompare to do the diffs?

# re: Configuring the new TreeDiff Power Toy

We already support a configurable diff tool for file comparing (Tools -> Options).  I think it's a good point that we should do this for folder comparing too.  I'll pass the feedback on to the developers.  Thanks,

Brian
Saturday, September 09, 2006 11:00 AM by bharry

# re: Configuring the new TreeDiff Power Toy

Why, oh why, would you go for a Registry Configuration source? Why not use the standard .Net way of .config Xml file(s)?
Monday, September 11, 2006 7:08 AM by Jarle Nygård

# re: Configuring the new TreeDiff Power Toy

Well, that's a good question and I'm not sure we put a ton of thought into it.  I think the primary reason we store those settings in the registry is that's where VS stores all of it's other settings and there's value in consistency.  At some point VS may move all of its settings into a config file but now, I suspect for historical reasons, all settings are under the VisualStudio hive in the registry.
Monday, September 11, 2006 7:24 AM by bharry

# re: Configuring the new TreeDiff Power Toy

Fair enough, but I don't have to like it... ;)
Monday, September 11, 2006 9:26 AM by Jarle Nygård

# Customizing the Team Foundation TreeDiff Power Toy

Welcome back!
Before we get started on Tree Difference customization, I would like to bring forth some...
Wednesday, September 13, 2006 10:51 PM by Building Better Software - One Line At A Time

# Tree Compare in Team System Foundation

The TFS team has produced a TFS Power Toy for comparing directories. (Screen shot). Looks all the world...
Saturday, September 30, 2006 8:58 PM by Ken Brubaker

# Treediff command line survival guide

I wanted to do it a long time ago, but time has passed and I was forgetting about it over and over again.

Friday, November 17, 2006 8:52 AM by michal.Log

# re: Configuring the new TreeDiff Power Toy

Does the same rule apply to SourceControl\AddOptions\ExcludeMasks?

Cheers,

Tuesday, November 27, 2007 4:34 AM by Pravin

# re: Configuring the new TreeDiff Power Toy

Yes but the ExcludeMasks filter only apply for files and there is no AddOptions filter for folders. Also, the bug that Brian mentioned is only in TreeDiff and not in Add Files to Source Control.

The new Folder Difference in VS2008 has a completely new file/folder filtering and does not use these filter masks. There are 4 blog postings about this feature starting with http://blogs.msdn.com/permanenttan/archive/2007/03/29/visual-studio-orcas-march-2007-ctp-folder-difference.aspx.

-Tan

Tuesday, November 27, 2007 8:14 AM by PermanentTan

# TFS Top Tip #9 - Secret Registry Hacks

So, this isn't exactly original material - but I was having a chat with somebody today who I consider very knowledgeable about Visual Studio Team System and they were not aware of these so hopefully re-posting some will help more people discover...

Wednesday, January 23, 2008 7:03 PM by Martin Woodward

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker