26 May 2010

OTSUG – Migrating to TFS 2010

Last night, Russ Wagner and I met with the Omaha Team System User Group to present on “Migrating to TFS 2010: Lessons Learned”.  Once again, Farm Credit Services of America hosted the event and provided pizza for the attendees.

Here’s the description of the talk we gave:

In this presentation, Jeff Bramwell and Russ Wagner will discuss the steps taken to upgrade to Team Foundation Server 2010.  The talk will cover up-front planning, tasks that need to be completed in the process, and how to plan for contingencies.  They will also cover various lessons learned along the way.  After the session, they will open it up for questions and answers to give attendees a chance to ask questions as well as share experiences with each other.

It was a small group but everyone came prepared with questions which made for a great and interactive discussion.  We enjoyed the opportunity to share some of the lessons we learned from our experiences while migrating from TFS 2008 to TFS 2010.  All in all, it was another great user group meeting!

If you’re interested in the PowerPoint slides, they’re available here.  For more information about the Omaha Team System User Group:

18 May 2010

TFS Administration Tool v2.0 Released

With each release of Team Foundation Server, administration gets a little easier.  The release of TFS 2010 introduces the Team Foundation Administration Console (TFS Admin Console) providing a much simpler approach to administering Team Foundation Server.  However, even the TFS Admin Console does not provide any support for managing permissions between Team Projects, SharePoint, and SQL Server Reporting Services (SSRS).

That’s where the Team Foundation Server Administration Tool comes in…

Here’s the official description from the TFS Admin Tool site:

The TFS Administration Tool allows Team Foundation Server administrators to manage user permissions on all three platforms utilized by Team Foundation Server: Team Foundation Server, SharePoint, and SQL Server Reporting Services. The tool also allows administrators to easily copy user permissions among team projects and to easily identify any missing permissions on any of the three platforms.

If you manage user permissions for any number of Team Projects, this utility is a must have!

As of a few days ago, Version 2.0 of the TFS Admin Tool was released.  This release focuses on resolving several bug fixes and introduces a new feature – User Import.  The new User Import feature allows you to easily copy user permissions from one Team Project to another – very handy!

Version 2.0 supports TFS 2005, 2008, and 2010 – with some caveats.  Before installing the Team Foundation Server Administration Tool v2.0, you must have the following installed:

NOTE: Even if you have Visual Studio 2010 installed, along with the Visual Studio Team Explorer 2010 client, you will still need to have the Team System 2008 Team Explorer client (with SP1) installed.  The TFS Admin Tool is currently compiled against the TFS 2008 Object Model and therefore must have the referenced assemblies installed on the client machine.  At some point in the future, once some internal code refactoring has taken place, there will most likely be a version compiled directly against the TFS 2010 Object Model that does not require any of the TFS 2008 assemblies to be installed.

So, download the tool and try it out.  Please provide feedback on the project site in the Discussions or Issue Tracker tabs.

14 May 2010

Check for Warnings/Errors Check-in Policy

A while back, I wrote about the Check for Warnings/Errors Check-in Policy – a custom check-in policy that I had developed for Team Foundation Server 2008.  Yesterday, I published version 2.1, updated for Team Foundation Server 2010, to the Visual Studio Gallery.  The features are the same as the TFS 2008 version with a couple of exceptions:

  1. You now have the ability to restrict the set of warnings to Code Contract warnings only.
  2. The settings for the check-in policy are now stored as TFS properties (more on this in an upcoming post).

Here are the details…

Usage:

To add this check-in policy to your Team Project:

  1. Download and install the Check for Compilation Warnings and Errors Check-in Policy (see Where to Download below).  NOTE: Anyone checking in code will need to install the check-in policy on their local development workstations.
  2. Within the Team Explorer in Visual Studio 2010, right-click on the desired Team Project and select Team Project Settings->Source Control.

  3. Click on the Check-in Policy tab, select Check for Compilation Warnings and Error Policy and click OK.



  4. Click on the Edit button and select the level of Warnings and/or Errors to check for.  If you select Warnings, you can optionally restrict the set of warnings to Code Contract warnings only by checking the Code Contract Warnings Only checkbox.



  5. Click OK and OK to close the dialog windows.

Once installed and configured, the check-in policy works like any other.  You can check the Pending Changes window for violations as seen in this screen shot:

Compatibility:

This version of the Check for Compilation Warnings and Errors Check-in Policy supports Visual Studio 2010 and Team Foundation Server 2010 only - it is not compatible with Team Foundation Server 2008.

Where to Download:

There are two options for downloading:

  1. You can download this check-in policy directly from the Visual Studio Gallery – here.
  2. From within Visual Studio 2010, you can use the Extension Manager to locate and download the check-in.  To do this:
    1. Click on Tools—>Extension Manager.
    2. Click on the Online Gallery “tab” on the left side of the Extension Manager dialog.
    3. In the Search Online Gallery field, enter “check for warnings” and press Enter.
    4. Locate the “Check for Compilation Warnings and Errors Policy” (at the time of this writing, it is the only item in the search results) and click Download.

If you have any feedback, please utilize the “Reviews” and/or “Discussions” tab on the gallery link above.

24 April 2010

TFS 2010 Power Tools Released

The first official (RTM) release of the Team Foundation Server Power Tools for Team Foundation Server 2010 have been released.  There are three separate downloads available:

TFS Power Tools April 2010 release – This is the main set of TFS Power Tools and contains the following high-level features:

  • Alerts Explorer
  • Best Practices Analyzer (BPA)
  • Custom Check-in Policy Pack
  • Process Editor
  • Team Explorer Enhancements
  • Team Foundation Power Tool (TFPT.exe)
  • Team Members
  • Windows PowerShell CmdLets
  • Windows Shell Extensions
  • Work Item Templates

TFS MSSCCI Provider 2010 release - The Team Foundation Server MSSCCI Provider enables integrated use of Team Foundation Version Control with products that do not support Team Explorer integration.

TFS Build Extension Power Tool April 2010 release - The Team Foundation Build Extensions provide the ability to execute Ant or Maven 2 builds from Team Foundation Server and publish the results of the build along with any associated JUnit test results back to Team Foundation Server.  This release is compatible with Team Foundation Server 2005, Team Foundation Server 2008 and Team Foundation Server 2010.

Click on the links above for further details and downloads.

20 April 2010

Visual Studio 2010/TFS 2010 Utility Roundup

Well, Visual Studio 2010 and Team Foundation Server 2010 have been “in the wild” for a little over a week now.  Now that the RTM versions have had a few days to settle in, I decided to do a quick survey of some of my favorite utilities to see if they have been updated to support the final release of Visual Studio 2010 and TFS 2010.  Here is the list:

If you’re looking for more utilities for Visual Studio 2010, check out the Visual Studio Gallery for Visual Studio 2010.

12 April 2010

Visual Studio 2010 Launches/RTMs!

visual-studio-2010-logo After months (years?) of anticipation, Visual Studio 2010 has finally launched/RTM’d!  If you are a MSDN subscriber, you can download the full version from the MSDN Subscribers site.  The trial editions should be available on the Microsoft Downloads site soon.

There are far too many new features in Visual Studio 2010 to be listed here.  However, here are a few links to get you started…

 

 

More to come…

23 March 2010

OTSUG - What’s New for Testing in Visual Studio 2010 and TFS 2010

Please join us on Tuesday, March 23rd as Mike Douglas presents on "What’s New for Testing in Visual Studio 2010 and TFS 2010".  As we near the launch of Visual Studio 2010 and Team Foundation Server 2010, this is a great opportunity to catch up on some of the new features being made available.

Visit Omaha Team System User Group for full meeting details.

Hope to see you there!

15 March 2010

Team Explorer 2005 Update for TFS 2010 is Available

If you are using Visual Studio 2005 (along with Team Explorer 2005) to access Team Foundation Server, an update patch has been released that will allow Team Explorer 2005 to communicate with Team Foundation Server 2010.

In general, after installing the update patch, you will be able to use Visual Studio 2005 to access legacy (2005) TFS servers as well as TFS 2010 servers.  If you switch to a TFS 2010 server, you will be able to continue using the basic functionality of TFS but will not be able to utilize new TFS 2010 features (e.g. Branch Visualization, creating new Team Projects, etc.) - you must use Visual Studio 2010.

Also, when connecting to a TFS 2010 server, you will need to enter the full URL for the TFS 2010 Team Project Collection – e.g. http://TFS2010Server:8080/tfs/CollectionName.

Click here for more information.

Downloads:

11 March 2010

Adding Properties to Artifacts within TFS 2010

As you know, you can store a lot of information within Team Foundation Server – in the form of Work Items and Versioned Items (e.g. source code).  While these are great features within TFS there are times when you want to store other types of information within TFS and/or “tag” existing items with custom information.  For example, if you create a Visual Studio add-in for TFS, you might want to store the add-in’s properties within TFS such that they “follow” the developer from machine to machine – or - maybe you want to store some custom information with a specific changeset?

To help with the above scenarios (and many others) Team Foundation Server 2010 introduces the concept of Properties.  There are several types (Artifact Kinds) of properties defined within TFS (this set of properties can be expanded as well) and, depending upon the type, they are accessed in different ways.  The default set of Artifact Kinds include:

  • Version Control
    • Changeset
    • Versioned Item
    • Pending Change
    • Annotation (no longer used)
  • Framework
    • Generic (at Project Collection or Configuration Server)

Of the above Artifact Kinds, those listed under Version Control are considered to be “Internal”.  Internal properties can only be accessed by the service-specific APIs they are associated with (e.g. VersionControlServer).  As such, access to these properties are secured by the artifact they are associated with (e.g. a versioned file within TFS).

The Generic Artifact Kind is not considered to be internal.  Generic properties are accessed via the IPropertyService interface.  Unlike internal properties, there is no access control mechanism for generic properties.

Identifying Properties

Properties are identified by an ArtifactSpec. There are three constructor overloads including:

  • ArtifactSpec(Guid kind, int artifactId, int version);
  • ArtifactSpec(Guid kind, byte[] artifactId, int version);
  • ArtifactSpec(Guid kind, string moniker, int version);

In the case of internal properties, you don’t care much about the ArtifactSpec because it is hidden by the service-specific APIs.  For Generic (non-internal) properties, you will need to define an ArtifactSpec.  You can use any of the above constructors when creating an ArtifactSpec for a Generic property but the 3rd one (with the moniker parameter) seems like it would be the most common choice.

Generic Property Example:

Here is a simple example for setting a Generic property:

public void SetGenericProperty(bool isInstanceProperty, string moniker, int version, string propertyName, string propertyValue)
{
IPropertyService propertyService;

if (isInstanceProperty)
{
propertyService = _tpc.ConfigurationServer.GetService<IPropertyService>();
}
else
{
propertyService = _tpc.GetService<IPropertyService>();
}

ArtifactSpec artifactSpec = new ArtifactSpec(ArtifactKinds.Generic, moniker, version);

propertyService.SetProperty(artifactSpec, propertyName, propertyValue);
}

Notice the “if” check on line 5.  Here we’re checking to see if the Generic property should be stored at the Configuration Server (i.e. “instance”) or stored at the Project Collection.  If you want your property accessible across multiple project collections, store it at the Configuration Server.

Using the above method, here’s an example call to store this blog’s URL:

SetGenericProperty(false, "A Developer's Life", 1, "blog", "devmatter.blogspot.com");

In this example, the second parameter (“A Developer’s Life”) defines the moniker for this property.  In this case, the moniker groups a set of properties.  Grouping properties under a common moniker allows you to retrieve all (or a subgroup of) properties for a given moniker (e.g. using wildcards).  For example, here is a simple method for retrieving a list of Generic properties:

public IEnumerable<ArtifactInfo> GetGenericProperties(bool isInstanceProperty, string moniker, int version)
{
IPropertyService propertyService;

if (isInstanceProperty)
{
propertyService = _tpc.ConfigurationServer.GetService<IPropertyService>();
}
else
{
propertyService = _tpc.GetService<IPropertyService>();
}

ArtifactSpec artifactSpec = new ArtifactSpec(ArtifactKinds.Generic, moniker, version);
ArtifactPropertyValue[] values = propertyService.GetProperties(artifactSpec, null);

var props = new List<ArtifactInfo>();

foreach (var value in values)
{
foreach (var keyValue in value.PropertyValues)
{
props.Add(new ArtifactInfo()
{
Moniker = value.Spec.Moniker,
Version = value.Spec.Version,
Kind = value.Spec.Kind,
Id = value.Spec.Id,
PropertyName = keyValue.PropertyName,
PropertyValue = keyValue.Value.ToString(),
});
}
}

return props;
}

Just like in the “SetGenericProperty” example we’re checking whether to look for the properties at the Configuration Server or at the Project Collection.  Calling the method is also very simple:

var results = GetGenericProperties(false, "A Developer's Life", 1);

This call would return a list of all properties defined under the moniker “A Developer’s Life”.  Note that you can also make use of the wildcard characters ‘*’ and ‘?’ in the moniker.  For example:

This call would return the properties defined under the same moniker as above as well as any other moniker that starts with the text “A Dev”.

As with monikers, you can also apply filters the the property names themselves by using one of the overloaded versions of IPropertyService.GetProperties (line 15 above is using an overload that does not specify property filters).

A Property Browser

Unfortunately, there is no property “browser” built into Visual Studio/Team Explorer.  Therefore, I decided to create one to ease testing and querying of properties.  Although this utility is not 100% functional/complete, yet, I have uploaded the application source and binaries in their current state (you only need the EXE if you don’t care to look at the source code).  You can download the project from here – NOTE: you must have the Team Foundation 2010 Client installed for this utility to run.  The source code is part of a Visual Studio 2010 solution/project.  Once I’ve completed the project (i.e. fully implemented each of the property features) I will most likely upload the project to CodePlex or the MSDN Code Gallery.

When you first run the application, known as the “Artifact Property Browser”, you will be prompted to select a Project Collection:

Select Team Project Collection

Once you select a Project Collection, you will see something similar to this:

Artifact Property Browser

Notice the Artifact Type drop-down list – it currently lists Changeset, Generic, and Versioned Item (Pending Change is not yet implemented).  As you change the Artifact Type the various options will change depending upon the type selected.

To query properties:


  1. Select the desired Artifact Type

  2. Specify the appropriate values

  3. Click Search

For example, to see all Generic properties at the Project Collection level, enter the following values and click Search:


  • Artifact Type: Generic

  • Option: Moniker (Artifact ID (int) and Artifact ID (byte[]) is not yet implemented)

  • Moniker: * (wildcard character for all monikers)

  • Version: 1

  • Instance Property: Unchecked (check to see properties at the Configuration Server level)

Artifact Property Browser

Notice that we have one property defined, “blog”, with a value of “devmatter.blogspot.com”.

To add another Generic property, simply:


  1. Select the desired Artifact Type

  2. Specify the appropriate values in the Artifact Filter section (e.g. for Generic properties, set the Moniker and Version)

  3. Specify a property Name and Value in the Property section

  4. Click Set Value

Querying and setting properties for the other artifact types follow the same approach only the Artifact Filter settings change.  For example, querying Changeset properties looks something like this:

Artifact Property Browser

In this example, were querying all properties for Changeset number 3.

Querying Versioned Item properties looks like this:

Artifact Property Browser

In this example, we’re querying properties for all items that match the specified ItemSpec (in this case, a versioned folder) and VersionSpec (in this case “T” for “Latest” – click here for other examples).  We’ve also checked the “Recursive” option to retrieve properties for all items under the ItemSpec. (note: the properties shown above are set by TFS).

There are still quite a few examples that can be provided for the various property APIs (e.g. Versioned Item) that are not covered in this post.  I plan on creating a follow-up post in the near future.  In the meantime, download the provided source code for further examples.

Download the Artifact Property Browser and source code here.

Save on Visual Studio 2010 Professional and Pre-Order Now

Microsoft Visual Studio 2010 Professional will launch on April 12 but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of $549, a saving of $250.

If you use a previous version of Visual Studio or any other development tool then you are eligible for this upgrade. Along with all the great new features in Visual Studio 2010 (see www.microsoft.com/visualstudio) Visual Studio 2010 Professional includes a 12-month MSDN Essentials subscription which gives you access to core Microsoft platforms: Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, and Microsoft SQL Server 2008 R2 Datacenter.

So visit http://www.microsoft.com/visualstudio/en-us/pre-order-visual-studio-2010 to check out all the new features and sign up for this great offer.