Thursday, March 30, 2006

How to create Check-In Policies in VSTS

TF Source Control Administrators can add check-in policy requirements. These check-in policies require the user to take actions when they conduct a check-in to source control, for example a user can be required to associate a work item with a changeset, or perform Code Analysis before check-in his work.

The available default check-in policy types include the following:
  • Code Analysis Requires that code analysis is run before check-in.
  • Testing Policy Requires that check-in tests are completed before check-in.
  • Work Items Requires that one or more work items be associated with the check-in.

Procedures to create a check-in policy

  1. From Team Explorer, right-click your team project, click Team Project Settings, and then click Source Control.
    The Source Control Settings dialog box appears.
  2. Click the Check-in Policy tab and the click Add.
    The Add Check-in Policy dialog box appears.
  3. In the Check-in Policy list, select the policy type you want and then click OK.
    The list includes the following selections.
    - If you selected Code Analysis, the Code Analysis Policy Editor dialog box appears. Click the boxes for the types of code analysis that you want performed. Options are Enforce check-in to only contain files that are part of current solution, Enforce C/C++ Code Analysis (/analyze), and Enforce Code Analysis For Managed Code. If you select Enforce Code Analysis For Managed Code, select the desired rule settings in the Rule settings for Managed Code Analysis window. Click OK.
    - If you selected Testing Policy, the Testing Policy dialog box appears. Click Browse to specify a metadata file, select the test desired, and then click OK.
    - If you selected Work Items, the policy is added to the list that a work item must be associated with the check in.
  4. When you are satisfied with the settings for the check-in policies, click OK; the new check-in policy now displays with future check-ins.

Wednesday, March 22, 2006

TFS Administrator's Guide

The Team Foundation Administrator's Guide is a comprehensive guide that covers procedures for administering TFS, including daily operations, recurring tasks, and infrequent operations. You can use this administrator's guide to manage TFS.

Get it here from microsoft ...

Sunday, March 19, 2006

TFS Is Shipped ...

TFS was shipped yesterday, 18th March 2006, and it appears that both the Workgroup Edition and Trial Edition are now available for download!

And now available on MSDN Subscriber Downloads ...

Bravo ...

Sunday, March 12, 2006

TFS: Team Build Bug

If you have two VS Solutions and a common project included in both of them, and wishes to have a Team Build you’ll stumble in the following error…

"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression."

By taking a look at the TFS Server’s event log you’ll see that the error occurred on line 46 of the sp_InsertProjectDetails stored procedure when TFS Build consumes the web service http://TFSServer/Build/v1.0/BuildStore.asmx. And unfortunately, TFS Build database’s stored procedures are encrypted so you can’t go any further there.

It seems that TFS Build analyses all solutions within a build and records each one and the project file in the FileDirectory table, and the ProjectDetails table holds a ProjectFileId column with the solution or project file Id, as well as a ParentProjectFileId column, both of which act as foreign keys for table FileDirectory.
So for this situation, FileDirectory table recorded the ProjectFileId against two different ParenProjectFileId of the two solutions. So here comes the sub-select in sp_ InsertProjectDetails and the unjustified assumption that each ProjectFileId appears once within the FileDirectory table.

For a workaround, make sure that each project appears only once in your Team Build.

Friday, March 03, 2006

Hooray ... TFS Launch ... Is This Month ...

March … The month that will witness Team Foundation Server Launching … In a couple of weeks it will be launched at SDWest in Santa Carla with a keynote from Rick LaPlante, and a series of technical sessions from Kevin Kelly, Dennis Minium, Sam Guckenheimer, and Randy Miller.

“Come and celebrate the Launch of Visual Studio 2005 Team Foundation Server with General Manager for Visual Studio Team System Rick LaPlante. Rick will officially launch the much-anticipated Team Foundation Server, rounding out Microsoft's latest Software Development Lifecycle solution and announce general availability and release timeframes. Together with Visual Studio 2005 Team Suite, it offers software development organizations of all sizes the best in collaboration, modeling, testing and development capabilities. Rick will overview how this translates into expanded opportunities for you and your business. As an exciting bonus, come and meet the team who designed and built the product at the Microsoft expo and hear directly from them in four deep technical sessions.”
From: SD WEST 2006 / Santa Clara, CA / March 13-17, 2006