A Django site.
July 17, 2008
» July 2008 release of the power tools for TFS 2008 is now available

The download is available at http://www.microsoft.com/downloads/details.aspx?FamilyID=00803636-1d16-4df1-8a3d-ef1ad4f4bbab&displaylang=en.

Brian recently wrote a post about the new features: http://blogs.msdn.com/bharry/archive/2008/07/08/july-08-tfs-power-tool-preview.aspx.

This release also includes some bug fixes to the build notification app.

Enjoy!

March 21, 2008
» How Do I: Use the Builds Check-in Policy?

A year ago I wrote a blog post about a new check-in policy that we added in build for TFS 2008 to prevent "piling on" when the build is broken in continuous integration environment.  That post has all of the details on how it works and even the code showing you how it was implemented.

Now Richard Hundhausen has a video on how to make effective use of this new check-in policy.

How Do I: Use the Builds Check-in Policy?

Use the Builds Check-in Policy in your Continuous Integration Environment to let you know when somebody has broken the build. Richard Hundhausen shows you how.
Presented by Richard Hundhausen http://www.accentient.com on March 4, 2008
Length: 12 minutes 19 seconds

Video Downloads:

ZIP | WMV | iPod | MP4 | 3GP | Zune | PSP

Audio Downloads:

AAC | WMA | MP2 | MP3 | MP4

Download the code: Visual Basic | Visual C#

March 20, 2008
» Visual Studio Team System Chat: April 9

Join members of the Visual Studio Team System product group to discuss features available in Team Foundation Server, Team Suite, Architecture Edition, Development Edition, Database Edition, and Test Edition. In addition, discuss what's new for these editions for Visual Studio 2008.

Add to Calendar

April 9, 2008
10:00 A.M. Pacific Time
Additional Time Zones

March 19, 2008
» Teamprise 3.0 Ships!

Martin Woodward write that Teamprise 3.0 has now been released!  If you want the equivalent of Team Explorer integrated into Eclipse on any platform or need a client from Linux or Mac, you'll definitely want to check out Teamprise.

Here's a quick bullet list of features that I lifted from his post.  I'm particularly happy to see the new integration with Team Foundation Build.  It opens up the TFS build feature to teams that need to build on other platforms, in addition to the integration with Eclipse.

  • Full Team Foundation Build integration (including ability to execute Ant based builds)
  • Check-in policy support
  • Recursive folder compare
  • Single sign-on (from Microsoft Windows machines)
  • "Destroy" command for version control
  • Show deleted items and undelete from Source Control Explorer UI
  • much much more (see release notes)

Martin says they have also improved the pricing structure for customers who only need a small number of licenses.

Check out the full post for all of the details, including screenshots: Teamprise 3.0 Ships!

Congratulations to Martin and everyone else at Teamprise!

February 17, 2008
» Setting up Source Server for TFS Builds

Jelle Druyts has posted a document describing how to set up source server for Team Foundation Build.  If you don't know what it is, read the MSDN magazine article that is the first link in his post.

Check it out!

Setting up Source Server for TFS Builds

I've read about symbol servers and source servers before (in John Robbins' excellent Debugging Microsoft .NET 2.0 Applications book, for example, and also due to the recent news that Visual Studio 2008 will support source-code debugging of the .NET Framework Libraries), but never really got around to trying them out since they seemed pretty complex to set up. However, I've recently set up a source server on a Team Foundation build server (twice!), and my eyes have now gone wide open: anybody who references assemblies built by those TFS build servers can now seamlessly debug them.

When an assembly is "source server-enabled", the pdb file will contain the full path and the exact version of the file in source control that was used to build that assembly. If the debugger then enters a method, Visual Studio automatically downloads that correct file, places it in a local cache, and opens it for debugging. This is super sweet!

Now the hard work was already done and published by Roy Osherove, but there were some extra steps to take if you wanted to integrate this in a real Team Build (i.e. on the TFS build server instead of on a local machine) and it also lacked some additional information to get everything working. So I put together a full document that covers all aspects of setting up a source server, modifying the Team Build script, configuring the project files, and finally configuring the development machines.

The full document (PDF) can be downloaded here, and you can read the one-page summary that briefly covers the required steps below. I cannot recommend setting up a source server enough, it's free and takes less than an hour if you simply follow the procedure, and the advantages are - hopefully - obvious.

more...

February 3, 2008
» Updated post on how to filter checkin emails by paths

I've made a significant update to the following post: Adding a path filter to a CheckinEvent subscription using bissubscribe.  The reason is that the paths supplied by the server aren't consistently cased while XPath is case-sensitive.  The result is that your subscriptions that filter based on paths will not work reliably without additional complexity, unfortunately.

December 22, 2007
» Team Foundation Power Tools for Team Foundation Server 2008 available now!

Earlier today, we released the first version of the TFS Power Tools for TFS 2008!

I want to highlight the build notification application.  This tool alerts you when a build is started or completed.  If the build breaks, you'll know immediately.

I posted a preview of the build notification app back in September.  Based on feedback, we have fixed bugs (e.g., it now properly handles the user logging out or shutting down on Vista) and made improvements (e.g., you can now disable servers in the options dialog that you don't want).  See the preview post for more screenshots and details on how it works.

See Brian's post for the full details on all of the featues on this release, which include support for destroying work items and work item type definitions.

Enjoy!

December 12, 2007
» How offline mode works in TFS 2008 version control

Ben Ryan, a developer on the version control team, has written a couple of posts about the offline feature introduced in Team Foundation Server 2008 Version Control.  The first one in particular answers some questions that have come up.

When and how does my solution go "offline"?

TFS 2008 adds improved support for "offline" scenarios.  This blog post identifies the scenarios under which a solution will be placed in "offline" mode.

more...

 

How to make TFS Offline strictly solution-based

For some users it may be a bit offputting that taking one solution offline causes all other solutions bound to that same server to go offline when they are opened (assuming no "Go Online" operations in the interim). 

more...

November 21, 2007
» Martin Woodward's presentation on what's new in TFS 2008

Martin Woodward has a posted a great set of slides from a presentation he did on what's new in TFS 2008.  After going through all of the features other than build, he spends more than half of the slides on the build features of TFS 2008 (aka Team Build).  I highly recommend taking a look at the slides, particularly if you haven't paid close attention to TFS 2008 up to this point.

Team Foundation Server 2008 - What's New Talk

Last night I had the pleasure of presenting to my local .NET User Group (NIMTUG) on what is new in Team Foundation Server 2008.  Interestingly, most of the audience where new to TFS completely so I also covered a bit of ground on what Team Foundation Server did and why - however most of the talk concentrated on the Team Build stuff new in TFS 2008 and I ran through the wallboard demo that I wrote for TechEd.

more...

One of the slides shows a condensed diagram of the new object model for build in TFS 2008.  I've copied it here (you may need to make your browser wider to see the whole thing).  It does a great job of highlighting the central parts.

image

September 22, 2007
» Team System Web Access for TFS 2008 CTP released

Team System Web Access for TFS 2008 Power Tool CTP is now available!

For TFS 2008, TSWA will continue to be a power tool through the TFS 2008 release.  For the release after that, it will be a part of the regular product.  The final release of the TSWA for TFS 2008 power tool will happen near the time TFS 2008 ships, which we've stated is by the end of this year.

The big news with this release is the support for custom controls in work item forms.  When you install TSWA, you will find a subdirectory in the installation directory that contains the SDK documentation, which describes the interface, JavaScript functions, etc.  There are also several examples provided, including a checkbox, a work item picker, and a multi-value selector.  You will not be able to use existing custom controls as they are, because those are WinForms based and TSWA requires web-based controls.  However, the same basic concepts apply.  Please try this and let us know what you think!

We've also fixed a number of bugs and added support for some of the new Team Build functionality in TFS 2008 (queuing builds and viewing the build queue).  This should be a solid release.

For those of you who remember the need for the TSWA users group in the installation of the TSWA 2005 power tool, you'll be happy to know that is gone.  That was something we had to add to satisfy security requirements, but we've since changed the code to handle the impersonation better such that impersonated user identities no longer need access to any of the local directories for cache files and user settings (i.e., the code reverts to the service account while it accesses those).

Note that you need to install Team Explorer 2008 on the computer before installing TSWA 2008.  The previous release required Team Explorer 2005.

Visual Studio Team System Web Access 2008 Power Tool CTP

Overview

Team System Web Access is a free download that will be incorporated into a future release of Visual Studio Team System. You may install it with licensed installations of Team Foundation Server. You must be a licensed user of Team Foundation Server to access Team System Web Access.
Features

  • NEW: Display custom controls on work item forms
  • NEW: view queued builds new, queue new builds
  • Add new work items or edit existing ones
  • Work with any type of work item, including custom ones
  • Add new work item queries or edit existing ones
  • View, download, upload, check-in and check-out documents on SharePoint team portal
  • View reports, export as PDF or Excel
  • Browse source control repositories, download files, view changesets, diffs, histories, and annotated views
  • View build results, start or stop builds
  • Search for keywords in work items

Enjoy!

September 18, 2007
» TFS 2008: Controlling the number of threads used in uploading and downloading files

The TFS version control client object model normally uses up to eight threads from the thread pool to upload or download files.  This same mechanism is also used in pending adds: Files are opened to determine whether they are binary or text, so batches are sent to the server while other batches are being examined on disk.  It also uses eight threads.

Some customers have encountered a problem where a firewall will consider these multiple simultaneous connections to the server to be suspicious activity and block them (e.g., interpret them as a DOS attack).  In TFS 2005 there was no way to control this.

In TFS 2008 (beta 2 and newer), we added a way to control how many threads are used.  You can control how many threads are used by changing the .config file (tf.exe.config, devenv.exe.config, or your own app's .config, depending on what you are running) and set VersionControl.MaxBackgroundThreads to the number you desire from 0 to 64 (defaults to 8).

For example, the following will restrict it to two threads.

   <appSettings>
      <add key="VersionControl.MaxBackgroundThreads" value="2" />
   </appSettings>

If you set the maximum number of background threads to zero, the request is made on the calling thread rather than a thread from the thread pool.

Some customers have reported that they have solved the problem by having the TFS client bypass the network proxy for local (intranet) addresses.  You can do this by changing the settings in IE to bypass the network proxy for local addresses.  Alternatively, you can change this just for TFS by setting the following registry value.  You can set the following in either HKLM (global for the computer) or HKCU (for a particular user on the computer).  Change 9.0 to 8.0 if you are using TFS 2005 rather than TFS 2008.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TeamFoundation\RequestSettings]

"BypassProxyOnLocal"="true"

August 17, 2007
» TFS API: Determining if an edited file has changed

A few times over the last several months, the question has come up regarding how to determine whether a file on disk that is being edited is different that what is checked into TFS version control.  Folks looking at the PendingChange object have asked about the difference between the two hash value properties.

If you query for the pending changes in the workspace using GetPendingChanges() (or QueryPendingSets() if you don't want all of the pending changes for the workspace), you'll get an array of PendingChange objects.  The PendingChange object has quite a few properties.  Two of those properties are HashValue and UploadHashValue.  Unfortunately, the documentation on MSDN doesn't really do them justice.

The HashValue property is the right one to use if you want to determine whether a file with a pending edit has been modified.  HashValue is the MD5 hash of the content of the version against which the change was pended.  This value will be different from the MD5 hash of the file on disk, which you will need to compute yourself using MD5CryptoServiceProvider, if the file has been edited and actually changed.

I would recommend not using the UploadHashValue.  The UploadHashValue is the hash for the content last uploaded during a shelve or failed checkin operation.  This is used internally for the optimization to avoid uploading the same content repeatedly.  For example, a checkin may fail due to a conflict after all of the file contents have been uploaded.   To make subsequent attempts faster, the server keeps the content that was uploaded and the client checks to see if it needs to send the content when the checkin is attempted again.  The UploadHashValue is only really useful for this process.

Note that the GetHashCode() method is the standard .NET Object’s GetHashCode(), so it’s not relevant to the discussion of content hash values.

One caveat to computing hash values is that on systems where FIPS enforcement has been enabled, the MD5CryptoServiceProvider class cannot be used (it throws an exception), and TFS itself does not compute hashes when that is the case (the hash values are just used for upload optimization, so upload optimization is disabled).  You can learn more about FIPS enforcement at http://blogs.msdn.com/shawnfa/archive/2005/05/16/417975.aspx.  The summary of the issue is that FIPS standard only allows the SHA family of hash algorithms.

This post applies to TFS 2005 and newer.

August 3, 2007
» TFS 2008: Command line help for tf.exe now prints to the console

In TFS 2005 running help from tf.exe popped up the MSDN help browser.  That was a bit lame, but we didn't allocate the time to do it right.  That's been fixed in TFS 2008.

Running tf.exe /? produces a list of commands, and tf someCommand /? produces detailed help on that command.

Here are a couple of examples.  These two commands are also new in TFS 2008.

D:\>tf destroy /?
TF - Team Foundation Version Control Tool
Copyright (c) Microsoft Corporation.  All rights reserved.

Destroys, or permanently deletes, version-controlled items from Team
Foundation version control.

tf destroy [/keephistory] itemspec1 [;versionspec]
           [itemspec2...itemspecN] [/stopat:versionspec] [/preview]
           [/startcleanup] [/noprompt]

Versionspec:
    Date/Time         Dmm/dd/yyyy
                      or any .Net Framework-supported format
                      or any of the date formats of the local machine
    Changeset number  Cnnnnnn
    Label             Llabelname
    Latest version    T
    Workspace         Wworkspacename;workspaceowner

D:\>tf folderdiff /?
TF - Team Foundation Version Control Tool
Copyright (c) Microsoft Corporation.  All rights reserved.

Displays a visual representation of the differences between files in two server
folders, in a server folder and a local folder, or in two local folders.

tf folderdiff [sourcePath] targetPath [/recursive] [/noprompt]
              [/server:serverName:port] [/filter:filter]
              [/filterLocalPathsOnly]
              [/view:same,different,sourceOnly,targetOnly]

August 1, 2007
» Vote for your favorite version control system to migrate to TFS

Matt Mitrik, program managers for the TFS migration and synchronization toolkit, wants to know which version control systems are most important for them to focus on.  Go here and vote now.

What migration tools are you looking for?

I've heard plenty of requests for tools to migrate data from competitor products to TFS, and I'm trying to find out which tools have the highest demand. If you need a tool to integrate Subversion and TFS, for example, please reply to this post and let us know. Or better yet, create a new item in the issue tracker so that others can vote on the tools they want to see developed.

I'm also thinking about how to encourage the community to work together to develop migration and synchronization tools. Surely there is more than one person with a need for a SVN tool that is willing to develop it using the toolkit, so why not bring those heads together?

I'll start it off and open an issue for a SVN to TFS migration tool, and see where that goes. Hopefully others will follow.

http://www.codeplex.com/MigrationSyncToolkit/WorkItem/List.aspx

This was sort of a chain.  I was catching up on blogs, and I saw Eugene's post about Martin's post about Matt's post.

July 26, 2007
» Visual Studio 2008 Beta 2 is now available and includes a "go live" license!

Visual Studio 2008 Beta 2, including Team Foundation Server 2008, is now available for download.  As mentioned in Soma's post, Beta 2, unlike beta 1, includes the "go live" provision in the license, meaning that you can use it in production.  We've been using TFS 2008 beta 2 on our main internal dogfood server now for the last two months (well, it's close to being the same as beta 2 -- it's actually an very early snapshot).  You can check out the stats in Brian's post.

When Beta 1 was released, I put together a list of links about the Team Build features in Orcas.  If you are looking for a list of links related to TFS 2005, you can find those here (and Jeff has posted links to the TechEd 2007 presentations).

Here's my updated list of links about Team Build features in TFS 2008 (check out Brian's post for a list of all TFS 2008 features).  If you have questions or feedback about anything in beta 2, please let us know (either here or in the forum).  We're anxious to hear what you think!

Overview of features in Build for TFS 2008

Demos

Vista Sidebar Gadgets to monitor builds (we're working on an equivlaent to CCTray)

Details on how things work, customizations, etc.

Object Model API

Using the API via PowerShell

July 25, 2007
» Visual Studio Team System Chat – August 1, 2007

The next MSDN chat is next Wednesday.  I'm going to try to be on the first one.

Join members of the Visual Studio Team System product group to discuss features available in Visual Studio Team Foundation Server, Team Editions for Architects, Developers, Database Pros, and Testers.

There will be two sessions:

Join the chat on Wednesday, August 1st, 2007 from 10:00am - 11:00am Pacific Time.
Add to Calendar | Additional Time Zones

-or-

Join the chat on Wednesday, August 1st, 2007 from 4:00pm - 5:00pm Pacific Time.
Add to Calendar | Additional Time Zones

July 13, 2007
» Get: Date and time, read/write vs. read only

Periodically we get the following questions about get.

  1. Is there any way to have get set the date and time on a retrieved file to be the last modified date and time from the version control repository rather than the time when it was downloaded?
  2. Is there any way to have get mark files as read/write rather than read only?

The answer to each is no for both TFS 2005 (v1) and TFS 2008 (Orcas).  It's something we considered doing in v1, but we ended up cutting it.  It remains on the list of features to consider for the future.

If you have opinions on this or other version control features, you'll want to let Mario know.

July 7, 2007
» Keyword expansion in TFS

Periodically, the topic of keyword expansion comes up, which TFS (at least through 2008) does not support.  At one point during the v1 product cycle, it was a planned feature and was partially implemented.  However, there are lots of challenges to getting it right in TFS version control, and it wasn't worth the cost to finish the feature.  As a result, we ripped it out, and TFS does not support keyword expansion.

Since it's not supported in the product and not likely to be supported any time soon, folks gravitate toward the idea of using checkin policies to implement keyword expansion.  The idea is appealing since the checkin policy will be called prior to checkin, of course, which would seem to provide the perfect opportunity to do keyword expansion.

Personally, I’m not fond of trying to do keyword expansion as a checkin policy.  There are a number of issues related to checkin policies to deal with immediately, because any checkin policy that performs keyword expansion is going to modify file contents.

  • Checkin policies get called repeatedly.  Every time the user clicks on the checkin policy channel in the pending changes tool window in Visual Studio, for instance, the checkin policies are evaluated.
  • Whatever a policy does must be done really quickly.  Otherwise, you are going to make the VS painful to use.  The checkin policy evaluation isn't done on a background thread, and it wouldn't really help anyway since you wouldn't want to have to wait for some long policy evaluation before the checkin process started.
  • Checkin policies can be evaluated at any time.  The user may or may not actually be checking in at the point that the checkin policies are evaluated.  You even have the option of evaluating checkin policies prior to shelving.
  • For applications using the version control API, checkin policies are only evaluated if the application chooses to evaluate them (see How to validate check-in policies, evaluate check-in notes, and check for conflicts).  Some folks may read this and this it's a hole in checkin policy enforcement.  However, since checkin policy evaluation is done on the client, you can't rely on it being done (i.e., clients can lie and call the web service directly anyway).  The other reason has to do with performance.  For an application like Visual Studio, it controls when checkin policies are evaluated, and by the time that it calls the version control API to checkin, there's no need to evaluate them yet again.  Some day there may be server-side checkins, but they don't exist yet (as of TFS 2008).
  • You've got to get your checkin policy onto all of the client computers that are used to check in.  The deployment story for checkin policies is probably the single biggest hole in the checkin policy feature in the product (the second biggest hole is the lack of built-in support for scoping the policy to something less than an entire team project, though there is a power tool checkin wrapper policy to do that now).  Any computer without the checkin policy assembly on it and properly listed in the registry is not going to do keyword expansion.

If you read that and still want to do it, you would need to pend an edit on each file that does not already have the edit bit set (for example, non-edit branch, merge, rename, and undelete) and is not a delete (can’t edit a pending delete).  I’m pretty sure that VS and the command line will have problems with changes being pended during a checkin policy evaluation, because they’ve already queried for the pending changes and won’t re-query after the pending checkin policy evaluation.  This would result in edits not being uploaded.  This pretty much makes pending edits on files via the checkin policy impractical.

Alternatively, you could do keyword expansion only for changes where the edit bit is already set in the pending change.  That's sort of the "least evil solution."  You would just use the checkin policy for keyword expansion in files that already have pending edits (i.e., check to see that the Edit bit is set in the pending change’s ChangeType).

Some of the files with pending edits may not have actually been changed (e.g., you pended edits on all of the files in a directory as a convenience because you knew you would be editing at least half of them via a script).  When the server detects that a file that's being checked in with only a pending edit hasn't been modified, it doesn't commit a change for that file (i.e., create a new version of that file).  You can read a bit about that in the post, VC API: CheckIn() may return 0.  To detect for yourself whether this is the case, you can compute the MD5 hash of the file content and compare that to the HashValue property of the PendingChange class.  If the two are equal, then the file didn't change.  For those of you doing government work, you'll want to watch out for FIPS enforcement.  When that's turned on in Windows, MD5 hashes are unavailable because the MD5CryptoServiceProvider class in .NET throws when you try to create one.  In that environment, the hash values are empty arrays.

But wait, there's more!  You would also have to make sure that you read and write the file in the correct encoding (e.g., reading in DBCS as ASCII or Unicode would be bad – for example, Japanese or Chinese DBCS files).  There are probably more encoding issues to contend with.  One thing that's probably on your side, though, is that if you do read in the file in the wrong encoding, you won't likely find the markers indicating that the file needs keyword expansion.  To avoid randomly finding the tags when you know you don't want to, you'd likely want to skip all binary files that your expansion logic doesn't know how to handle (e.g., you could conceivably handle keyword expansion in JPEG file headers, but that doesn't seem too likely).

The other thing to consider is how keyword expansion interacts with branching and merging.  Imagine putting the date in every file in a keyword expansion system.  It’s going to be a merge conflict every time your merge branches.  The same is true for log (history) information.  You would need to write a tool to handle the content conflicts; otherwise, merging large branches would be a real bear.

Even with all of that, you are not going to get one of the things that often comes up (and this was true when we were thinking of putting in the product, because it was all going to be done on the client prior to checking in) which is the ability to record the changeset number in the keyword expansion comment.

So, to sum it all up, you are going to need to consider the following.

  1. Your checkin policy will get evaluated multiple times and often not when someone is actually checking in.
  2. You'll want to only modify the files that already have pending edits, as pending new changes from within a checkin policy may lead to new content changes being uploaded with the rest of the checkin.
  3. You'll want to test out how it's going to interact when merging files from one branch to another.  What's it like to deal with the conflicts your keyword expansion introduces?
  4. There will be checkins where keyword doesn't happen for whatever reason, so it's not completely reliable.  This is in addition to the fact that changes that do not already involve an edit won't have keyword expansion at all.

If we had done keyword expansion as a feature, what would have been different (other than the fact that you wouldn't have to think about all of this :-) )?  We wouldn't have the limitation of 1.  Just like in 2, we'd have to think hard about whether every rename, branch, undelete, and merge should have an edit pended also.  At best it would have been an option, and it wouldn't have been the default.  Regarding the branch merging issue, doing something on the server would be a performance hit that may be excessive with large branches (keep in mind that the server stores the content as compressed and doesn't uncompress it -- the client takes care of compressing and decompressing content), so the client would need to have some logic to help make it bearable (e.g., before performing a three-way merge, collapse all of the expanded keywords).

Our conclusion was that the feature was too expensive to implement and test relative to the value provided and other features could be implemented and tested with a similar effort (e.g., making history better).  Folks either strongly agree (can't live without it) or disagree (don't care about it at all) with that conclusion.  There's rarely anyone on the fence.  The feedback we've received to this point indicates that we've made the right tradeoff for the vast majority of our customers (and potential customers).

July 3, 2007
» MSDN chat with the VSTS (including TFS!) product group is today!

The first chat is at 1:00 PM Eastern time, so I'm planning to be in that one.

Join members of the Visual Studio Team System product group to discuss features available in Visual Studio Team Foundation Server, Team Editions for Architects, Developers, Database Pros, and Testers. In addition, discuss what's new in the upcoming Orcas CTP.

We will be holding two sessions:

Join the chat on Tuesday, July 3rd , 2007 from 10:00am - 11:00am Pacific Time. Add to Calendar | Additional Time Zones

                -and-

Join the chat on Tuesday, July 3rd, 2007 from 4:00pm - 5:00pm Pacific Time. Add to Calendar | Additional Time Zones