Steve Lange @ Work

Steve Lange's thoughts on application lifecycle management, Visual Studio, and Team Foundation Server

June, 2010

  • Steve Lange @ Work

    Thoughts on TFS Project Collections


    New to TFS 2010, Team Project Collections (TPCs) provide an additional layer of project organization/abstraction above the Team Project level (see the MSDN article, “Organizing Your Server with Project Collections”)

    I’ve been asked numerous times over the past couple of months about the intention of project collections, their flexibility and limitations.  Below are simply my educated thoughts on the subject.  Please do your due diligence before deciding how you wish (or wish not) to implement project collections in your environment.

    You can use collections to more tightly couple related projects, break up the administrative process, or to dramatically increase scale.  But the primary design goal behind introducing project collections is around isolation (of code, projects, or groups within an organization) in a way that provides all the benefits of TFS, scoped to a defined level within a single instance of TFS.  You’re effectively partitioning TFS.

     Basic project collection structure


    If you have ever used TFS 2005 or 2008, think of it this way.  A project collection effectively compartmentalizes all the capabilities you’ve grown to love in a single TFS 2005/2008 instance:

    Project collection compartmentalization

    I won’t go into how you create/edit/delete project collections.  Just know that you can.  (BTW – for those of you upgrading from an earlier version of TFS, your existing projects will go into a single default project collection (by default, it’s named “Default Collection”.  Original, right?)

    Consider this (over-simplified) example.  I have 4 projects in my server, currently in a single (“default”) collection:

    Single collection view

    Say Project A and Project B are used by “Division A” in my company, and Agile1 and Sample Win App are used by “Division B”.  Project A and Project B share some code and leverage the same user base.  The assets in each division’s projects are in no way related to the other.  Consequently, I’d love to take advantage of project collections and separate our divisions’ stuff.  A more practical implementation of project collections might look like this:

    I build out my collections using the TFS Administration Console to look like this:

    Viewing my project collections in the admin console

    Once that’s done, I can ultimately end up with such a structure that my desired projects are contained in their respective organization’s collection:

    Division A’s stuff:

    Division A's collection

    Division B’s stuff:

    Division B's collection

    Now each division’s stuff is effectively compartmentalized.  No shared process templates, no shared user base, and no shared database (which means one division’s screw-up won’t affect another division’s work).

    Okay, so I lied a little – I earlier said I wouldn’t go into detail about how to CRUD collections.  But I will mention one thing here, which will add context to the above scenario.  In the above, I had a single collection that I effectively wanted to split into two collections (i.e. go from “Default Collection” to “Division A” and “Division B”).  This is surprisingly easy to do (more complicated than drag & drop, but not ridiculous either).  The documentation for splitting a collection lists 15 main steps to accomplish this, but basically what you’re doing is cloning a collection and then deleting what you don’t want.

    See?  I told you it would be a simple example.  But if you expand this to think of a TFS environment with 100 projects (instead of my puny four), you get the point.

    This all sounds pretty cool, right?  It. Is. Very. Cool.  Project collections can be used for various purposes in your TFS deployment (consolidating related development efforts, scaling the SQL backend, mapping TFS hierarchy to organization hierarchy, etc.).  However, with flexibility comes complexity.  If you had fun sitting around a conference table debating how to structure your TFS 2005/2008 project hierarchy (perhaps consulting our branching guidance document or patterns & practices?), project collections add a new element to consider for 2010.  Below I’ve outlined some of the main considerations for you and your team to think about before taking advantage of project collections in TFS 2010.

    For Systems Administrators:  Pros & Cons


    • Flexibility to to backup/restore collections individually.  This can reduce downtime as restoring one collection will not impact users of other collections.
    • Since each collection is contained in its own database, these databases can be moved around a SQL infrastructure to increase scale and load balancing.
    • Could help consolidate IT resources.  If your organization currently leverages several TFS instances simply to isolate environments between departments, collections can allow the same TFS instance to be used while still providing this isolation.


    • Again, with flexibility comes complexity.  Since project collections use their own databases, each one must be backed up (and restored) individually.  Also, other admin tasks such as permissions and build controller configuration grow proportionately as additional collections are created.
    • Users and permissions need to be administered separately for each project collection (this may also be a project admin consideration).
    • There are more databases to restore in the event a full disaster recovery is needed.

    For Project Administrators:  Pros & Cons


    • Organizational hierarchy.  If your organization has multiple divisions/departments, you can break up your TFS project structure to reflect that organizational view.  This makes it much easier for users to identify (or constrain via permissions) which projects belong to their department.
    • Projects grouped in the same project collection can leverage similar reports (“dashboards”) work item types, etc.  They can can also inherit source code from other grouped projects.


    • In Visual Studio, you can only connect to one collection at a time.  While it’s relatively trivial to simply connect to a different collection, you can’t view team projects in Team Explorer that reside in different project collections.
    • Relationship-specific operations you enjoy across team projects cannot span project collections.  This means that there are several things you cannot do across collection boundaries, such as:
    • Branch/merge source code (you can do this cross-project, but not cross-collection)
    • Query work items (i.e. you can’t build a query that will show you all bugs across multiple collections)
    • Link items (i.e. you can’t link a changeset in one collection to a task in another collection)
    • Process templates are customized and applied at the project collection level, not the TFS server level

    What does it boil down to?

    It’s really about your need for isolation.  Do you ideally want to isolate by application/system, organization, or something else?  Do you foresee a need to share code, work items, or other assets across projects?  It’s a fun little decision tree:

     Basic, over-simplified decision tree

    So that’s it!  The devil is always hiding in the details, so do your own research and use your own discretion when deciding how to adopt project collections into your TFS deployment.  I anticipate more guidance on this topic to come out as TFS 2010 installations propagate throughout the world.

    For more resources and practical guidance on using Team Foundation Server, see the TFS team’s blog on MSDN.

    I hope this helps you somewhat!  And thanks for reading!

  • Steve Lange @ Work

    Ordering Method Execution of a Coded UI Test


    There’s often no discernable, consistent pattern that dictates the execution order of automated tests (Coded UI in this example, but the same applies to Unit Tests).  Some argue that it may be a good thing that there isn’t an inherent pattern for the execution of CodedUI tests (and unit tests, for that matter), as a seemingly more random pattern can uncover test dependencies which reduce the overall effective coverage of tests.  And I agree with that to an extent, but there are always cases in which control over execution order is needed.

    An easy way to accomplish test order is to use an Ordered Test. This will provide you explicit control over the execution order of your tests.

    For this example, I have a Coded UI Test class called CodedUITest1 (for more on Coded UI Tests, see the Anatomy of a Coded UI Test).  In it, I have two CodedUI Test methods:

    • CodedUITestRunFirst()
    • CodedUITestRunSecond()

    I want to order them such that they execute like:

    • CodedUITestRunSecond()
    • CodedUITestRunFirst()

    1. Add a new Ordered Test. Go to Test->New Test, and select Ordered Test.

     New test window

    2. The ordered test will open. I can move the available tests from the left list into my ordered test list on the right. I can then move the tests up/down to create the desired order.

     Ordered Test dialog

    It’s not shown in this screenshot, but there is a checkbox to allow the ordered test to continue upon a failure.

    3. Save the ordered test. I can now see the ordered test in my Test View window.

    Test View window showing new ordered test

    4. When ready, I select to run my ordered test. It will appear in the Test Results window as a single test.

    Test Results window showing ordered test

    When finished, I can double-click on the test result to see that both tests did actually run, their individual results, and their order.

    Detailed results of ordered test

    It’s a surprisingly easy yet elegant solution.  I can put pretty much any automated test into an ordered test (except for load tests).  If you have a lot of tests, coupling the use of ordered tests with other test lists can really help visually organize your test project.

  • Steve Lange @ Work

    Visual Studio 2010 Feature Packs are Here


    MSDN logo There are two feature packs releasing today, with a third on its way in the coming weeks.  If you’re using VS 2010 Ultimate and are an MSDN subscriber, enjoy the Visualization and Modeling Feature Pack!

    You can get ‘em here:

    Jason Zander has blogged about the feature packs in much more detail, but here’s a bulleted list of goodies:

    Visual Studio 2010 Visualization and Modeling Feature Pack

    • Visualize your native (C++) code
    • Visualize Web Application Projects, Web Sites, and ASP.NET MVC code
    • Code Generation from UML Class diagram
    • Rapid population of Modeling Store from Architecture Explorer
    • XMI 2.1 Import
    • Work Item to Model Element Back linking
    • Layer Diagram Extensibility

    And free for everyone (using VS 2010), introducing the Productivity Power Tools!  You can get this from the Visual Studio Gallery.

    Visual StudioVisual Studio 2010 Productivity Power Tools

    • Document Tab Well – One of the key pieces of feedback that we have received over several versions of Visual Studio is that users want to be able to customize the behavior of their document tabs.  From the ordering of tabs to the position of the close buttons, user can now configure dozens of different options for their tabs. To configure this option, on the Tools menu, click Options -> Environment -> Document Tab Well to configure it as you prefer.
    • Extension Update – Provides a bubble tip when there are updated versions of the Pro Power Tools or any other extensions available on the Visual Studio Gallery. To try this experience, install this old version of the “Collapse Selection in Solution Explorer” extension and restart Visual Studio.
    • Highlight Current Line – As the resolution of monitors increases, it’s becoming more difficult to find the caret in the code editor. The Highlight Current Line extension makes it easy to find the caret by highlighting the line that the caret is on in the editor.  You can even configure the default color by changing the setting for “Current Line (Extension)” and “Current Line Inactive (Extension)” in Tools Options Fonts & Colors.
    • Add Reference Dialog – From the Solution Explorer or Navigator, right-click the References node, select Add Reference, and you will be presented with a fast, searchable and easy to understand Add Reference dialog.
    • HTML Copy – This extension provides support for the HTML Clipboard format when copying code from the editor. This means that you’ll no longer have to go fix up the formatting of your code when you paste it into a Team Foundation Server bug form or any other HTML based control.
    • Triple Click – It has never been easier to select a line of code from the mouse by simple triple-clicking anywhere on the line.
    • Fix Mixed Tabs – Some developers prefer tabs, others prefer spaces, and nobody likes mixing tabs & spaces. This extension promotes developer harmony by warning as they are open or save a file that has a mixture of tabs & spaces. The information bar also provides an easy way to fix the file to suit your preference.
    • Ctrl + Click Go To Definition – This extension gives the editor a web browser by adding clickable hyperlinks to symbols in your code as you hold down the Ctrl key.
    • Align Assignments – This extension improves code readability by aligning the assignments when you type Ctrl+Alt+] such that it takes this



    And turns it into this:


    • Move Line Up/Down Commands – This extension maps the Alt+Up Arrow & Alt+Down Arrow keys such that they will move the current line of code or the selected lines up and down through the editor. 
    • Column Guides – Since Visual Studio.NET 2002, an undocumented Registry key enables users to draw a vertical line in the code editor. This is very useful to remind developers that their full line of code or comments may not fit one a single screen. Thanks to this extension this feature has returned with UI configure it.
    • Colorized Parameter Help – This extension improves consistency with the editor by applying syntax highlighting to the contents of the Parameter Help window for C# & Visual Basic.NET. 
  • Steve Lange @ Work

    Microsoft Store Welcomed to Colorado


    Today the latest Microsoft Store opened in Lone Tree, CO at the Park Meadows Mall.  Countless people were on-hand to be among the first to enter this amazing store.  (I also heard that over 100 people camped out the night before?  Ahh, the days of Window 95!)


    The line keeps going

      The line keeps going

    The line keeps going

    Microsoft executives were in attendance, including Kevin Turner and Ray Ozzie.  Kevin opened the store a little before 10AM, but not before giving away $350,000 in software to local organizations (KidsTek, Denver Museum of Nature & Science, and the Girl Scouts of Colorado).

    Many local Microsoft employees were also at the opening to support our newest colleagues (they’re the ones in the bright shirts!) to the community.

    KT kicking things off 

    Other notable attendees included the mayor of Lone Tree, the State Attorney General, local city council, and other.

    Once the ribbon was cut, people poured into the new store!



    Digital wall



    I didn't have the guts to interrupt and ask for a picture.  ;)

    Other items of note:

    • The first 1000 visitors through the door received a swag bag containing a Microsoft Store t-shirt, Bing stress ball, Microsoft Store water bottle, Xbox game, and other assorted trinkets.  Additionally, they received 2 wristbands providing VIP access to a Demi Lovato concert on Saturday.
    • The store was decked out with items similar to other stores, including:
      • 3 Surface machines
      • a digital wall wrapping the store, made of over 100 individual screens
      • the latest computers, laptops, netbooks, digital cameras, Zunes, accessories, etc.
      • Several XBox setups, including Rockband (+ DJ)
      • A giant 3D TV running Media Center
    • Professional boarder Rob Dyrdek in the afternoon for autographs.

    You can see many more pictures (and much more professionally done) at the MS store’s Facebook page:

    It was amazing to see such a turnout for the opening of a retail store – an incredible rarity for Park Meadows!  I hope everyone gets an opportunity to visit a store in your area.   The employees are excited, educated, and ready to help!

    Hope to see you there sometime…

  • Steve Lange @ Work

    Test Drive the New TFS Scrum Template v1.0 (Beta)


    Different, and more lightweight than the EMC (formerly Conchango) Scrum for Team System template, this template is meant to provide a simple and flexible implementation of Scrum for Team Foundation Server 2010.

    It’s free, and available for download in the Visual Studio gallery.  Additional details can be found on Aaron Bjork’s blog post:  Announcing Team Foundation Server Scrum v1.0 Beta, where he discusses the differences between this template and the MSF for Agile v5.0, how sprints are handled, etc.

    New Product Backlog Item dialog

    So grab it and take it for a spin today!  You can get it HERE.

  • Steve Lange @ Work

    Event Series: The Full Testing Experience - Professional Quality Assurance with Visual Studio 2010


    This is a follow-up to a webcast I previously mentioned.  If you’re in the area, why not see it live?

    Visual Studio

    Microsoft and Northwest Cadence are proud to offer this four hour live event – during which we will demonstrate the testing and quality assurance lifecycle using Visual Studio 2010 and Team Foundation Server. Join us as we dive into the testing tools and testing process you can use to dramatically improve the effectiveness of your QA and Test efforts. You’ll see the Microsoft Test Manager and Lab Management in all its glory as we explore how to manage your test environment, organize test suites, test cases, requirements and bugs, and how to manage both automated and manual test runs. In addition, you’ll see how to easily create an automated test from an existing manual test run. Finally, and most importantly, you’ll discover how insanely easy it is to create bugs that can be simply and reliably reproduced by developers – Visual Studio 2010 is that powerful.


    • Imagine knowing which manual regression tests you had to run, given the code changes in the recent build…
    • Imagine being able to quickly and completely capture bugs in such a way that developers can reproduce them…
    • Imagine being able to record your exploratory testing and turn that exploration into detailed test steps – with just a few commands…
    • Imagine taking a manual test run and, in seconds, turning it into an automated test…
    • Imagine using an intuitive interface to design, organize and execute your test plans…
    • Imagine seeing your testing progress on one simply dashboard, and drilling into critical details…
    • Imagine testing your application more effectively, in less time, and with less pain…

    Now come see it all. In action. Today.

    This training event is geared towards QA managers, technical and non-technical testers, business analysts, and quality-conscious developers working on cross-functional teams (or, gasp, organizations without testers).

    Register for a date & location near you!

    Welcome: 8:00 AM (Local Time)

    Seminar: 8:30 AM-12:00 PM (Local Time)

    Microsoft Partner Events:






    July 7, 2010

    Bellevue, WA


    July 8, 2010

    Portland, OR


    July 13, 2010

    Mountain View, CA


    July 14, 2010

    San Francisco, CA


    July 15, 2010

    Irvine, CA


    July 27, 2010

    Phoenix, AZ


    July 28, 2010

    Denver, CO


  • Steve Lange @ Work

    Woot! Expression Studio 4 is Here


    Expression Studio 4Expression Studio 4 was announced this week!  There are some incredible new capabilities in this release, and I’ve bulleted the big ones below.  There are other places that will talk more about each in detail, but this should give you a start.  (One of my favorite features – native TFS support!)

    There are three (3) different product sets for Expression Studio:

    • Expression Studio 4 Ultimate
      • Expression Web + SuperPreview
      • Expression Blend
      • SketchFlow
      • Expression Design
      • Expression Encoder Pro
    • Expression Studio 4 Web Professional
      • Expression Web + SuperPreview
      • Expression Design
      • Expression Encoder
    • Expression Encoder 4 Pro

    (Technically, there is a fourth edition, Expression Studio 4 Premium, but that is not available via retail)

    Here’s the experience you get with xStudio 4 as told in an elevator:

    Expression Blend, Visual Studio, Silverlight and .NET provide the most compelling design and development workflow on the market today. Seamlessly working on user experience and core architecture enables you to deliver visual and interaction design and underlying code that is both unique and innovative. The speed and flexibility with which ideas are taken from concept to completion gives you and your team the ability to push the envelope of your skills throughout the project, challenging you to deliver sophisticated and compelling applications for your customers, while still enabling you to deliver the final project on time and within budget.

    Here’s what I say:

    Expression Studio 4 allows you to conceptualize, design, and create compelling user experiences while easily collaborating with development and test teams.  Map your thoughts, communicate ideas, design the next “wow” experience.

    Think about it in a few major focus areas, and their supporting capabilities:

    Compelling Experiences

    • SketchFlow
    • Adobe Photoshop Import
    • Adobe Illustrator Import
    • Behaviors
    • Control Styling
    • Visual State Manager
    • Custom controls
    • Easing Animation
    • Path Layout
    • Pixel Effects

    Powerful Technology

    • Silverlight 4, Silverlight 3, .NET 4, .NET 3.5
    • Code Editor
    • XAML IntelliSense
    • C#/VB IntelliSense
    • Sample Data
    • TFS support (yeah, baby!)
    • Behaviors
    • Extensibility (UI adorners on custom controls)
    • Expression Blend and Visual Studio integration
    • Eco-system – utilizing and leveraging skills that are in place today

     Accelerated Results

    • Behaviors
    • SketchFlow / Microsoft Word export
    • Adobe Photoshop Import
    • Adobe Illustrator Import
    • Sample Data
    • Code Editor
    • XAML IntelliSense
    • C#/VB IntelliSense
    • Control Skinning
    • Visual State Manager – State animation / Effects
    • Custom controls / Convert Graphics to control parts
    • Superior workflow design/development workflow

    Take it for a test drive today!

Page 1 of 1 (7 items)