Buck Hodges

Visual Studio Online, Team Foundation Server, MSDN

  • Buck Hodges

    How to distribute custom checkin policies and work item controls using the power tools


    Custom checkin policies and custom work item controls are great ways to take advantage of the extensibility of TFS.  You can use checkin policies to enforce certain standards on checkins (even in your builds).  Custom work item controls allow you to add controls to your work item forms that present data in particular way, access other systems, etc.  However, there’s no mechanism in Team Explorer to download and install these.

    Youhana has written a post on how to use a feature in the power tools that not many folks know about.  By creating a couple of version control folders in each team project, you can have folks use the Team Members node in Team Explorer to download and install them.  This means that your users don’t need to know where to put the files on disk or the registry entries to create to make them work.  There’s not an auto-update mechanism there right now, so users will need to do this again if you subsequently update the dlls.  To get to this feature, you need to have the Team Foundation Server Power Tools installed on each machine where you want to use this feature.

    Distributing custom check-in policies & WIT controls using team members

    The team members component of the TFS power tools (available here) has a feature to help TFS users distribute custom check-in policies and WIT controls. Basically, the administrator would add the dlls containing the policies and components to a special folder in version control and users then can install the components using the “personal settings” dialog in team members. These are the detailed steps:



  • Buck Hodges

    Moving work item description fields to HTML


    Neno’s been blogging a lot this month, and many of his posts have helpful tools associated with them.  The post below caught my eye as particularly useful.  We’ll be using HTML fields more going forward, and he has a tool to help you move your existing work items to use an HTML field for the Description.

    Enriching your Work Item Descriptions by Moving them to a HTML field

    In the Visual Studio Scrum 1.0 process template (and most likely in future process templates), Microsoft is using HTML fields with rich formatting for the work item description fields.

    In VS Scrum 1.0…

    • Product Backlog Items and Tasks are usingMicrosoft.VSTS.Common.DescriptionHtml.
    • Bugs are using Microsoft.VSTS.TCM.ReproSteps instead.

    You can customize your current process template and add a new HTML description today.



  • Buck Hodges

    VS 2010 SP1 crashes when viewing build on a TFS 2008 server


    Unfortunately, we introduced a regression into Visual Studio 2010 SP1 in the process of fixing a performance issue in the build details view that a number of customers had reported (viewing the log was really slow for larger builds). We made this change late in SP1. I apologize for the inconvenience. I want to make sure you know about that patch if you hit the problem.

    The fix is available at http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=34824.

    KB2522890 - VS10 SP1 crashes on build details from TFS 2008 build explorer

    Issue Description
    Visual Studio 2010 SP1 crashes or shows the following error when attempting to view a build report on a TFS 2008 server:

    "TF50316: The following name is not valid. Verify that the name does not exceed the maximum character limit, only contains valid characters, and is not a reserved name"

    Additional Information about the issue resolved by this Hotfix can be found in its Knowledge Base article at http://support.microsoft.com/kb/2522890

  • Buck Hodges

    Managing TFS 2010: How to clean up test attachment data


    Test attachment data generated by the new testing features in VS 2010 can add a large amount of data to your TFS server.  In fact, we discovered on our own “dogfood” server that test data was taking up more space than the version control data.  You can read more about it in Grant’s post here.

    You can use the Test Attachment Cleaner for Visual Studio Ultimate 2010 & Test Professional 2010 to delete old test data to reduce the size.  Here’s the description from that page.


    In Visual Studio 2010, with the introduction of Visual Studio Test Professional 2010 & Visual Studio Premium/Ultimate 2010 SKUs, testers can author manual and automated Test cases, configure the different diagnostic data collectors (as part of Test Settings), associate the Test Settings with Test Plan/Suites and then execute these test cases as part of Test Runs. The execution of a Test Run (whether automated or manual) generates a bunch of diagnostic data, which may be captured either automatically by the system or manually by the tester. This diagnostic data is critical in eliminating the “no repro” bug scenarios between the testers and developers.

    However, the downside of this rich diagnostic data captures is that the system/user generated diagnostic data, over a period of time, can grow at a rapid pace and start taking up database space. With Visual Studio 2010, the database administrator has little or no control over what data gets attached as part of Test Runs – i.e., there are no policy settings he can control to limit the size of the data capture OR no retention policy to determine how long to hold this data before initiating a cleanup. In such scenarios, the Admin has no mechanism to:

    1. Determine which set of diagnostic captures is taking up how much space AND

    2. Reclaim the space for runs which are no longer relevant from business perspective.

    The “Test Attachment Cleaner” powertool fills this void by serving both the above points.

  • Buck Hodges

    Visual Studio setup projects (vdproj) will not ship with future versions of VS


    [UPDATE 04/18/14] The Visual Studio team has released an extension to VS 2013 to address the feedback on this, which has been loud and clear for a long time now: Visual Studio Installer Projects Extension.

    [UPDATE 11/6/12] Fixed broken links.

    At the user group meeting last night, someone asked about the future of WiX.  There was some confusion over the future of WiX since at one point there was a plan to ship it but then that changedRob Mensching, who leads the WiX project, is a developer on Visual Studio, and Visual Studio continues to contribute to the WiX project.  We use WiX to create the installation packages for VS and a bunch of other stuff.

    The Visual Studio setup projects will not ship again – VS 2010 was the last release with support for it.  So, you’ll want to make plans to migrate to something else.  Of course, I’d suggest looking into WiX, and there are other options as well.  The MSDN page Choosing a Windows Installer Deployment Tool contains a table showing a comparison of VS setup projects, WiX, and InstallShield Limited Edition.


    Future versions of Visual Studio will not include the Visual Studio Installer project templates. To preserve existing customer investments in Visual Studio Installer projects, Microsoft will continue to support the Visual Studio Installer projects that shipped with Visual Studio 2010 per the product life-cycle strategy. For more information, see Expanded Microsoft Support Lifecycle Policy for Business & Development Products.

  • Buck Hodges

    Hidden gem in TFS 2010: How to rollback a changeset with tf rollback


    [UPDATE 8/8/11]  The TFS 2010 power tools now provide rollback in the UI as described here.

    Tonight Justin and I spoke to the Minnesota Visual Studio User Group.  It was completely unscripted, and we had a great time answering questions and telling a few stories (can you name the original code names for version control, work item tracking and load testing?).  Nearly everyone in the audience was using TFS, and many folks had already moved to TFS 2010.  We covered a lot of ground, touching on parts of VS and ALM – more than just TFS.  I got to thinking as folks were asking questions what might be the one TFS 2010 feature folks in the room probably didn’t know about.  I asked how many folks knew about rollback, and there were just a couple of hands.  I’m pretty sure they were thinking of the rollback command in the tfpt.exe power tool for 2008 and 2005.

    We added a full-featured rollback command to tf.exe in Team Foundation Server 2010. You can only use it from the command line, so a lot of folks don’t know about it.  We had plans to add it to the UI (the rollback command was implemented very early in the 2010 development cycle), but higher priority work prevented us from getting to it.

    The 2010 rollback command is implemented on the server, handles all of the change types, and it properly rolls back merge history so that it is as if the merge never happened if you roll back a merge (you can control that via a switch if you want a different behavior).

    C:\Program Files\Microsoft Visual Studio 10.0\VC>tf rollback /?
    TF - Team Foundation Version Control Tool, Version 10.0.30319.1
    Copyright (c) Microsoft Corporation.  All rights reserved.

    Rolls back the changes in a single or a range of changesets:
    tf rollback /changeset:changesetfrom~changesetto [itemspec] [/recursive]
                [/lock:none|checkin|checkout] [/version:versionspec]
                [/keepmergehistory] [/noprompt] [/login:username,[password]]

    tf rollback /toversion:versionspec itemspec [/recursive]
                [/lock:none|checkin|checkout] [/version:versionspec]
                [/keepmergehistory] [/noprompt] [/login:username,[password]]

        Date/Time         D"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

    So, the next time someone checks in something accidentally (or worse!), you can roll it back easily!  We’ve done this internally a few times.  :-)


  • Buck Hodges

    TFS 2010 SP1: Unknown error (0x80005000) (type COMException) – Make sure IIS 6 compat mode is turned on


    [Update 3/16/11]  There is a KB article with TFS 2010 SP1 installation troubleshooting should you hit problems: http://support.microsoft.com/kb/2516423.


    A customer ran into this issue, and I want to post it to help anyone else who hits it.  The symptom is that you install Service Pack 1 for Team Foundation Server 2010, and it fails.

    At first, we looked at the KB log file, which is an HTML file named something like KB2182621_20110314_153652021.htm (after the KB number, it’s the date and time – one log will be generated per failed attempt).  That file doesn’t contain the error unfortunately, but towards the end you will find a reference to a file with a name like {some path}\KB2182621_20110314_153652021-Microsoft Team Foundation Server 2010 - ENU-MSP0.txt, as highlighted in the log snippet below.  In that log file you will find the real error (search for the word error until you find something that looks like the stack pasted at the end of this post).

    Wait for Item (VS10-KB2182621.msp) to be available
    VS10-KB2182621.msp is now available to install
    Creating new Performer for Patches item

         Entering Function: BaseMspInstallerT >::PerformAction...

         Action: Performing Install on MSP: c:\7b04dc4d154aa5031a470fad\VS10-KB2182621.msp targetting Product: Microsoft Team Foundation Server 2010 - ENU...

            Successfully called MsiEnableLog with log file set to C:\Users\xxx\AppData\Local\Temp\KB2182621_20110314_153652021-Microsoft Team Foundation Server 2010 - ENU-MSP0.txt
            Log File C:\Users\xxx\AppData\Local\Temp\KB2182621_20110314_153652021-Microsoft Team Foundation Server 2010 - ENU-MSP0.txt does not yet exist but may do at Watson upload time
            about to call MsiInstallProduct with PATCH="c:\7b04dc4d154aa5031a470fad\VS10-KB2182621.msp" on product {BD8885BD-CFE2-3E43-99BC-33EC4E109EF5}(C:\WINDOWS\Installer\90c8f.msi) to install patches.
            Patch (c:\7b04dc4d154aa5031a470fad\VS10-KB2182621.msp) Install failed on product (Microsoft Team Foundation Server 2010 - ENU). Msi Log: 
            MSI returned 0x643

    Entering Function: MspInstallerT >::Rollback...

    exiting function/method

    Here we found the following lines.  Bryan and Mahmoud found that the 0x80005000 error occurs when trying to access IIS through ADSI and IIS6 compat mode is not installed.  This was indeed the problem!

    CAQuietExec: Exception Message: Unknown error (0x80005000) (type COMException)

    CAQuietExec: Exception Stack Trace: at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)


    Make sure IIS 6 Management Compatibility is turned on (Start –> Control Panel –> Programs –> Turn Windows Features On or Off)


    Make sure the IIS Admin Service is running (Start –> Run… services.msc)



    Here is the full error from the log to help anyone search for parts of it through a search engine.

    CAQuietExec:   Invoking operation Stop on application pool: Microsoft Team Foundation Server Application Pool
    CAQuietExec:   Exception while invoking operation Stop on application pool Microsoft Team Foundation Server Application Pool
    CAQuietExec:  Exception Message: Unknown error (0x80005000) (type COMException)
    CAQuietExec:  Exception Stack Trace:    at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Bind()
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.get_NativeObject()
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object args)
    CAQuietExec:     at Microsoft.TeamFoundation.Admin.ApplicationPoolHelper.InvokeOperationOnApplicationPool(String appPoolName, String operation)
    CAQuietExec:  Failed executing the command quiesce: Microsoft.TeamFoundation.Admin.ConfigurationException: An error occurred while invoking operation Stop on application pool Microsoft Team Foundation Server Application Pool. Please see the log file for additional details. ---> System.Runtime.InteropServices.COMException: Unknown error (0x80005000)
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Bind()
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.get_NativeObject()
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object args)
    CAQuietExec:     at Microsoft.TeamFoundation.Admin.ApplicationPoolHelper.InvokeOperationOnApplicationPool(String appPoolName, String operation)
    CAQuietExec:     --- End of inner exception stack trace ---
    CAQuietExec:     at Microsoft.TeamFoundation.Admin.ApplicationPoolHelper.InvokeOperationOnApplicationPool(String appPoolName, String operation)
    CAQuietExec:     at Microsoft.TeamFoundation.Admin.ApplicationPoolHelper.StopApplicationPool(ApplicationPoolType type, Boolean waitForWorkerProcessTermination)
    CAQuietExec:     at Microsoft.TeamFoundation.ServiceControl.TfsServiceControl.QuiesceApplicationTier()
    CAQuietExec:     at Microsoft.TeamFoundation.ServiceControl.TfsServiceControl.Quiesce(IEnumerable`1 featureList)
    CAQuietExec:     at Microsoft.TeamFoundation.ServiceControl.TfsServiceControl.Main(String args)
    CAQuietExec:  > Inner Exception:
    CAQuietExec:  System.Runtime.InteropServices.COMException (0x80005000): Unknown error (0x80005000)
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Bind()
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.get_NativeObject()
    CAQuietExec:     at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object args)
    CAQuietExec:     at Microsoft.TeamFoundation.Admin.ApplicationPoolHelper.InvokeOperationOnApplicationPool(String appPoolName, String operation)

  • Buck Hodges

    The book to buy on team build: Using MSBuild and Team Foundation Build, Second Edition


    If you are responsible for work with your team’s build system, you will definitely want to buy a copy of Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build (Second Edition).  Both of the authors now work for Microsoft.  William Bartholomew is part of the central engineering team and has been building the infrastructure to allow Team Foundation Build to be used as the build system for all of the developer division.  You can follow that progress and find more info on team build on his blogSayed Ibrahim Hashimi works on the web platform team, and he writes a lot about building web projects on his blog.

    This second edition contains extensive coverage of build in Team Foundation Server 2010, which introduced Windows Workflow Foundation (WF) as the new build process orchestration mechanism.  WF provides a fantastic platform for your build process needs, and this book helps you get over the learning curve and become productive faster.

    I highly recommend it, and the reviews on Amazon are further testimony to how valuable this book is.


  • Buck Hodges

    Web projects and team build


    Vishal Joshi, lead program manager for web platform tools, has a great blog covering using various project types with Team Foundation Build.  Here’s a selection of his posts on using team build, which I highly recommend if you are working with web projects.

  • Buck Hodges

    Improvements to baseless merge in TFS 2010 SP1


    Starting with TFS 2010 SP1, there are two improvements to how baseless merges work: base file version and handling deleted files.

    First is that if you specify a starting range for a baseless merge, we will now use that changeset as the base in the three-way content merge. That results in a vastly improved experience in merging file content for a baseless merge. For example, tf merge /baseless /v:1234~1234 $/ProjX/foo $/AcmeV2/foo or tf merge /v:1234~T $/ProjX/foo $/AcmeV2/foo.

    The second is the handling of deletions. Before the change, items that are deleted in the source branch were not included in the baseless merge. That meant that if you had deleted obsolete files as part of your changes they would not get deleted in the target branch when doing a baseless merge. After the change, if a path is deleted in the source the corresponding path in the target will have a merge,delete conflict. Also, if a file is not deleted in the source but is deleted in the target, the target will get a merge,undelete conflict. The result is that you get a higher fidelity result in the target branch. This was made possible by the changes in TFS 2010 where merge lines up the items by path rather than by item ID.

  • Buck Hodges

    Can you downgrade from SQL Enterprise to SQL Standard?


    Question: Can a TFS 2010 Team Project Collection (TPC) on SQL Server 2008 Enterprise be down converted to SQL Server Standard 2008 edition?

    Answer: This is covered in the 2010 Upgrade guide post.

    The script is: exec prc_EnablePrefixCompression @online = 0, @disable = 1

    (answer provided by Ed Holloway)

  • Buck Hodges

    Code metrics command line tool


    [UPDATE 3/24/12]  You can find a real code metrics activity here as part of the Community TFS Build Extensions.

    Cameron Skinner has announced a new command line tool for generating code metrics.  We’ve long gotten requests to be able to generate code metrics from the build.  Prior to this tool, code metrics could only be generated from within the Visual Studio IDE.

    I installed it this morning.  The readme link on the download page tells you where it is installed, which is %programfiles%\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop.

    I wanted to do the simplest possible thing (i.e., quick and dirty!) I could to give it a try this morning as part of a 2010 TFS build.  I grabbed the copy of Professional Application Lifecycle Management I happened to have sitting here on my desk at home (thanks, Martin) and turned to page 504 to follow the ZIP archive example to get me started.  You can get the entire build chapter for free (same with the manual testing chapter).

    1. Open up the default build process template in the WF designer (e.g., open the build definition, click Show Details on the Process tab, click on the hyperlink, and double click the file)
    2. Scroll to the bottom of the workflow.
    3. Drag an InvokeProcess activity into the build process.  Drop it in as the last activity in the Try, Compile, Test sequence (drop it after the symbol activity, just before the catch block).
    4. Right click on the InvokeProcess activity and show parameters
    5. Set the following properties, fixing up the paths for your machine and the hard-coded assembly name (like I said, I went for the quick and dirty just to see it work).
      1. Arguments: String.Format("/f:""{0}"" /o:""{1}""", System.IO.Path.Combine(BinariesDirectory, "ConsoleApplication1.exe"), System.IO.Path.Combine(BinariesDirectory, "out.xml"))
      2. DisplayName: Code Metrics
      3. FileName: "D:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\metrics.exe"
    6. Drop a WriteBuildMessage into the bock for the standard output and a WriteBuildError for the error output.
    7. Set the following for WriteBuildMessage
      1. Importance: Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High
      2. Message: stdOutput
    8. Set the following for the WriteBuildError
      1. Message: errOutput

    Then I checked in my build template changes and ran a build.  The drop folder now contains a file called out.xml with the code metric data in it.

    You can find documentation on all of the activities here on MSDN.


    [UPDATE 1/30/10]  Martin sent me the links to the build and testing chapters, which I’ve added above.

  • Buck Hodges

    Changes to the work item type schema reference docs


    The folks who produce our documentation continue to experiment and find ways to improve our documentation.  The most recent change involves consolidating docs.  I’d encourage you to take a look and give them feedback.

    Significant Changes Made to Streamline the Content for Work Item Type Schema Reference

    A move has been afoot to eliminate topics that no one is reading anyway. By consolidating content into a smaller topic set, we believe that you will more easily access the information that supports you in accomplishing your tasks. In the area of defining and customizing the definitions of work item types, this initiative has represented a significant rework to the content that was previously published under the Work Item Type Schema Reference topic node.

    We have made the following changes to this content area:

    • Consolidated content so that you can access the syntax structure and attribute definitions of all elements that support  specific functional tasks - such as the definition of fields, workflow, and work item forms.
    • Kept and updated specific XML element reference topics that warrant keeping, such as the FIELD (Definition) and Control elements.
    • Renamed and enhanced topics to include attribute definitions and examples.
    • Eliminated all remaining reference topics whose content had been consolidated, this included many of the element definition and all of the schema definition topics.


  • Buck Hodges

    Join the TFS development team and help shape the industry

    Do you want to be a developer on the TFS team, solve challenging problems, and break new ground in ALM?  Then join the TFS development team in Redmond, WA.

    You’ll notice that we mention cloud computing with Azure below.  If you saw the PDC keynote demos this year, you saw some early work on getting TFS running on Azure.  If you missed it, go to the 2:09:50 mark of the “PDC10 keynotes with Steve Ballmer and Bob Muglia” recording on the PDC10 site to see Brian Harry demo TFS on Azure (Brian also wrote a blog post about TFS on Azure).  We’re working on great new features with some very exciting technology.

    Software Development Engineer (Redmond, WA)

    Did you know that 30% of all software projects are cancelled, nearly half come in over budget, 60% are considered failures by the organizations that initiated them, and nine out of ten come in late? Join us to help change the industry!

    Visual Studio Team Foundation Server is the industry leader in application lifecycle management (ALM) tools – helping software teams build better software faster. TFS provides project management, version control, build, and ALM analytics. We are building our services in the cloud using Windows and SQL Azure platforms and making TFS available 24x7 over the internet.

    We have an opening for a talented and highly motivated software developer with a passion for algorithms and client/server software. You will design and implement key features for TFS. The position will require you to have or gain extensive knowledge of one or more of these technologies: WPF, ASP.NET, Visual Studio Industry Partner (VSIP) API, Web Services, WinForms, C#, and the .NET Framework. We’re looking for a candidate who seeks big challenges as part of a strong team and can mix great collaboration skills with an ability to work independently and deliver well thought out solutions to tough problems.

    If you enjoy solving tough problems and being part of a great team that’s making software development better, join TFS!

    Key Responsibilities:

    • Design and implement highly scalable, high performance work item tracking features.
    • Deliver state-of-the-art solutions for work breakdown and management with focus on delivering exceptional user experience.
    • Participate in prioritization activities by identifying technical issues early and throughout the end-to-end software development lifecycle

    The ideal candidate would have the following qualifications:

    • 2 - 4 years of commercial software development experience
    • Exceptional problem solving skills
    • Strong coding and debugging skills
    • Excellent UI design skills
    • Good understanding of efficient data structures and algorithms
    • A proven track record of shipping quality software
    • Capable of working independently and within a team
    • Passion for engineering excellence, learning and advancement
    • Sound understanding of multi-tiered system architecture
    • Experience with Scrum or other agile methodologies is a big plus

    We also have openings for program managers and testers.

  • Buck Hodges

    Join the TFS development team and help shape the ALM industry

    See updated post.

  • Buck Hodges

    Help improve MSDN – give them your feedback


    Please take a moment to provide feedback to the documentation team on the changes they’ve made recently.  They want to know what you think.  Thanks!

    We need your input on how well our improvements to the MSDN Library content work for you. Allen Clark has reorganized the topic: "Extending Visual Studio Application Lifecycle Management" and would like to know if these updates make the topic more useful for you:

    "I've been working on streamlining some content in an effort to make it easier for you to get the information that you need. The first place I did this was in the Team Foundation SDK, in Extending Team Foundation and Extending Work Item Tracking. I'm looking at doing the same thing for Extending Visual Studio Application Lifecycle Management. Here's the topic in its streamlined form. I'd like to hear back from anyone who uses the APIs for VSALM and Team Foundation to learn whether this works well for you, compared to the previous version. Any other feedback on this topic is also welcome, of course. For example, I think that it's clear that this topic could use a more thorough discussion of the API set for ALM as a whole."

    To learn more, please click here.

  • Buck Hodges

    How to convert a branch back to a regular folder


    In an effort to remove a small amount of complexity from the UI, we have the command to convert a branch back to a folder appear only under the main menu and not in the right click menu.  The way to convert a branch back to a regular folder is to do the following.

    1. Bring up Source Control Explorer
    2. Select the branch to convert back to the folder
    3. On the main menu bar, click File -> Source Control -> Branching and Merging - > Convert to Folder

    Why would you want to do this?  The reason would be just to remove the branch from branch visualizations if you’ve decided you never want to see it again.  This does not change the branching relationship, so you can still merge to and from the branch as before (it just affects the visualization and the properties you see in Source Control Explorer).

    You can also do this if you need to remove a deleted branch from showing up in branch visualization.  If you find that a deleted branch is still showing up, you can turn on the option to see deleted items in Source Control Explorer and follow the instructions above.

    The full MSDN doc page on this is at http://msdn.microsoft.com/en-us/library/ms181425.aspx.

  • Buck Hodges

    How to figure out whether a change has made it to another branch


    [UPDATE 11/5/12] I wanted to add that when using either the hierarchy view or the track changeset view, you can use Ctrl-C when the window has focus to get an image of it copied to the clipboard rather than having to use a screenshot tool.

    One of the great features in TFS 2010 is the ability to track changesets across branches. A prime user scenario for this feature is determining whether a fix has made it to a particular branch. Here’s an example of how to do that.

    How to track a changeset number:

    1. Bring up Source Control Explorer in VS by double clicking the Source Control node in Team Explorer (or make sure SCE has focus)
    2. Press Ctrl-G to bring up the Go to Changeset dialog (or Edit -> Go To… from the main menu)
    3. Enter the changeset and click Track Changeset. For this example, I’ll use 1984519 on our internal server.
    4. Specify the branches you want displayed and click Visualize. In this case I’m interested in Main. Because the change originates in MQTools, it is required and automatically selected. I also specified MQALM to show a branch where the fix has not been merged. The screenshot on the left shows the hierarchy view, and clicking the Timeline Tracking toolbar button shows the timeline view.
    clip_image002 clip_image002[4]


    How to track a work item:

    If you have a work item that has a changeset link, it’s even simpler. Bring up the work item form, right click on the form, and choose Track Work Item.


    Technorati Tags: branch,tfs,tfs 2010

  • Buck Hodges

    How to use the MSBuild debugger in Visual Studio 2010


    Dan Moseley, dev lead for msbuild, wrote a debugger for msbuild while on leave(!) back during the 2010 cycle.  While it ultimately couldn’t be fully completed and tested to be an official feature, it is in the product with a switch to enable it (it’s off by default).  This was a conscious decision made by the VS team, and I think it was a great compromise.  It wasn’t something feasible as a power tool, and it’s too useful to have to wait for the next release.

    Dan has written a series of blog posts on how to use it.


    Technorati Tags:
  • Buck Hodges

    Reports to show you what’s happening with the TFS warehouse and cube


    Grant has posted a set of reports that help you understand what’s going on in the TFS warehouse and cube in Team Foundation Server 2010 so that you can deal with issues such as field collisions, which can be very tedious to handle since out of the box we don’t provide easy ways to figure it out.  His post includes an attached zip file that you can download and deploy to your TFS 2010 installation.

    Administrative Report Pack for Team Foundation Server 2010

    One of the key components of TFS is the Data Warehouse, which is made up of a relational database and an Analysis Services cube.  In general, people don’t have a problem with the performance or operation of our Data Warehouse.  However there were two classes of problems that you’re likely to run into as your servers grow larger:

    1. Processing Time – As the number of reportable fields increases, the number of dimensions that Analysis Services has to process also increases.  This increases the time it takes to process the cube and therefore the latency of the data is higher.
    2. Schema Conflicts – In the simple case, when there are two fields in different collections (e.g. Priority) with the same name but a different type (e.g. String vs. Integer) this results in a schema conflict.  That project collection is then blocked from processing warehouse updates and the data in the warehouse & cube becomes stale.

    These reports are useful to TFS administrators, operations/support teams, project administrators & end-users.  The reports in this pack display the following kinds of information:

    • Recent processing times
    • Current status (whether the cube is processing now and, if not, when it is scheduled to process next)
    • Schema conflicts
    • Most recent time that each adapter successfully ran


    Technorati Tags: ,
  • Buck Hodges

    Team Foundation 2010 SDK published


    Allen Clark has announced the publication of the first release of the TFS 2010 SDK.  This represents a significant improvement in the documentation for the TFS API, and he will be releasing updates to it on a recurring basis.  The first release is small (relative to the size of the TFS API), but it will grow.  Be sure to leave feedback for Allen on what you find most valuable.

    Technorati Tags: ,
  • Buck Hodges

    Understanding changes in reporting in TFS 2010


    Sunder Raman, a program manager for TFS, has written a series of posts on the changes to the warehouse and the cube for 2010.



    John Socha-Leialoha, a developer on TFS, wrote a series on upgrading your reports.

    If you are interested in writing your own warehouse adapter, you’ll find the sample adapter in the SDK to be very helpful.

    If you have any questions about these topics, please contact Sunder and John.


  • Buck Hodges

    Posts on using the new team project collection APIs


    Taylor Lafrinere, a developer on Team Foundation Server who wrote a significant part of the new core server infrastructure APIs, has written a series of posts explaining some of the different parts.  If you have other parts of the API that you are interested in, be sure to leave a comment on one of his posts.

    Here are a few of his posts to get you started.

    Technorati Tags: ,
  • Buck Hodges

    Use test categories rather than test lists (vsmdi files)


    Years ago, I posted an msbuild task to run tests without test lists for VSTS 2005.  That functionality made it into VSTS 2008.  Then Pierre Greborio added support for test categories.  That test category capability is now available in VS 2010.  Using test categories is now the preferred way of running groups of tests, and you no longer need to deal with tests lists (.vsmdi files), which are tedious to maintain and very difficult to merge.

    Here’s the documentation on MSDN to show you how to make use of test categories in the 2010 release.

    Defining Test Categories to Group Your Tests

    If you have created automated tests using Microsoft Visual Studio 2010, you can manage these tests by categorizing them with test categories. When you run these automated tests using Visual Studio, Team Foundation Build, or mstest.exe, you can use these test categories to easily select which tests you run. You add test categories as attributes to your test methods.

    Test categories provide more flexibility than the test lists functionality from earlier versions of Microsoft Visual Studio. You can use logical operators with test categories to run tests from multiple categories together or to limit the tests that you run to tests that belong to multiple categories. Also test categories are easy to add as you create your test methods and you do not have to maintain test lists after you have created your test methods. By using test categories, you do not have to check in and check out the <solution name>.vsmdi file that maintains the test lists.


    Technorati Tags: ,
  • Buck Hodges

    TFS 2010 version control upgrade bug in handling labels, merges


    UPDATE [6/12/2010]  The patch is now available on MSDN Code Gallery here.  You must install it after you complete the MSI setup portion (the files need to be on the machine and registered in Windows first) and before the upgrade wizard (it’s the upgrade process, not setup that needs to be patched).

    1. Run the TFS 2010 installation and quit/cancel once you get to the upgrade wizard (do not upgrade).
    2. Install the patch.
    3. Go to Start –> All Programs –> Microsoft Team Foundation Server 2010 –> Team Foundation Administration Console and then launch the upgrade wizard again.
    4. Go through the upgrade process as usual.


    We discovered a couple of bugs in version control when upgrading to TFS 2010.  They affect labels and future merges, and whether or not you are affected depends on what renames you have done on files in labels and branches.  We are currently testing a fix that we expect to release shortly.  The fix, when released, must be installed before upgrading to TFS 2010.

    The issues are described in a KB article, which Matt published today.  Here are the symptoms that manifest after an upgrade without the fix.

    • Labels that were created before the upgrade are entirely empty.  Labels could be also have incorrect contents.
    • The merge wizard in Visual Studio does not display all valid merge targets for a given source path/branch.
    • During merging, merge candidates are shown for changes that were already merged prior to the upgrade.

    If you’ve already upgraded to 2010 from a previous release, you’ll need to decide whether there are labels that are critical for you.  If there are, fixing the label problem after an upgrade without the fix will likely require access to the original version control database prior to the upgrade.  You’ll need to contact customer support to get help with fixing the affected labels (customer support will not charge for incidents related to this upgrade bug).

    The merge issue is simpler to recover from, and it’s largely an annoyance.  You can read the KB article to understand what must happen.  The fix for the issue of merge targets not showing up in the merge wizard is to do a non-recursive baseless merge of the source to the target via the command line (e.g., tf merge /baseless dirA dirB).  Then the target will show.  The children will end up being baselessly merged, which will be annoying and tedious, but you will be able to recover and move forward.

    The underlying cause of both problems is the handling of renames during the upgrade, as described by the KB article.  In TFS 2010, we changed the schema of version control to change something called an item ID to effectively become a path ID. In both 2005 and 2008, every item added or branched in version control got a unique item ID forever.  So no matter what name or path changed to, the item ID never changed.  This allowed for completely tracking renames forever, no matter how complex.  However, it came at the price of introducing the confusing concept of a deletion ID, since a path could have more than one item at a time if there were at least one deleted item, and the concept of a namespace conflict, which occurs when two different non-deleted items (each has a different item ID in 2005/2008) tried to occupy the same path at the same time.  If you’ve ever had to resolve namespace conflicts in 2005 or 2008, particularly as a result of a merge, you know the pain I’m talking about. It also resulted in significant complication of the SQL, resulting in lower performance and scalability than otherwise would have been possible.

    So, we changed the schema such that a path uniquely identifies an item, turning the item ID into a path ID.  Matt talks about some of the implications of that in his post, Changing to Slot Mode in TFS 2010 Version Control.  Having used the server with the schema change for more than a year now internally, the change produced a faster, more scalable version control server, and the elimination of things like namespace conflicts has made merging less painful.

Page 4 of 23 (573 items) «23456»