:: thoughts on team system and more RSS 2.0
# Saturday, May 30, 2009

Ever wanted to use the TFS API to pull up a dialog to let a user browse the version control repository and select a file or a folder? Unfortunately it turns out there is no function to do so. Or atleast, no obvious way...

With pointers from Philip Kelley at Microsoft I learnt that inside the Microsoft.TeamFoundation.VersionControl.Controls assembly there's a private class called DialogChooseItem that displays the following dialog:

In order to use that dialog we'll have to invoke by using .NET reflection. The constructor can take either just the TFS to connect to (start at the root of the version control tree) or the folder and file to navigate to when the dialog is shown.

The key code to invoke the dialog is the following (based on Visual Studio 2008 SP1 and TFS 2008 SP1):

VersionControlServer versionControlServer = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
 Assembly controlsAssembly = Assembly.GetAssembly(typeof(Microsoft.TeamFoundation.VersionControl.Controls.ControlAddItemsExclude));
 Type vcChooseItemDialogType = controlsAssembly.GetType("Microsoft.TeamFoundation.VersionControl.Controls.DialogChooseItem");

ConstructorInfo ci = vcChooseItemDialogType.GetConstructor(
                   BindingFlags.Instance | BindingFlags.NonPublic,
                   null,
                   new Type[] { typeof(VersionControlServer) },
                   null);
_chooseItemDialog = (Form)ci.Invoke(new object[] { versionControlServer });
 
_chooseItemDialog.ShowDialog();
 this.DialogResult = _chooseItemDialog.DialogResult;

To get to the selected item access the SelectedItem property (again using .NET reflection):

_selectItemProperty = vcChooseItemDialogType.GetProperty("SelectedItem", BindingFlags.Instance | BindingFlags.NonPublic);
Item selectedItem = (Item)_selectItemProperty.GetValue(_chooseItemDialog, null);
selectedItem.ServerItem;

That's it. With some simple .NET reflection magic we can now use the internal item brower dialog.

The complete sample can be downloaded here: ItemBrowser.zip (15,63 KB)

Disclamer: the DialogChooseItem is an internal unsupported implementation. It may change at any time so if you use it your're on your own.

Saturday, May 30, 2009 10:24:33 AM (W. Europe Standard Time, UTC+01:00)  #    -
Team System
# Thursday, May 21, 2009

When browsing through the documentation for  Beta 1 on MSDN I found that there's also a nice training-kit available here.

The training-kit includes presentations, demos and labs on the following:

  • C# 4.0
  • Visual Basic 10
  • F#
  • Parallel Extensions
  • Windows Communication Foundation
  • Windows Workflow
  • Windows Presentation Foundation
  • ASP.NET 4
  • Entity Framework
  • ADO.NET Data Services
  • Managed Extensibility Framework
  • Visual Studio Team System

Unfortunately not so much content on VSTS, but still lots of other goodness... :-)

Thursday, May 21, 2009 12:15:20 PM (W. Europe Standard Time, UTC+01:00)  #    -
Team System | Visual Studio 2010

For Beta 1 of VSTS and TFS there's no local MSDN to install, instead the latest content can be found online at MSDN here.

There are plenty of new samples and walkthroughs to go through so it's well worth spending some time there to get into VS 2010.

Thursday, May 21, 2009 12:12:35 PM (W. Europe Standard Time, UTC+01:00)  #    -
Team System | Visual Studio 2010
# Monday, May 18, 2009

Soma posted earlier today that beta 1 of Visual Studio 2010 and .NET framework is available! It's going to be a great release for us working with VSTS!

So, time to explore the new bits. Here's some links I've found useful exploring the beta so far:

So, go get downloading! Beta 1 is now available on MSDN for subscribers.

Monday, May 18, 2009 5:37:05 PM (W. Europe Standard Time, UTC+01:00)  #    -
Team System | Visual Studio 2010
# Thursday, May 14, 2009

dotNetForum, a new .NET-community in Gothenburg, will have its first meeting May 26. The ambition is to have quarterly meetings on current subjects given by local developers.

At this first meeting Microsoft, with Johan Lindfors and Nils Stadling, will be there to present the latest on the Microsoft development platform, including .NET Services, Windows Azure and Silverlight 3.

I'm going to give a talk on what's new in VS 2010 and it's going to be a challenge to do that in 30 minutes...

Read more about the event here.

Thursday, May 14, 2009 7:42:56 PM (W. Europe Standard Time, UTC+01:00)  #    -
Team System | Visual Studio 2010
# Saturday, April 18, 2009

Earlier this week Ekobit released the new version of our TFS-Outlook integration product - TeamCompanion 2.1.

This version comes with considerable amount of new features. Some of the feature highlights are support for reports including multiple saved parameter sets for each report, Query by example work item query editor (supporting full-text search) for online search and desktop search integration for offline search, deep Outlook integration features (e.g. drag-n-drop a mail on work item to attach it, work item reminders and To-Do bar support, easy opening of TFS artifacts referred to in a notification mail, grouping as an equally valuable part of the query definition, easy way to create work item from a mail and vice versa etc.) and scheduled work item queries.

For more information see: the product homepage (www.teamcompanion.com).

Saturday, April 18, 2009 7:39:09 AM (W. Europe Standard Time, UTC+01:00)  #    -
Team System
# Wednesday, April 01, 2009

The VSTS Rangers just published a quick reference on Visual Studio Team Test. The guide covers the following:

  • SETUP CONSIDERATIONS
  • WEB TEST CONSIDERATIONS
  • WEB SERVICE TEST CONSIDERATIONS
  • UNIT TEST CONSIDERATIONS
  • LOAD TEST CONSIDERATIONS
  • LOAD TEST RIG CONSIDERATION
  • PERFORMANCE DATA COLLECTION AND USAGE
  • LOAD TEST RESULTS STORE INFORMATION
  • TEST CUSTOMIZATION
  • ITEMS CHANGED OR FIXED IN VSTS 2008 SP1
  • GENERAL COMMANDS AND TRICKS (NOT VSTS SPECIFIC)

  • At a first glance it looks really nice and contains lots of very practical content.

  • The guide is available on CodePlex here.

  • Wednesday, April 01, 2009 7:48:54 PM (W. Europe Standard Time, UTC+01:00)  #    -
    Team System
    # Saturday, March 14, 2009

    Just recently the VSTS Rangers shipped some important guidance packages for MOSS TFS development.

    The two whitepapers are:

    VSTS Rangers - SharePoint Server Custom Application Development: Document Workflow Management Project
    VSTS Rangers - Using Team Foundation Server to Develop Custom SharePoint Products and Technologies Applications

    The first article is created during a real world customer engagement and answers dozens of frequently asked questions and how-tos in a real world context vs. theoretical discussions. The second package addresses very common questions around setting up and using TFS features for a MOSS development project.

    There's also additional guidance from P&P here: patterns & practices: SharePoint Guidance

    Saturday, March 14, 2009 9:46:59 PM (W. Europe Standard Time, UTC+01:00)  #    -
    Team System
    News
    About the author/Disclaimer

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010
    Mathias Olausson
    Sign In
    Statistics
    Total Posts: 100
    This Year: 0
    This Month: 0
    This Week: 0
    Comments: 65
    All Content © 2010, Mathias Olausson
    DasBlog theme 'Business' created by Christoph De Baene (delarou)