Welcome to MSDN Blogs Sign in | Join | Help

image CLIPART_OF_12921_SM

It is always great to see when a solution bubbles up from “Future Projects” list to the “Current Ranger Solutions” list :) Have a peek at our Rangers site here, to visit the TFS Integration Platform site on Codeplex as well, and most importantly to always give us candid feedback on both our Rangers home site and the solutions.

Have a great weekend! I have tempted Friday 13th long enough and am signing off for the weekend.

Part of my part-time studies … don’t ask … included project management and two areas, which we take for granted when using the Microsoft Project tool are cost calculations and evaluations, as well as the application of PERT techniques. I personally found these topics interesting and will chat about then briefly in two separate posts … this being the first and embracing the cost calculations and evaluations.Blue Male Student in a Graduation Cap, Reading a Book and Leaning Against a Stack of Books Clipart Illustration

The following table showing cash flow projections for two 5 year projects, will serve as example data for the duration of this blog post:

Year Project A Project B Project C
0 -100,000 -2,000,000 -1,000,000
1 20,000 400,000 400,000
2 20,000 400,000 400,000
3 20,000 400,000 100,000
4 10,000 400,000 100,000
5 70,000 100,000 10,000

Net Profit

Is the difference between the total cost and the total income of the project.

Looking at Project A, B and C we get:

  • Project A: 20,000 + 20,000 + 20,000 + 10,000 + 70,000 – 100,000 = 40,000
  • Project B: 400,000 + 400,000 + 400,000 + 400,000 + 100,000 – 2,000,000 = –300,000
  • Project C: 400,000 + 400,000 + 100,000 + 100,000 + 10,000 – 1,000,000 = 10,000
  • Therefore Project A and C are making a profit :) and Project B a loss :(
  • Based on Net Profit, I would personally pick project A, because there is more money left over.

Payback Period

Defines the time it takes to break even and be able to payback the initial investment.

  • Project B is looking grim as we have not broken even after 5 years. 
  • Project A looks a bit better, because after 4 years we have a cash flow of –30,000. With us making 70,000 in year 5, we will have broken even after 4.43 years.
  • Project C looks slightly better, because after 4 years we have a zero balance … which is what all of us would love to see after a one million loan.
  • Based on the payback period, I would personally pick project C as the payback period is the shortest. I would literally sleep better sooner …

Return of Investment (ROI)

Is also known as the accounting rate of return (APR) and in principal provides a way of comparing the net profitability to the investment required.

The calculation for ROI is the (average annual profit / investment) * 100. Hence …

  • Project A = ((40,000/5)/100,000)*100 = 8%
  • Project B = ((-300,000/5)/-2,000,000)*100 = –3%
  • Project C = ((10,000/5)/1,000,000)*100= 0.2%
  • Based on ROI, I would personally pick project A again as it has the highest ROI percentage.

Net Present Value

Is a project evaluation technique, that takes into account the profitability of a project and the timing of the cash flows produced.

  • The present value is defined as = ( value in year X ) / ( 1 + discount rate ) to the power of the number of years into the future that the cash flow occurs.
  • To calculate the discount factor (DF in table below) we calculate as 1 / ( ( 1 + discount rate ) to the power of the number of years, whereby we are borrowing the investment at an interest of 5%, or a discount rate of 0.05.
  • This one had me going for some time and we will select project A and call Excel for assistance:
    image
  • The Project A discounted cash flow looks worse than the net profit, but the good news (in my simple understanding of project management) is that we are still making a profit.

Hopefully when the project managers are chatting amongst each other, you will be able to catch and understand a few more fragments of their lingo and acronyms :) Next time we will chat about PERT techniques.

image Clipart Illustration of a Blue AO-Maru Robot Distorted With Pixels, Leaning Back And Looking Upwards With Strands Of Binary Coding

The TFS Integration Platform has a new home on Codeplex, where the product group and the VSTS Rangers have posted the ALPHA release of the platform.  The intention of the Alpha release is to improve the transparency of the project, for the community to be able to give feedback to be considered for the next release and especially to give custom adapter and tooling developers an opportunity to experiment with the new software development toolkit (SDK).

See Matt’s post TFS Integration Platform Alpha Released on CodePlex for more details.

Visit us at http://www.codeplex.com/TFSIntegration and give us feedback on the TFS Migration and Integration Forum here.

From a VSTS Rangers perspective we are working on additional adapter samples and refining the migration planning poster. More about these exciting value-adds in due course.

When you have a look at most of the TFS Integration Platform configuration files, you will notice the EnableBypassRuleDataSubmission, as shown in line 23 and 37 in the following Sample Configuration file:

   1: <?xml version="1.0" encoding="utf-16"?>
   2: <Configuration UniqueId="{7439CF38-BBF4-4B16-A8C9-B5CB3B5A82E5}"
   3:                FriendlyName="TR9 HOL AS">
   4:     <Providers>
   5:         <Provider FriendlyName="CR TFS 2010 Migration WIT Provider" 
   6:                 ReferenceName="04201D39-6E47-416f-98B2-07F0013F8455" />
   7:       <Provider FriendlyName="CR TFS 2010 VC Migration Provider" 
   8:                 ReferenceName="FEBC091F-82A2-449e-AED8-133E5896C47A" />
   9:     </Providers>
  10:                   
  11:     <SessionGroup FriendlyName="Session Group Friendly Name AS" 
  12:                           SessionGroupGUID="{06D11897-EF77-4326-888F-96E4F856A2E3}"
  13:                           WorkFlowType="OneDirectionalSynchronizationWithoutContextSync">
  14:       <MigrationSources>
  15:         <!-- WIT Migration Sources -->
  16:         <MigrationSource InternalUniqueId="A0E4FBE9-5E44-4D12-A274-958F259A9B6D" 
  17:                          FriendlyName="TFS2010B1X32T Source AS" 
  18:                          ServerIdentifier="TFS2010B1X32T Source AS" 
  19:                          ServerUrl="http://TFS2010B1X32T:8080/tfs/defaultcollection" 
  20:                          SourceIdentifier="TP-A" 
  21:                          ProviderReferenceName="04201D39-6E47-416f-98B2-07F0013F8455">
  22:           <CustomSettings>
  23:             <!--<CustomSetting SettingKey="EnableBypassRuleDataSubmission" SettingValue="false" />-->
  24:             <!--<CustomSetting SettingKey="DisableAreaPathAutoCreation" SettingValue="" />-->
  25:             <!--<CustomSetting SettingKey="DisableIterationPathAutoCreation" SettingValue="" />-->
  26:           </CustomSettings>
  27:           <StoredCredential />
  28:         </MigrationSource>
  29:         
  30:         <MigrationSource InternalUniqueId="EF98D1AE-2101-444F-9FAB-DC9C354E861A" 
  31:                          FriendlyName="TFS2010B1X32T Target AS" 
  32:                          ServerIdentifier="TFS2010B1X32T Target AS" 
  33:                          ServerUrl="http://TFS2010B1X32T:8080/tfs/defaultcollection" 
  34:                          SourceIdentifier="TP-C" 
  35:                          ProviderReferenceName="04201D39-6E47-416f-98B2-07F0013F8455">
  36:           <CustomSettings>
  37:             <!--<CustomSetting SettingKey="EnableBypassRuleDataSubmission" SettingValue="false" />-->
  38:           </CustomSettings>
  39:           <StoredCredential />
  40:         </MigrationSource>
  41:  
  42:         <!-- VC Migration Sources -->
  43:         <MigrationSource InternalUniqueId="13828D85-46F5-40A4-9A38-D95CF96B01DB"
  44:                FriendlyName="TFS2010B1X32T VC Source AS"
  45:                ServerIdentifier="TFS2010B1X32T VC Source AS"
  46:                ServerUrl="http://TFS2010B1X32T:8080/tfs/defaultcollection"
  47:                SourceIdentifier="Source System"
  48:                ProviderReferenceName="FEBC091F-82A2-449e-AED8-133E5896C47A">
  49:           <CustomSettings>
  50:             <SettingXml />
  51:             <SettingXmlSchema />
  52:           </CustomSettings>
  53:         </MigrationSource>
  54:         
  55:         <MigrationSource InternalUniqueId="9848394A-112D-4B8B-9866-0E309BB372CB"
  56:                FriendlyName="TFS2010B1X32T VC Target AS"
  57:                ServerIdentifier="TFS2010B1X32T VC Target AS"
  58:                ServerUrl="http://TFS2010B1X32T:8080/tfs/defaultcollection"
  59:                SourceIdentifier="Target System"
  60:                ProviderReferenceName="FEBC091F-82A2-449e-AED8-133E5896C47A">
  61:           <CustomSettings>
  62:             <SettingXml />
  63:             <SettingXmlSchema />
  64:           </CustomSettings>
  65:         </MigrationSource>
  66:       </MigrationSources>
  67:       
  68:       <Sessions>
  69:         <Session SessionUniqueId="CE189D49-EAA3-4CB9-883D-FC68F79656FF"
  70:                  FriendlyName="WIT session AS"
  71:                  LeftMigrationSourceUniqueId="A0E4FBE9-5E44-4D12-A274-958F259A9B6D"
  72:                          RightMigrationSourceUniqueId="EF98D1AE-2101-444F-9FAB-DC9C354E861A"
  73:                          SessionType="WorkItemTracking">
  74: <!-- LAB1 -->
  75:       <CustomSettings />
  76:           <Filters>
  77:             <FilterPair>
  78:               <FilterItem MigrationSourceUniqueId="A0E4FBE9-5E44-4D12-A274-958F259A9B6D" FilterString="" />
  79:               <FilterItem MigrationSourceUniqueId="EF98D1AE-2101-444F-9FAB-DC9C354E861A" FilterString="" />
  80:             </FilterPair>
  81:           </Filters>
  82:         </Session>
  83:  
  84: <!-- LAB 3         
  85:         <Session SessionUniqueId="7092283E-8776-4458-A0BC-1A96385C635F"
  86:                        FriendlyName="Control session AS"
  87:                        LeftMigrationSourceUniqueId="13828D85-46F5-40A4-9A38-D95CF96B01DB"
  88:                        RightMigrationSourceUniqueId="9848394A-112D-4B8B-9866-0E309BB372CB"
  89:                        SessionType="VersionControl">
  90:           <CustomSettings>
  91:           </CustomSettings>
  92:           
  93:           <Filters>
  94:             <FilterPair>
  95:               <FilterItem MigrationSourceUniqueId="13828D85-46F5-40A4-9A38-D95CF96B01DB" FilterString="$/TP-A" />
  96:               <FilterItem MigrationSourceUniqueId="9848394A-112D-4B8B-9866-0E309BB372CB" FilterString="$/TP-C" />
  97:             </FilterPair>  
  98:           </Filters>
  99:         </Session>
 100: LAB 3 -->
 101:       </Sessions>
 102:       
 103:       <Linking EngineProviderReferenceName="04201D39-6E47-416f-98B2-07F0013F8455">
 104:         <!--<CreationTime>0001-01-01T00:00:00</CreationTime>-->
 105:         <CustomSettings>
 106:           <SettingXml />
 107:           <SettingXmlSchema />
 108:         </CustomSettings>
 109:         <LinkTypeMappings /> 
 110:       </Linking>
 111:       
 112:     </SessionGroup>
 113: </Configuration>

So what is this feature all about”, some of you are asking?

What does it do?
Smart Blue Man Seated With His Legs Crossed, Brainstorming and Writing Ideas Down in a Notebook, Lightbulb Over His Head Clipart Illustration

The best  is to work through the TFS Integration Platform – Getting Started Basic Scenario, which performs a bi-direction synchronization with the EnableBypassRuleDataSubmission enabled and then the TFS Integration Platform – Getting Started Advanced Scenario which repeats the walkthrough, but with the feature disabled. Seeing is believing and working through the walkthrough, or watching the forthcoming video recordings of the two scenarios, will explain the feature better than a blog consisting of a large amount of descriptive text.

When this feature is enabled the WIT Adapter will, in particular the TfsMigrationWorkItemStore class, will react accordingly and submit WIT changes using a XmlDocument  with the BypassRule enabled.

   if (ByPassrules)
        SubmitChangesWithUpdateDoc(changeGroup, changeResult, sourceSideSourceId);
   else
        SubmitChangesWithWitOM(changeGroup, changeResult, sourceSideSourceId);

This enforces, that all WITD rule evaluations, such as valid value list and state transitions, are disabled for submitted WIT data and that changes are applied as instructed ... no questions asked. Additionally, turning on bypass-rule for WIT changes submission is requisite for higher migration content fidelity. In particular, the author of the source WIT change, regardless being a valid user or not on the target TFS server, is preserved. If bypass-rule is disabled, the migration service account will be the author of *all* the migrated WIT changes on the target TFS server.

What are the ranges of SettingValue?
a Blue Man on Another Man's Shoulders, Holding up a Bar in a Graph Clipart Illustration

The SettingValue is ignored at this stage. To enable the EnableBypassRuleDataSubmission, add the following line to the WIT session configuration:
   <MigrationSource InternalUniqueId="EF98D1AE-2101-444F-9FAB-DC9C354E861A"
                    FriendlyName="TFS2010B1X32T Target AS" 
                    ServerIdentifier="TFS2010B1X32T Target AS" 
                    ServerUrl="
http://TFS2010B1X32T:8080/tfs/defaultcollection
                    SourceIdentifier="TP-C" 
                    ProviderReferenceName="04201D39-6E47-416f-98B2-07F0013F8455">
       <CustomSettings>
           <CustomSetting SettingKey="EnableBypassRuleDataSubmission" SettingValue="false" />
       </CustomSettings>
       <StoredCredential />
   </MigrationSource>

In addition to enabling the rule, you must also ensure that the user account that will be performing the synchronization and submitting the WIT changes, is a member of the Team Foundation Service Group and thus authorised to bypass the rule evaluations.

The following is a sample script file used as part of the TFS Integration Platform – Getting Started Basic Scenario:

   1: cd "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE>"
   2: tfssecurity /g+ srv: tfs2010b1x32t\Administrator /server:tfs2010b1x32t\defaultcollection
   3: pause

To disable, either remove it or comment it out as shown:

   <CustomSettings>
       <!--<CustomSetting SettingKey="EnableBypassRuleDataSubmission" SettingValue="false" />—>
   </CustomSettings>

When should you use this rule?

Blue Businessman Seated at a Desk, Instructing Employees Clipart Illustration Bypassing any rule is extending a huge trust to the user submitting the WIT changes and as possible state and data corruption is possible, the recommendation is not to use this feature. Instead use the new conflict resolution tool to create appropriate rules. That said, we recommend to enable (use) the BypassRule, if the preservation of the “original author” in the migrated work items is important, and avoid it in all other cases.

Acronyms Used

| TFS – Team Foundation Server | WIT – Work Item Tracking | WITD – WIT Definition |

Here is a list of new quick reference posters that will be making an appearance in the specified projects shortly. We hope that these visualizations will add to the guidance documentation that they are part of … note that these are thumbnails and no attempt should be made to decipher the content. This list merely intends to inform you of imminent quick reference posters, whereby you can give the VSTS Rangers a shout if you cannot wait for one of the posters :)Clipart Illustration of a White Character Holding A Paintbrush And A Paint Palette

The teams have been having lots of fun on the whiteboard and canvas.

Title

Project

Some of the questions answered by the poster
image Team Foundation Server 2010 Capacity Planning

Visual Studio 2010 101 Guidance

Visual Studio 2010 Virtualization Guidance

Should you go single server, multi server, scale out or is virtualization an option?
image VSTS Rangers Projects Scrum Guide Visual Studio 2010 101 Guidance When do I do what within a VSTS Rangers projects and what are the scrum milestones?
image Visual Studio 2010 Test Architecture Visual Studio 2010 101 Guidance What is the test architecture within Visual Studio and when does which edition light up?
image Visual Studio 2010 Test Planning Visual Studio 2010 101 Guidance What are the main topics and steps you should be aware of when you are looking a test planning?
image Visual Studio 2008 – 2010 Editions Visual Studio 2010 101 Guidance What has changed from 2008 to 2010 and which edition is the best one for my requirements?
image Team Foundation Server 2010 Roles and Security Planning Visual Studio 2010 101 Guidance What are the roles, permissions and how are they enforced within Team Foundation Server?
image Team Foundation Server 2010 Single Server Deployment Planning Visual Studio 2010 101 Guidance What are the main planning steps when considering a Single Server (ATDT) deployment?
image Team Foundation Server 2010 Establishing a Team Project Planning Visual Studio 2010 101 Guidance What are the main planning steps when creating team projects?
image Migration Scenarios TFS Integration Platform Should I upgrade, migrate or synchronize? What is the recommended route / solution to consider for any of the above?
image Planning TFS Integration Platform What must I consider and what are the main awareness artefacts at my disposal when I am considering the TFS Integration Platform?

It is said that “A picture is worth a thousand words” … we trust that the above quick reference posters will do likewise and reduce the guidance by written 10,000 words :)

Working with a few early adopters and fellow VSTS Rangers (see picture on the right for a perfect VSTS Rangers and family life balance, as well as Springbok support from Robert and his son) it has become apparent that we need both a “Getting Started” guide for the user of the TFS Integration Platform (TIP) in a TFS-TFS environment, as well as a “Getting Started” guide for the custom adapter developer.

image image The TFS Integration Platform – Getting Started (image on the left) is the guide for the user and has been circulating the TIP early adopter ecosystem for some time. Additional supportive videos have been created and are awaiting final editing by the master Brian Keller.

The TFS Integration Platform – Custom Adapter POC (image on the right) is the guide for the custom adapter developer, guiding you through the implementation of a typical development environment, setting up the TIP code base and exploring the TIP Pipeline with the proof-of-concept (POC) adapter.
04-07-09_1033

If you are interested in getting involved in developing custom adapters for the TFS Integration Platform (TIP) then this guide is for you. We would appreciate your feedback, so that we can improve the guide and ensure that your custom adapter development experience is as painless and as much fun as possible.

The proof-of-concept (POC) comes with a step-by-setup walk-through guide and a ‘simple’ POC Adapter code base.

As mentioned in a number of blogs and forums, the TFS Integration Platform ALPHA release is imminent, whereby we are planning to release early alpha bits to CodePlex. Remember the definition of ALPHA and BETA and realise that the Alpha release is for the early adopters of the development environment, in other words the custom adapter developers, not the user of the platform for migration and synchronization scenarios.

  • ALPHA – alpha testing is conducted at the product provider’s site by the user, or at the user’s site with the product provider delivering intense support. The intent is to reveal errors that only the user will find in a controlled environment, which is NOT a production environment.
  • BETA – beta testing is conducted by the user and the product providers are generally not present or available. The intent is again for the user to reveal errors, but in an environment that cannot be controlled by the product providers. Again it is NOT a production environment, unless explicitly agreed with the product provider and the VSTS Rangers typically act as the intermediaries.

Give us a shout, if you would like to know more. Watch this space for the announcement when the Alpha release has gone live.

Acronyms Used

| POC – Proof of Concept | TFS – team Foundation Server | TIP – TFS integration Platform |

Clipart Illustration of a Full Classroom Of Students Sitting In Their School Desks And Listening To Their Professor As He Stands At A ChalkboardWhen I was debugging the custom adapter we developed for a proof-of-concept tonight, battling to keep my eyes open, I thought of a statement made by Paul Ehrlich … “To err is human, but to really foul up things you need a computer”. When I finally identified the gremlin in the code, I thought that perhaps one should change the statement slightly: “To err is human, but to really foul up things you need a computer programmed by a human”.

NOTE: The following applies to the TFS Integration Platform, in particular the custom adapter development adventure.

Symptom

When running our custom proof-of-concept adapter the synchronization analysis and delta generation worked like a charm. The ProcessChangesGroup method sprung to life and migrated all the changes. So far so good. Except, when the synchronization triggered again, the same changes were processed … again, again and again.

Sharing mistakes made along the way … to ensure they are not repeated!

The log looked the same every time, whereby I am snipping lots from the beginning and the end, to ensure you do not have to scroll through endless verbose logging output :)

[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Processing ChangeGroup #3
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: POC:MP:ProcessChangeGroup - 220
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding folder <c:/POCDrop> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Processing ChangeGroup #4
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: POC:MP:ProcessChangeGroup - 221
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding folder <c:/POCDrop/HelloPoc> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding folder <c:/POCDrop/HelloPoc/HelloPoc> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc.sln - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding file <HelloPoc.sln> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc.vssscc - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding file <HelloPoc.vssscc> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc/HelloPoc.csproj - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding file <HelloPoc.csproj> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc/HelloPoc.csproj.vspscc - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding file <HelloPoc.csproj.vspscc> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc/Program.cs - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding file <Program.cs> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc/Properties - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding folder <c:/POCDrop/HelloPoc/HelloPoc/Properties> to Poc
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl:      > c:/POCDrop/HelloPoc/HelloPoc/Properties/AssemblyInfo.cs - Microsoft.TeamFoundation.Migration.Tfs2008VCAdapter.TfsMigrationItem
[11/5/2009 8:54:34 PM] MigrationConsole.vshost.exe Information: 0 : VersionControl: Adding file <AssemblyInfo.cs> to Poc

… so why are we creating directories and files over and over again? Don’t we trust the computer to perform the File IO for us?

The Gremlin

The ProcessGroup method looked as follows when I started the investigation:

   1: ConversionResult IMigrationProvider.ProcessChangeGroup(ChangeGroup changeGroup)
   2: {
   3:     ConversionResult convResult = new ConversionResult(Guid.NewGuid(), Guid.NewGuid());
   4:     TraceManager.TraceInformation("POC:MP:ProcessChangeGroup - {0}", changeGroup.Name);
   5:                 
   6:     foreach (MigrationAction action in changeGroup.Actions)
   7:     {
   8:         TraceManager.TraceInformation("     > {0} - {1}", action.Path, action.SourceItem.GetType().ToString());
   9:         if (action.Action == WellKnownChangeActionId.Add && action.ItemTypeReferenceName == WellKnownContentType.VersionControlledFile.ReferenceName)
  10:         {
  11:            // action.SourceItem.Download(action.Path);
  12:             pocUtil.AddFile(action.Path);
  13:         }
  14:         else if (action.Action == WellKnownChangeActionId.Add && action.ItemTypeReferenceName == WellKnownContentType.VersionControlledFolder.ReferenceName)
  15:         {
  16:           //  action.SourceItem.Download(action.Path);
  17:             pocUtil.CreateFolder(action.Path);
  18:         }
  19:     }
  20:     return convResult;
  21: }

Note line 3, which is the root of all evil, as innocent as it may seem. In fact it returned a conversion result to the platform saying “I migrated from who knows, to who cares and the result of the conversion will be left up to your own imagination”. Can we blame the platform for assuming nothing had been done? “No” … in fact the platform should outright punish an adapter that returns such a meaningless conversion result indicator.

Changing the code as follows, allowed me to focus on other work tonight and tick off another gremlin (bug) from our whiteboard. Note that lines 5,6,7, 23 and 24 are different. We identified the source and the migration peer (target), we identified the change identifier for the history.  As the proof-of-concept adapter had no unique change id, such as a TFS changeset number of TFS Work Item Tracking number, we decided to hijack the source ID … not to be repeated in production adapters, but a work around for our proof-of-concept.

   1: ConversionResult IMigrationProvider.ProcessChangeGroup(ChangeGroup changeGroup)
   2: {
   3:     TraceManager.TraceInformation("POC:MP:ProcessChangeGroup - {0}", changeGroup.Name);
   4:     
   5:     Guid targetSideSourceId = m_configurationService.SourceId;
   6:     Guid sourceSideSourceId = m_configurationService.MigrationPeer;
   7:     ConversionResult convResult = new ConversionResult(sourceSideSourceId, targetSideSourceId);
   8:                 
   9:     foreach (MigrationAction action in changeGroup.Actions)
  10:     {
  11:         TraceManager.TraceInformation("     > {0} - {1}", action.Path, action.SourceItem.GetType().ToString());
  12:         if (action.Action == WellKnownChangeActionId.Add && action.ItemTypeReferenceName == WellKnownContentType.VersionControlledFile.ReferenceName)
  13:         {
  14:            // action.SourceItem.Download(action.Path);
  15:             pocUtil.AddFile(action.Path);
  16:         }
  17:         else if (action.Action == WellKnownChangeActionId.Add && action.ItemTypeReferenceName == WellKnownContentType.VersionControlledFolder.ReferenceName)
  18:         {
  19:           //  action.SourceItem.Download(action.Path);
  20:             pocUtil.CreateFolder(action.Path);
  21:         }
  22:     }
  23:     convResult.ChangeId = changeGroup.ReflectedChangeGroupId.ToString(); // for the POC we "loan" the other side's ID
  24:     convResult.ItemConversionHistory.Add(new ItemConversionHistory(changeGroup.Name, string.Empty, convResult.ChangeId, string.Empty));
  25:     return convResult;
  26: }

Lesson #2: According to Terry we have another learning from this adventure. When ConversionResult.ChangeId is left empty, the platform does not mark the MigrationInstruction (nextChangeGroup in the code above) to Complete. As a result, it will be reprocessed in the following round trip.

… so, if you are planning to develop custom adapters for the TFS Integration Platform, make sure you spend time pondering over the high water mark and the conversion result. It could safe you some night debugging, which saves you on burning candles and brewing endless buckets of coffee, which in turn means more sleep and less energy wastage.

Albert Einstein once said: “The secret of creativity is knowing how to hide your sources”.

Well, when it comes to the VSTS Rangers solutions and all the creativity that the VSTS Rangers are bringing to life, then there is no hiding of the sources. Check out these VSTS Rangers … there are a few more but we have not got all their pictures (yet).

You should recognise one or more of these creative individuals:

image

Guys, thank you … you are all amazing! Looking forward to a wave of new VSTS Rangers solutions shipping shortly, which includes TFS 2010 Upgrade Guidance, TFS 2010 Requirements Management Guidance, TFS 2010 Branching Guidance, Virtualization of VSTS 2010, VSTS 2010 101 Guidance and the TFS Integration Platform.

The secret of creativity with the VSTS Rangers is (1) Razor Sharp Focus + (2) Passion for Technology + (3) Commitment to deliver out-of-band solutions.

We could say that all of us have managed to stop being addicted to information technology … when we are asleep :)

It took me forever to move from XP and a short (ad)venture with Vista, to Windows 7 … but after enjoying the stability, the performance and the productivity enhancements for a couple of weeks I wish I had taken the plunge a lot earlier. Bookmark Martin’s post http://www.kulov.net/blogs/martin/2009/10/windows-7-tips.html, which includes some neat features and a reference to more.

BUT … this morning I was confused when I was busy looking at source code using Notepad as I have not installed any development software on my laptop. When I was looking for a file in Windows Explorer I suddenly noticed the Visual Studio icon:

image … doubting myself, I looked at the installed programs … image … no trace of Visual Studio 2010. Huh?


Looking at the properties of one of the “weird” files, revealed the secret:
image image the file opens with Visual Studio 2010 … on my virtual machine, which I installed 3 weeks ago.

WOW! Going to the Virtual PC Settings I found the “Auto publish” feature and beaming over to the help you can find all the details around the feature.

image

Context

Blue Fireman in a Uniform, Fighting a Fire Clipart Illustration I have been battling with the following error and finally decided to delve into the debugger and isolate the gremlin. It just got worse, because when I finally found the method …LoadProvider(), which loads each Adapter DLL in the PlugIns directory and looks for the IProvider interface. The reflection code claimed that the IProvider interface was not a known type within any of the adapters and therefore returned an empty provider dictionary to the pipeline … which in turn threw its toys out of the cot.

clip_image002

This is the problematic logic … statement on line 29 claims that type == null. Looking at the assembly in Reflector claims otherwise … which is when I called my colleague Terry for help.

   1: /// <summary>
   2:         /// Discovers providers under the specified directories and loads them if used in MigrationSources 
   3:         /// defined in the configuration. It instantiates a unique provider instance for each MigrationSource.
   4:         /// </summary>
   5:         public Dictionary<Guid, ProviderHandler> LoadProvider(params DirectoryInfo[] probingDirectories)
   6:         {
   7:             // Initialize a list that will contain all plugin types discovered
   8:             Dictionary<Guid, ProviderHandler> providerHandlers = new Dictionary<Guid, ProviderHandler>();
   9:  
  10:             if (probingDirectories != null)
  11:             {
  12:                 // Iterate over the probing directories and look for plugins
  13:                 foreach (DirectoryInfo directory in probingDirectories)
  14:                 {
  15:                     if (directory.Exists)
  16:                     {
  17:                         // Try to load plugins from each dll
  18:                         foreach (FileInfo file in directory.GetFiles("*.dll"))
  19:                         {
  20:                             try
  21:                             {
  22:                                 // Load the dll into an assembly
  23:                                 Assembly assembly = Assembly.LoadFrom(file.FullName);
  24:  
  25:                                 // Iterate over all types contained in the assembly
  26:                                 foreach (Type type in assembly.GetTypes())
  27:                                 {
  28:                                     // Only consider public, concrete types that implement IProvider
  29:                                     if (type.IsPublic && !type.IsAbstract && (type.GetInterface(typeof(IProvider).Name) != null))
  30:                                     {
  31:                                         ProviderHandler handler = ProviderHandler.FromType(type);
  32:                                         if (null == handler
  33:                                             || handler.ProviderId == null
  34:                                             || handler.ProviderId == Guid.Empty)
  35:                                         {
  36:                                             continue;
  37:                                         }
  38:  
  39:                                         Guid[] sourceIds = GetMigrationSourceId(handler.ProviderId);
  40:                                         if (sourceIds == null || sourceIds.Length == 0)
  41:                                         {
  42:                                             TraceManager.TraceWarning(String.Format("Provider {0} is not used in any MigrationSource", handler.ProviderId.ToString()));
  43:                                             continue;
  44:                                         }
  45:  
  46:                                         // try persist provider information to db
  47:                                         handler.FindSaveProvider();
  48:  
  49:                                         // create a unique provider instance for each migration source
  50:                                         foreach (Guid migrationSource in sourceIds)
  51:                                         {
  52:                                             ProviderHandler providerHandler = new ProviderHandler(handler);
  53:                                             
  54:                                             if (!providerHandlers.ContainsKey(migrationSource))
  55:                                             {
  56:                                                 providerHandlers.Add(migrationSource, providerHandler);
  57:                                                 TraceManager.TraceInformation("provider {0} {1} is loaded", providerHandler.ProviderName, handler.ProviderId.ToString());
  58:                                             }
  59:                                         }
  60:                                     }
  61:                                 }
  62:                             }
  63:                             catch (Exception ex)
  64:                             {
  65:                                 TraceManager.TraceError("A failure occurred while trying to load the {0} Provider: {1}{2}", 
  66:                                     file.FullName, Environment.NewLine, ex.ToString());
  67:                             }
  68:                         }
  69:                     }
  70:                 }
  71:             }
  72:             return providerHandlers;
  73:         }

Rule 42 (the answer to IT) … when you are unable to resolve a problem within a reasonable period of time, call a colleague and discuss the problem on the whiteboard. I do not know why I always tell everyone to adhere to this rule, yet I constantly find myself breaking it and exploring black holes :(

Cause

If any of your TFS Integration Platform adapters have the copy to local property set to true as part of their project build properties, the EditorFoundation, EntityModel and Toolkit assemblies are copied to the PlugIns directory as well. Once these assemblies make themselves at home the the PlugIns directory, the reflection logic misbehaves and fails to locate the IProvider interface type.

Resolution

This is a known bug and is under investigation. In the interim, please ensure that only Assemblies with an IProvider interface are located within the PlugIns directory. Remove all other assemblies … or face the gremlins as above.

I will update this post as soon as we have a resolution for the bug.

We are T+9 months, which means we are approaching 1 year in Canada, we have the first Canadian winter ahead of us and have just enjoyed the first real Halloween experience. After a long walk of enjoying the numerous Halloween decorations and the trick or treating, we returned home (frozen to the bone) and enjoyed a Swiss Fondue and Schnapps (unfortunately we could not find Swiss Schnapps, but the Austrian was palatable as well). Here are a few pictures to give those back home an idea of what the atmosphere was:
PA310230 PA310228 PA310229 PA310254 PB010261 PB010262PB010264 PB010265 PA310233

Just before Halloween we also had a great Soccer weekend …

 PA240208 … Shamrocks (Jacques’ team) won 7:0 and  PA310248  … Thunderbirds (Thorsten’s team) 8:5, which allowed me to PA310241 … doze off in the “sun”.

Now to convince my family to spend our Christmas vacation in Alaska …

A while ago be asked all the active external VSTS Rangers and VSTS Ranger project leads to vote for their external VSTS Rangers champion of the current wave of VSTS Rangers projects, which included: TFS 2010 Requirements Management, TFS 2010 Branching Guidance, TFS 2010 Upgrade Guidance, VSTS 2010 Virtualization Guidance and Factory, VSTS 2010 101 Guidance and TFS Integration Platform. The votes were therefore submitted primarily by Microsoft Most Valued Professionals and Technical Community leads and we had the pleasure of sitting back and watch the votes and comments rolling in.Clipart Illustration of a White Character Taking Notes Down On A Clipboard, A Supervisor, Manager, Or Someone Taking Inventory

What is an external VSTS Ranger?

An external VSTS Ranger is in essence a VSTS Ranger, not employed by Microsoft and therefore external to Microsoft, who works on VSTS Rangers projects as listed on http://msdn.microsoft.com/en-us/teamsystem/ee358787.aspx. In fact, all of the external VSTS Rangers are champions, because they are contributing their knowledge, their personal time and their passion to the VSTS Rangers initiatives, allowing us to work on and deliver the strategic out-of-band solutions.

What is the criteria to receive a “true champion” vote?

The activity and contributions were defined as ad-hoc, active, very active and champion. The latter implied that the VSTS Ranger has gone beyond the call of duty, has delivered beyond expectations and commitments and often jumped in to take over from where others failed to deliver.

And the champions are …

The top four winners are also presented on our VSTS Rangers site under the “Rangers Champions” category, whereby I am proud to mention that two of the champions are SA Architect community leads! Robert managed to secure an amazing seven (7) champion votes and ended up on the top :)
image image

Winning Team Of Blue Figures Holding Hands And Standing In A Circle Around Their Golden Championship Trophy Clipart Illustration Image

CONGRATULATIONS Robert, Zayd, Mathias and Neno! Well done and thank you!

In VSTS Rangers Process Improvements - We have listened to your feedback! Part 1 of 3 we introduced the first innovation which introduced a consolidated collaboration team site and in VSTS Rangers Process Improvements - We have listened to your feedback! Part 2 of 3 we covered the consolidated distribution list. The third and  last improvements, in this cycle, is focused on improving collaboration and increasing the transparency amongst all VSTS Rangers and throughout a VSTS Rangers project.

Lightweight Scrum Process – Phase 1 (Manual)

Problems we have all encountered in my own words, based on feedback:

image

  • What is going on?
  • What am I supposed to work on, when and by when?
  • Why is no-one bugging me ... I am busy and I forget. Reminding me 2 weeks before the due date is not  working.
  • We liked the transparency and light weight management of some of current the VSTS Rangers projects, which investigated and tried some scrum basics. Why are we not adopting these on a broader scale?
  • ... and again many more.

… move from right hand scenario to those on the left, by maximising transparency and minimising black holes (loss of communication). Picture loaned from book “Software Engineers on their way to Pluto”.

Our answer

  • We have created a light weight scrum process and a manual Excel based planning workbook as a base template for future VSTS Rangers projects.
    clip_image001
  • We will be monitoring, tweaking  and supporting the VSTS Rangers process over the course of the next batch of projects. Our aim is for some of us to pursue the certified scrum master certification and use this as our field experience. In future we would like to move our currently manual light-weight process to a derivative of the TFS 2010 MSF Agile once we have a TFS 2010 server at our disposal for VSTS Rangers projects.
  • See Certified Scrum Developer course … we can finally remove the duck tape :)  for an overview of the scrum process and a quick reference poster we created.

Questions

  • Why are we not using TFS 2010 at this stage1?
    We are waiting for an externally facing TFS 2010 server and also want to first trial and tweak the lightweight process manually, before adopting and committing to a standard or customised team process template.
  • Is the use of the scrum based process a must for VSTS Rangers projects?
    No, if your team decides to use another process, you are not forced to use the lightweight Scrum based process.

See To scrum or to Run … that is the agile question? and Certified Scrum Developer course … we can finally remove the duck tape :) for related posts.

Acronyms Used

| MSF -  Microsoft Solutions Framework | TFS – Team Foundation Server | VSTS – Visual Studio Team System |

Poster updated 2009-11-02.

0202 Microsoft Team System Editions 2010 Clipart Illustration of a White Character Construction Worker Wearing A Hard Hat And Vest, Standing With A Pickaxe And Shovel

This is not the official or final version of the Visual Studio 2010 community quick reference poster, but an interim revision.

Your continued feedback and comments will be most welcome, so that the SA Architect community leads can revise and finalise it. What is incorrect, what is missing, what is unclear … please let us know.

You can find the XPS and JPG copies here until the final version is published on www.saarchitect.net.

In VSTS Rangers Process Improvements - We have listened to your feedback! Part 1 of 3 we introduced the first innovation which introduced a consolidated collaboration team site. Our second innovation for the external VSTS Rangers is focused on email communication.

Change #2: Unified Distribution List (DL) for all external VSTS Rangers

Problems we have all encountered (in my own words, I can dig out the emails if necessary):

image

  • Why am I in a black hole? What happened or is happening?
  • Why are  messages to external VSTS Rangers team project members delayed?
  • What is going on in other VSTS Rangers projects?
  • ... and many more.

Our answer

  • Three Blue Men Using Laptops in an Internet Cafe Clipart IllustrationWe have created a single distribution list for all active, external VSTS Rangers. Both Bijan and I will be using this DL to send project specific messages to the project members, which removes the manual switching and forwarding of emails as is the case at the moment.

Questions

  • What is the name of the distribution list?
    VSTS Rangers will receive an email with the appropriate details.
  • How do you get access to this DL?
    When you join any of the new VSTS Rangers projects, you will automatically receive access. Also all currently active VSTS Rangers have been added and have been sent a notification.
  • Can I send a message to all external VSTS Rangers?
    If you are a member of the DL you can send a message to DL, otherwise your message will be rejected.
  • What if I do not want to receive all the messages from other projects?
    The protocol for the DL is to specify the VSTS Rangers project name, colon and then your subject as the subject to allow you to use rules and file/filter incoming messages.
    For example: TFS Integration Platform : WSS Samples is part of phase 2

We will monitor the impact and act accordingly if the noise is becoming too excessive and counter productive on the new distribution list.

Join us next time for the third and last planned VSTS Rangers process innovation for this year.

More Posts Next page »
 
Page view tracker