<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Shai Raiten&amp;#39;s Blog : .NET 4.5, TFS 11, DEV</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4.5/TFS+11/DEV/default.aspx</link><description>Tags: .NET 4.5, TFS 11, DEV</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>TFS API Part 47 (VS11) – Manage Iterations Dates</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/28/tfs-api-part-47-vs11-manage-iterations-dates.aspx</link><pubDate>Mon, 28 May 2012 15:26:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1105155</guid><dc:creator>shair</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=1105155</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/28/tfs-api-part-47-vs11-manage-iterations-dates.aspx#comments</comments><description>&lt;div class="share-buttons"&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;PADDING-RIGHT:15px;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;&lt;a class="twitter-share-button" href="http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/28/tfs-api-part-47-vs11-manage-iterations-dates.aspx"&gt;Tweet&lt;/a&gt;&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;PADDING-RIGHT:25px;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;
&lt;script type="IN/Share"&gt;&lt;/script&gt;
&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;&lt;iframe style="BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;WIDTH:100px;HEIGHT:21px;OVERFLOW:hidden;BORDER-TOP:medium none;BORDER-RIGHT:medium none;" src="http://www.facebook.com/plugins/like.php?href=http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/28/tfs-api-part-47-vs11-manage-iterations-dates.aspx&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=450&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font=segoe+ui&amp;amp;height=21&amp;amp;appId=184186808308137" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;
&lt;div class="g-plusone"&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;Over the last posts I talked about “&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/23/tfs-api-part-46-vs11-team-settings.aspx" target="_blank"&gt;TFS API Part 46 (VS11) – Team Settings&lt;/a&gt;”, in this post I’ll show how to get and change Iteration Dates from TFS API.&lt;/p&gt;  &lt;p&gt;We’ll show all Teams under a specific Team Project and once you click on a Team you will see its Iterations and Dates.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_759F5D2A.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_1EC6F569.png" width="771" height="435" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_00B8C1A8.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_3ED1DC59.png" width="764" height="270" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/files/folders/1097395/download.aspx" target="_blank"&gt;Download Demo Project&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Step 1: Create Project and Add Reference&lt;/h2&gt;  &lt;p&gt;Create an WPF application and add the following references:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First add reference for:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft.TeamFoundation.Build.Client (11.0.0.0) &lt;/li&gt;    &lt;li&gt;Microsoft.TeamFoundation.Build.Common.dll&amp;#160; (11.0.0.0) &lt;/li&gt;    &lt;li&gt;System.Windows.Forms.dll &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;(C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\)&lt;/p&gt;  &lt;h2&gt;Step 2: Connect and Get Teams&lt;/h2&gt;  &lt;p&gt;We need to get the &lt;span&gt;&lt;font color="#2b91af"&gt;TeamSettingsConfigurationService &lt;/font&gt;&lt;font color="#000000"&gt;so we’ll have all teams settings&lt;/font&gt;&lt;/span&gt; and also we need to obtain the &lt;span&gt;&lt;font color="#2b91af"&gt;ICommonStructureService4 &lt;/font&gt;&lt;/span&gt;service - Defines methods for working with the common structures Areas and Iterations.&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; btnConnect_Click(&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt; sender, &lt;span&gt;&lt;font color="#2b91af"&gt;RoutedEventArgs&lt;/font&gt;&lt;/span&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; tpp = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamProjectPicker&lt;/font&gt;&lt;/span&gt;(&lt;span&gt;&lt;font color="#2b91af"&gt;TeamProjectPickerMode&lt;/font&gt;&lt;/span&gt;.SingleProject, &lt;span&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; tpp.ShowDialog();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt; (tpp.SelectedTeamProjectCollection == &lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;) &lt;span&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; tfs = tpp.SelectedTeamProjectCollection;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; projectInfo = tpp.SelectedProjects[0];&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; teamConfig = tfs.GetService&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;TeamSettingsConfigurationService&lt;/font&gt;&lt;/span&gt;&amp;gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; css = tfs.GetService&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;ICommonStructureService4&lt;/font&gt;&lt;/span&gt;&amp;gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; GetTeams();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;The &lt;strong&gt;GetTeams &lt;/strong&gt;method use the &lt;strong&gt;GetTeamConfigurationsForUser&lt;/strong&gt; method from &lt;span&gt;&lt;font color="#2b91af"&gt;TeamSettingsConfigurationService &lt;/font&gt;&lt;font color="#000000"&gt;to get all teams settings.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; GetTeams()&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; configs = teamConfig.GetTeamConfigurationsForUser(&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;[] { projectInfo.Uri });&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; listTeams.ItemsSource = configs;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;h2&gt;Step 3: Get Team Iterations&lt;/h2&gt;  &lt;p&gt;More on Iterations and Areas:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2009/01/30/tfs-api-part-9-get-area-iteration-programmatically.aspx"&gt;TFS API Part 9: Get Area/Iteration Programmatically&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2009/01/30/tfs-api-part-10-add-area-iteration-programmatically.aspx"&gt;TFS API Part 10: Add Area/Iteration Programmatically&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2009/02/02/tfs-api-part-11-get-area-iteration-security-settings-using-iauthorizationservice.aspx"&gt;TFS API Part 11: Get Area/Iteration Security Settings Using IAuthorizationService&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Using the &lt;span&gt;&lt;font color="#2b91af"&gt;ICommonStructureService4 &lt;/font&gt;&lt;font color="#000000"&gt;we can pull and add new Iterations and Area to TFS.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;font color="#000000"&gt;When the user click on the Team List and select one team, can take the Team Settings and export the related iterations for that Team.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; listTeams_SelectionChanged(&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt; sender, &lt;span&gt;&lt;font color="#2b91af"&gt;SelectionChangedEventArgs&lt;/font&gt;&lt;/span&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt; (listTeams.SelectedItem == &lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;) &lt;span&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; treeIterations.Items.Clear();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; teamSettings = listTeams.SelectedItem &lt;span&gt;&lt;font color="#0000ff"&gt;as&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamConfiguration&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; root = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TreeViewItem&lt;/font&gt;&lt;/span&gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; root.Header = teamSettings.TeamName;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; BuildIterationTree(teamSettings.TeamSettings.IterationPaths, root);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; treeIterations.Items.Add(root);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Now, instead on parsing the Xml (Ugly….) you can just convert the XmlNode to NodeInfo object, the NodeInfo contains Start, End Date and everything else related to the Iteration.&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;namespace&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; Microsoft.TeamFoundation.Server&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; [&lt;span&gt;&lt;font color="#2b91af"&gt;Serializable&lt;/font&gt;&lt;/span&gt;]&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;/span&gt; &lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#2b91af"&gt;NodeInfo&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;? FinishDate;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; Name;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; ParentUri;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; Path;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; ProjectUri;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;[] Properties;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;? StartDate;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; StructureType;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; Uri;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; NodeInfo();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; NodeInfo(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; uri, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; name, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; structureType, &lt;span&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;[] properties, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; parentUri, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectUri, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; path);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; NodeInfo(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; uri, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; name, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; structureType, &lt;span&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;[] properties, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; parentUri, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectUri, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; path, &lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;? startDate, &lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;? finishDate);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;override&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; ToString();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;So in order to get the NodeInfo we can use two ways:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;GetNodeFromPath – Path&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;GetNode – Id&lt;/strong&gt;&amp;#160; (I’ll show how in Step 4) &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now if you choose to use Path you need to add the “Iteration” word after the team project name.&lt;/p&gt;  &lt;div class="code"&gt;   &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; BuildIterationTree(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;[] paths, &lt;span&gt;&lt;font color="#2b91af"&gt;TreeViewItem&lt;/font&gt;&lt;/span&gt; item)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;foreach&lt;/font&gt;&lt;/span&gt; (&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; nodePath &lt;span&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;/span&gt; paths)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; projectNameIndex = nodePath.IndexOf(&lt;span&gt;&lt;font color="#800000"&gt;&amp;quot;\\&amp;quot;&lt;/font&gt;&lt;/span&gt;, 2);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; fullPath = nodePath.Insert(projectNameIndex, &lt;span&gt;&lt;font color="#800000"&gt;&amp;quot;\\Iteration&amp;quot;&lt;/font&gt;&lt;/span&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#008000"&gt;//Project Name\\Iteration\Iteration 1&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; nodeInfo = css.GetNodeFromPath(fullPath);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; subTreeItem = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TreeViewItem&lt;/font&gt;&lt;/span&gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; subTreeItem.Header = &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;.Format(&lt;span&gt;&lt;font color="#800000"&gt;&amp;quot;{0} - Start: {1} - Finish: {2}&amp;quot;&lt;/font&gt;&lt;/span&gt;, nodeInfo.Name, nodeInfo.StartDate, nodeInfo.FinishDate);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; item.Items.Add(subTreeItem);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="background:white;margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;h2&gt;Step 4: Get All Iteration Tree&lt;/h2&gt;  &lt;p&gt;So as we took the Iterations from specific Team we can take all Iterations under Team Project and build the full tree includes Iteration dates.&lt;/p&gt;  &lt;p&gt;I’ve add a button on the top right corner of the application, when you click on that button we using the &lt;span&gt;&lt;font color="#2b91af"&gt;ICommonStructureService4 &lt;strong&gt;&lt;font color="#000000"&gt;ListStructures&lt;/font&gt; &lt;/strong&gt;&lt;/font&gt;&lt;font color="#000000"&gt;method to get the iteration tree and then export the nodes under the iteration (the list structure has Area and Iteration inside it)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; btnFullTree_Click(&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt; sender, &lt;span&gt;&lt;font color="#2b91af"&gt;RoutedEventArgs&lt;/font&gt;&lt;/span&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; treeIterations.Items.Clear();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#2b91af"&gt;NodeInfo&lt;/font&gt;&lt;/span&gt;[] structures = css.ListStructures(projectInfo.Uri);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#2b91af"&gt;NodeInfo&lt;/font&gt;&lt;/span&gt; iterations = structures.FirstOrDefault(n =&amp;gt; n.StructureType.Equals(&lt;span&gt;&lt;font color="#800000"&gt;&amp;quot;ProjectLifecycle&amp;quot;&lt;/font&gt;&lt;/span&gt;));&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#2b91af"&gt;XmlElement&lt;/font&gt;&lt;/span&gt; iterationsTree = css.GetNodesXml(&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;[] { iterations.Uri }, &lt;span&gt;&lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;/span&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; root = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TreeViewItem&lt;/font&gt;&lt;/span&gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; root.Header = projectInfo.Name;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; BuildIterationTree(iterationsTree.ChildNodes, root);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; treeIterations.Items.Add(root);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Now as we did for the Team Iterations (there we passed string[]) now we’re passing list of nodes.&lt;/p&gt;  &lt;p&gt;The easiest way here to obtain the &lt;strong&gt;NodeInfo&lt;/strong&gt; object is using &lt;strong&gt;GetNode&lt;/strong&gt; method (by id), so I extract the Node Id from the Node Xml and using that ID I can get the NodeInfo.&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; BuildIterationTree(&lt;span&gt;&lt;font color="#2b91af"&gt;XmlNodeList&lt;/font&gt;&lt;/span&gt; subItems, &lt;span&gt;&lt;font color="#2b91af"&gt;TreeViewItem&lt;/font&gt;&lt;/span&gt; item)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;foreach&lt;/font&gt;&lt;/span&gt; (&lt;span&gt;&lt;font color="#2b91af"&gt;XmlNode&lt;/font&gt;&lt;/span&gt; node &lt;span&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;/span&gt; subItems)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; nodeId = GetNodeID(node.OuterXml);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; nodeInfo = css.GetNode(nodeId);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; subTreeItem = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TreeViewItem&lt;/font&gt;&lt;/span&gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; subTreeItem.Header = &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;.Format(&lt;span&gt;&lt;font color="#800000"&gt;&amp;quot;{0} - Start: {1} - Finish: {2}&amp;quot;&lt;/font&gt;&lt;/span&gt;, nodeInfo.Name, nodeInfo.StartDate, nodeInfo.FinishDate);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; item.Items.Add(subTreeItem);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt; (node.ChildNodes.Count &amp;gt; 0)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; BuildIterationTree(node.ChildNodes, subTreeItem);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/files/folders/1097395/download.aspx" target="_blank"&gt;Download Demo Project&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1105155" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+Administration/default.aspx">TFS Administration</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+API/default.aspx">TFS API</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+11/default.aspx">TFS 11</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4.5/default.aspx">.NET 4.5</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TfsTeamService/default.aspx">TfsTeamService</category></item><item><title>TFS API Part 46 (VS11) – Team Settings</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/23/tfs-api-part-46-vs11-team-settings.aspx</link><pubDate>Wed, 23 May 2012 16:35:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1100367</guid><dc:creator>shair</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=1100367</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/23/tfs-api-part-46-vs11-team-settings.aspx#comments</comments><description>&lt;div class="share-buttons"&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;PADDING-RIGHT:15px;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;&lt;a class="twitter-share-button" href="http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/23/tfs-api-part-46-vs11-team-settings.aspx"&gt;Tweet&lt;/a&gt;&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;PADDING-RIGHT:25px;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;
&lt;script type="IN/Share"&gt;&lt;/script&gt;
&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;&lt;iframe style="BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;WIDTH:100px;HEIGHT:21px;OVERFLOW:hidden;BORDER-TOP:medium none;BORDER-RIGHT:medium none;" src="http://www.facebook.com/plugins/like.php?href=http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/23/tfs-api-part-46-vs11-team-settings.aspx&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=450&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font=segoe+ui&amp;amp;height=21&amp;amp;appId=184186808308137" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;
&lt;div class="g-plusone"&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In the previous posts “&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/21/tfs-api-part-45-vs11-modify-teams-and-team-members.aspx"&gt;TFS API Part 45 (VS11) – Modify Teams and Team Members&lt;/a&gt;” I talked about Teams, from getting all team to modify and creating new Team using TFS API.&lt;/p&gt;  &lt;p&gt;Now, Teams are more than just a “Security Group”, they hold specific settings such as relevant Areas/Iteration for that Team.&lt;/p&gt;  &lt;p&gt;The “Team” can be assigned to Backlog Iteration (Set as Team’s backlog Iteration), this takes all paths under that iteration and add them to the team backlog. You can also change the Iteration backlog to another path (not just the root), you just need at least one child below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_032293A2.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_101C73B3.png" width="194" height="153" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_679D919E.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_254A795B.png" width="448" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_1870233D.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_1DDE93E1.png" width="627" height="303" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And from TFS 11 you can define &lt;strong&gt;Start Date &lt;/strong&gt;and &lt;strong&gt;End Date &lt;/strong&gt;for &lt;strong&gt;Iterations&lt;/strong&gt;, and there is a cool fact – those dates are not just for beauty – TFS takes those iterations and automatically show you what is the current Iteration that you working on, what iterations you completed (past) and what iterations are next. you might have overlap iterations but for some reason you can only have one “Current” iteration. &lt;/p&gt;  &lt;p&gt;The “Current” iteration is defined by the iteration for which the start date is less than or equal to today’s date and the end date is greater than or equal to today and than is just sorted by Name.&lt;/p&gt;  &lt;p&gt;After you define the Iterations for the Project and for each Team you might want to define the Areas for the Team, you can also define a Default Area – Means that each work item you open&amp;#160; under that Team.&lt;/p&gt;  &lt;p&gt;When you define “Area\s” for Team this means that when you enter your Product Backlog (not query) you will only see work items under that “Area” (you choose if to include sub-areas)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_3FE6EFA7.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_128559D7.png" width="630" height="432" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, after we understand what and why let’s talk about How using TFS API.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_3B40BF20.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_000CE355.png" width="756" height="436" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/files/folders/1097291/download.aspx" target="_blank"&gt;Download Demo Project&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;&lt;strong&gt;Step 1: Create Project and Add Reference&lt;/strong&gt;&lt;/h2&gt;  &lt;p&gt;Create an WPF application and add the following references:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First add reference for:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft.TeamFoundation.Build.Client (11.0.0.0) &lt;/li&gt;    &lt;li&gt;Microsoft.TeamFoundation.Build.Common.dll&amp;#160; (11.0.0.0) &lt;/li&gt;    &lt;li&gt;System.Windows.Forms.dll &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;(C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\)&lt;/p&gt;  &lt;h2&gt;Step 2: Connect and Get Teams Settings&lt;/h2&gt;  &lt;p&gt;In the previous posts we used &lt;span&gt;&lt;font color="#2b91af"&gt;TfsTeamService &lt;/font&gt;&lt;font color="#000000"&gt;to get all teams under the Team Project. another way is to use the &lt;span&gt;&lt;font color="#2b91af"&gt;TeamSettingsConfigurationService.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;The TeamSettingsConfigurationService has two methods:&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;GetTeamConfigurationsForUser &lt;/li&gt;    &lt;li&gt;SetTeamSettings &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We’ll use the &lt;strong&gt;GetTeamConfigurationsForUser&lt;/strong&gt; passing the Project Uri, this will return all Teams under that project.&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; btnConnect_Click(&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt; sender, &lt;span&gt;&lt;font color="#2b91af"&gt;RoutedEventArgs&lt;/font&gt;&lt;/span&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; tpp = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamProjectPicker&lt;/font&gt;&lt;/span&gt;(&lt;span&gt;&lt;font color="#2b91af"&gt;TeamProjectPickerMode&lt;/font&gt;&lt;/span&gt;.SingleProject, &lt;span&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; tpp.ShowDialog();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt; (tpp.SelectedTeamProjectCollection == &lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;) &lt;span&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; tfs = tpp.SelectedTeamProjectCollection;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; projectInfo = tpp.SelectedProjects[0];&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; teamConfig = tfs.GetService&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;TeamSettingsConfigurationService&lt;/font&gt;&lt;/span&gt;&amp;gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; GetTeams();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; GetTeams()&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; configs = teamConfig.GetTeamConfigurationsForUser(&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;[] { projectInfo.Uri });&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; listTeams.ItemsSource = configs;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;h2&gt;Step 3: Get Team Settings&lt;/h2&gt;  &lt;p&gt;Now when you select a Team from the Teams list we’ll use the &lt;strong&gt;TeamSettings&lt;/strong&gt; object to pull the Areas + Iterations for that Team. You will also have the BacklogIterationPath and CurrentiterationPath properties (as we talked above).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_63434872.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_07882CF5.png" width="803" height="177" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; listTeams_SelectionChanged(&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt; sender, &lt;span&gt;&lt;font color="#2b91af"&gt;SelectionChangedEventArgs&lt;/font&gt;&lt;/span&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt; (listTeams.SelectedItem == &lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;) &lt;span&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; teamConfig = listTeams.SelectedItem &lt;span&gt;&lt;font color="#0000ff"&gt;as&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamConfiguration&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; txtBacklogIteration.Text = teamConfig.TeamSettings.BacklogIterationPath;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; txtCurrentIteration.Text = teamConfig.TeamSettings.CurrentIterationPath;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; listIterations.ItemsSource = teamConfig.TeamSettings.IterationPaths;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; listAreas.ItemsSource = teamConfig.TeamSettings.TeamFieldValues;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_1747C1F9.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_5B3B8043.png" width="756" height="436" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/files/folders/1097291/download.aspx" target="_blank"&gt;Download Demo Project&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1100367" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+Administration/default.aspx">TFS Administration</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+API/default.aspx">TFS API</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+11/default.aspx">TFS 11</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4.5/default.aspx">.NET 4.5</category></item><item><title>TFS API Part 45 (VS11) – Modify Teams and Team Members</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/21/tfs-api-part-45-vs11-modify-teams-and-team-members.aspx</link><pubDate>Mon, 21 May 2012 12:42:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1098159</guid><dc:creator>shair</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=1098159</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/21/tfs-api-part-45-vs11-modify-teams-and-team-members.aspx#comments</comments><description>&lt;div class="share-buttons"&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;PADDING-RIGHT:15px;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;&lt;a class="twitter-share-button" href="http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/21/tfs-api-part-45-vs11-modify-teams-and-team-members.aspx"&gt;Tweet&lt;/a&gt;&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;PADDING-RIGHT:25px;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;
&lt;script type="IN/Share"&gt;&lt;/script&gt;
&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;&lt;iframe style="BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;WIDTH:100px;HEIGHT:21px;OVERFLOW:hidden;BORDER-TOP:medium none;BORDER-RIGHT:medium none;" src="http://www.facebook.com/plugins/like.php?href=http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/21/tfs-api-part-45-vs11-modify-teams-and-team-members.aspx&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=450&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font=segoe+ui&amp;amp;height=21&amp;amp;appId=184186808308137" frameborder="0"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style="TEXT-ALIGN:left;LINE-HEIGHT:1em;FONT-FAMILY:Arial, Helvetica, sans-serif;FLOAT:left;FONT-SIZE:14px;"&gt;
&lt;div class="g-plusone"&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;In my previous post “&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/20/tfs-api-part-44-vs11-teams-and-team-members.aspx" target="_blank"&gt;Teams and Team Members&lt;/a&gt;”&amp;#160; I talked about new Service in TFS API called – TfsTeamService. Using this service we can control Teams and Team Members under TFS.&lt;/p&gt;  &lt;p&gt;We can create and remove Teams and Team Members using TFS API. I know this can be quite confusing but Teams in TFS are simply Group (Security Group), same as Contributors, Administrators etc.&lt;/p&gt;  &lt;p&gt;If you open Security tab under TFS Web Management you can see that there is two separate lists of Groups – Teams and TFS Groups, I’ll show how to separate between Teams and Groups.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_46FEC180.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_12EA222D.png" width="210" height="306" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In order to add members or remove them from specific Team we need to use the &lt;strong&gt;&lt;u&gt;IGroupSecurityService.&lt;/u&gt;&lt;/strong&gt; You can read more here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2011/12/07/tfs-api-part-41-manage-groups-and-members.aspx" target="_blank"&gt;TFS API Part 41–Manage Groups and Members&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2010/11/24/tfs-api-part-32-add-and-remove-users-from-application-groups.aspx" target="_blank"&gt;TFS API Part 32 – Add and Remove Users From Application Groups&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The application below will show you two lists: Groups and Teams.    &lt;br /&gt;Then you will be able to Remove the Team or Group and for each you can get the members under it.     &lt;br /&gt;You can also create new Team.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_1A45E1DA.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_3180C07E.png" width="747" height="481" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/files/folders/shair/entry1097183.aspx" target="_blank"&gt;Download Demo Project&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;&lt;strong&gt;Step 1: Create Project and Add Reference&lt;/strong&gt;&lt;/h2&gt;  &lt;p&gt;Create an WPF application and add the following references:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First add reference for:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft.TeamFoundation.Build.Client (11.0.0.0) &lt;/li&gt;    &lt;li&gt;Microsoft.TeamFoundation.Build.Common.dll&amp;#160; (11.0.0.0) &lt;/li&gt;    &lt;li&gt;System.Windows.Forms.dll &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font size="2"&gt;(C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\)&lt;/font&gt;&lt;/p&gt;  &lt;h2&gt;Step 2: Connect Team Foundation Server&lt;/h2&gt;  &lt;p&gt;Connect to TFS and obtain the &lt;span&gt;&lt;font color="#2b91af"&gt;TfsTeamService &lt;font color="#000000"&gt;so we get the Team list and we need the &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;IGroupSecurityService &lt;/font&gt;&lt;/span&gt;so we can add / remove Members and Groups.&lt;/font&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; btnConnect_Click(&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt; sender, &lt;span&gt;&lt;font color="#2b91af"&gt;RoutedEventArgs&lt;/font&gt;&lt;/span&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; tpp = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamProjectPicker&lt;/font&gt;&lt;/span&gt;(&lt;span&gt;&lt;font color="#2b91af"&gt;TeamProjectPickerMode&lt;/font&gt;&lt;/span&gt;.SingleProject, &lt;span&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; tpp.ShowDialog();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt; (tpp.SelectedTeamProjectCollection == &lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;) &lt;span&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; tfs = tpp.SelectedTeamProjectCollection;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; teamService = tfs.GetService&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;TfsTeamService&lt;/font&gt;&lt;/span&gt;&amp;gt;();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; projectInfo = tpp.SelectedProjects[0];&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; gss = (&lt;span&gt;&lt;font color="#2b91af"&gt;IGroupSecurityService&lt;/font&gt;&lt;/span&gt;)tfs.GetService(&lt;span&gt;&lt;font color="#0000ff"&gt;typeof&lt;/font&gt;&lt;/span&gt;(&lt;span&gt;&lt;font color="#2b91af"&gt;IGroupSecurityService&lt;/font&gt;&lt;/span&gt;));&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; GetTeams();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; GetGroups();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;To get the Teams list you only need to use the &lt;u&gt;TFSTeamService&lt;/u&gt; and call the &lt;strong&gt;QueryTeams&lt;/strong&gt; method.&lt;/p&gt;  &lt;p&gt;For getting the Project Groups we’ll use the &lt;span&gt;&lt;font color="#2b91af"&gt;IGroupSecurityService &lt;font color="#000000"&gt;calling&lt;/font&gt; &lt;font color="#000000"&gt;&lt;strong&gt;ListApplicationGroups&lt;/strong&gt;&lt;/font&gt; &lt;/font&gt;&lt;font color="#000000"&gt;passing the project uri, this will return all groups under that Team Project (also the teams), in order to exclude teams from that list I did a query to verify for each item that his Sig doesn&amp;#39;t exists in the TeamsList.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; GetTeams()&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; _teams = teamService.QueryTeams(projectInfo.Uri).ToList();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; listTeams.ItemsSource = _teams;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; GetGroups()&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#2b91af"&gt;Identity&lt;/font&gt;&lt;/span&gt;[] groups = gss.ListApplicationGroups(projectInfo.Uri);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt; query = &lt;span&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;/span&gt; _group &lt;span&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;/span&gt; groups&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt;&lt;/span&gt; _group.Type == &lt;span&gt;&lt;font color="#2b91af"&gt;IdentityType&lt;/font&gt;&lt;/span&gt;.ApplicationGroup&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;amp;&amp;amp; !_teams.Any(t =&amp;gt; t.Identity.Descriptor.Identifier.Equals(_group.Sid))&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;/span&gt; _group;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; listGroups.ItemsSource = query;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;h2&gt;Step 3: Add And Remove &lt;/h2&gt;  &lt;p&gt;Now to the easy part, to Create new Team just use the TfsTeamService and use the &lt;strong&gt;CreateTeam &lt;/strong&gt;method.&lt;/p&gt;  &lt;p&gt;Use the &lt;span&gt;&lt;font color="#2b91af"&gt;IGroupSecurityService &lt;/font&gt;&lt;font color="#000000"&gt;to Add members to Team or Group (The Same…) remove team/groups – you can ream more here - &lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/2011/12/07/tfs-api-part-41-manage-groups-and-members.aspx" target="_blank"&gt;TFS API Part 41–Manage Groups and Members&lt;/a&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;teamService.CreateTeam(projectInfo.Uri, txtTitle.Text, txtDescription.Text, &lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;         &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font size="2" face="Consolas"&gt;&lt;/font&gt;&lt;/p&gt;    &lt;div style="background:white;"&gt;     &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;gss.DeleteApplicationGroup(teamSid);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;   &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;span&gt;&lt;font color="#2b91af" size="3"&gt;&lt;strong&gt;&lt;u&gt;TfsTeamService&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="code" style="background:white;"&gt;   &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size:10pt;"&gt;namespace&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt; Microsoft.TeamFoundation.Client&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;/span&gt; &lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#2b91af"&gt;TfsTeamService&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; TfsTeamService();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt; CreateTeam(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectId, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; name, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; description, &lt;span&gt;&lt;font color="#2b91af"&gt;IDictionary&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;, &lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt;&amp;gt; properties);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt; GetDefaultTeam(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectUri, &lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&amp;gt; propertyNameFilters);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;Guid&lt;/font&gt;&lt;/span&gt; GetDefaultTeamId(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectUri);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; Initialize(&lt;span&gt;&lt;font color="#2b91af"&gt;TfsConnection&lt;/font&gt;&lt;/span&gt; tfsConnection);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;IEnumerable&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt;&amp;gt; QueryTeams(&lt;span&gt;&lt;font color="#2b91af"&gt;IdentityDescriptor&lt;/font&gt;&lt;/span&gt; descriptor);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;IEnumerable&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt;&amp;gt; QueryTeams(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectId);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;IEnumerable&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt;&amp;gt; QueryTeams(&lt;span&gt;&lt;font color="#2b91af"&gt;IdentityDescriptor&lt;/font&gt;&lt;/span&gt; descriptor, &lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&amp;gt; propertyNameFilters);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt; ReadTeam(&lt;span&gt;&lt;font color="#2b91af"&gt;Guid&lt;/font&gt;&lt;/span&gt; teamId, &lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&amp;gt; propertyNameFilters);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt; ReadTeam(&lt;span&gt;&lt;font color="#2b91af"&gt;IdentityDescriptor&lt;/font&gt;&lt;/span&gt; descriptor, &lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&amp;gt; propertyNameFilters);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt; ReadTeam(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectId, &lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; teamName, &lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&amp;gt; propertyNameFilters);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; SetDefaultTeam(&lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt; team);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; SetDefaultTeamId(&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt; projectUri, &lt;span&gt;&lt;font color="#2b91af"&gt;Guid&lt;/font&gt;&lt;/span&gt; teamId);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt; UpdateTeam(&lt;span&gt;&lt;font color="#2b91af"&gt;TeamFoundationTeam&lt;/font&gt;&lt;/span&gt; team);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/files/folders/shair/entry1097183.aspx" target="_blank"&gt;Download Demo Project&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1098159" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+Administration/default.aspx">TFS Administration</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+Utilities/default.aspx">TFS Utilities</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+API/default.aspx">TFS API</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+11/default.aspx">TFS 11</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4.5/default.aspx">.NET 4.5</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TfsTeamService/default.aspx">TfsTeamService</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/IGroupSecurityService/default.aspx">IGroupSecurityService</category></item><item><title>אז מה חדש ב–TFS 11</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2011/09/27/tfs-11.aspx</link><pubDate>Tue, 27 Sep 2011 21:08:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:906972</guid><dc:creator>shair</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=906972</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2011/09/27/tfs-11.aspx#comments</comments><description>&lt;div class="share-buttons"&gt;
  &lt;div style="text-align:left;line-height:1em;padding-right:15px;font-family:arial, helvetica, sans-serif;float:left;font-size:14px;"&gt;&lt;a class="twitter-share-button" href="http://twitter.com/share?url=http://blogs.microsoft.co.il/blogs/shair/archive/2011/09/27/tfs-11.aspx"&gt;Tweet&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div class="share-buttons"&gt;
  &lt;div style="text-align:left;line-height:1em;padding-right:25px;font-family:arial, helvetica, sans-serif;float:left;font-size:14px;"&gt;&lt;script type="IN/Share"&gt;&lt;/script&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div class="share-buttons"&gt;
  &lt;div style="text-align:left;line-height:1em;font-family:arial, helvetica, sans-serif;float:left;font-size:14px;"&gt;&lt;iframe style="WIDTH:100px;HEIGHT:21px;" src="http://www.facebook.com/plugins/like.php?href=http://blogs.microsoft.co.il/blogs/shair/archive/2011/09/27/tfs-11.aspx&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=450&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font=segoe+ui&amp;amp;height=21&amp;amp;appId=184186808308137" scrolling="no" frameborder="0" style="border:none;overflow:hidden;width:450px;height:21px;"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div class="share-buttons"&gt;
  &lt;div style="text-align:left;line-height:1em;font-family:arial, helvetica, sans-serif;float:left;font-size:14px;"&gt;
    &lt;div class="g-plusone"&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class="share-buttons"&gt;
  &lt;br /&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p dir="rtl" class="share-buttons"&gt;מהרגע שחזרתי מכנס Build לקוחות שואלים אותי מה מחכה להם בגרסא החדשה של Visual Studio 11 ו – TFS 11?&lt;/p&gt;

&lt;p dir="rtl" class="share-buttons"&gt;קצת היסטוריה – בעבר חברות רכשו מספר רב של כלים עבור כל תפקיד ייעודי בחברה, לאנשי פיתוח – Visual Studio, לאנשי בדיקות Quality Center ועוד כלים לאוטומציה, מנהלים עבדו עם Excel או MS Project ועוד ועוד כלים, הבעיה שלא היתה אינטגרציה ושיתופיות מלאה בין הכלים, מה שגרם לקשיים לא קטנים בתקשורת ובמעקב אחרי התהליך.&lt;/p&gt;

&lt;p dir="rtl" class="share-buttons"&gt;ב – 2005 מיקרוסופט הוציאה לאוויר העולם את Team System כמוצר נפרד מ – Visual Studio שהיה חידוש מרגש לעולם ה – ALM והכניסה את עולם הפיתוח לעבודה תחת פלטפורמה אחידה עם מגוון כלים עבור כל תפקיד בתהליך הפיתוח.&lt;/p&gt;

&lt;p dir="rtl" class="share-buttons"&gt;מאז יצאו גרסאות נוספות של המוצר ואף הפך להיות מוצר דגל של מיקרוסופט לעולם ה – ALM וחלק בלתי נפרד מ – Visual Studio. גרסאת 2010 היתה התקדמות משמעותית מבחינת יכולות פיתוח, בדיקות וארכיטקטורה והיתה הגרסא הראשונה שנתנה פתרון מלאה לחברות משלב הדרישות לעולם הבדיקות.&lt;/p&gt;

&lt;p dir="rtl" class="share-buttons"&gt;גרסאת 2010 היתה משמעותית עם המון חידושים ויכולות לעולם ה – ALM ומאות לקוחות עברו לעבוד עם TFS 2010 כפלטפורמה מרכזית בתהליך פיתוח המוצר, בגלל הביקוש הרב &lt;a href="http://www.sela.co.il" target="_blank"&gt;מכללת סלע&lt;/a&gt; הרחיבה את קבוצת ה – ALM ל-10 אנשים,&amp;#160; קבוצת ה – ALM הגדולה בארץ.&lt;/p&gt;

&lt;p dir="rtl" class="share-buttons"&gt;&lt;strong&gt;&lt;font size="4"&gt;מה חדש?&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p dir="rtl" class="share-buttons"&gt;ישנם המון חידושים מרגשים בגירסה הקרובה ואני אעבור על כולם לעומק בסדרת פוסטים בשבועות הקרובים, עכשיו אתן טעימה מאותן יכולות:&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;strong&gt;HTML + Images -&lt;/strong&gt;&amp;#160; זה לא כלי חדש בגרסה הבאה אבל ללא ספק אחד הדברים המרגשים ביותר –&amp;gt; סוף סוף הכניסו את היכולת להוסיף תמונות בשדות HTML זה כבר שווה את המעבר!!! 

  &lt;br /&gt;&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;strong&gt;Scrum – &lt;/strong&gt;ב – TFS 11 הינה מילת מפתח חשובה וחלק כמעט בלתי נפרד מהמערכת, מגוון כלים והתאמות שנאלצנו לבצע על מנת להפוך את TFS לסביבת Scrum נוחה, עכשיו מגיע Scrum עם TFS 11 כחלק מהחבילה ומאפשר לנו לעבוד עם איטרציות, הגדרת תאריך סיום והתחלה לאינטרציה, ניהול משימות נוח, חלוקת עדיפויות ועוד דברים בסיסים בניהול תהליך Scrum. 

  &lt;br /&gt;&lt;font color="#ff0000"&gt;*&lt;/font&gt; כמובן שלא חייבים לעבוד Scrum או Agile ועדיין המערכת תעבוד ותתן לנו את יכולות הניהול על כל מתודולוגיה שנבחר. 

  &lt;br /&gt;

  &lt;br /&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_1ED6CC02.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_4EDD0984.png" width="622" height="375" /&gt;&lt;/a&gt; 

  &lt;br /&gt;

  &lt;br /&gt;&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;strong&gt;עיצוב \ ביצועים&lt;/strong&gt; – המראה החדש שמגיע עם ממשק האינטרנטי של TFS הוא דבר יפה ונוח אבל חשוב מכך הם הביצועים והיכולות שניתנים לנו. 

  &lt;br /&gt;יכולות גרירה של משימות לאיטרציות, לאנשים וכמובן העברה של משימה לסטאטוס שונה והכל מבוסס על פעולות אסיכרוניות – כלומר לא צריך לחכות עד שהשמירה תסתיים והכל קורה ברקע בלי שאנחנו נצטרך להמתין. 

  &lt;br /&gt;

  &lt;br /&gt;

  &lt;br /&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_3C546D35.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_3364194F.png" width="580" height="333" /&gt;&lt;/a&gt; 

  &lt;br /&gt;

  &lt;br /&gt;&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;a href="http://blogs.msdn.com/b/bharry/archive/2011/09/14/team-foundation-server-on-windows-azure.aspx" target="_blank"&gt;&lt;strong&gt;TFS עובר לענן&lt;/strong&gt;&lt;/a&gt; – רעיון הענן לא חדש ותופס תאוצה רבה במיקרוסופט העולמית, גם TFS נכנס לתמונה, עדיין לא ידע בדיוק מה המחיר או שיטת העבודה מול מיקרוסופט בנושא אבל סביר להניח שתוכלו לרכוש שרת TFS בענן ובכך לא תצטרכו לרכוש חומרה מיוחדת או לדאוג לתחזוקה שותפת של השרת – הכל שמור ומטופל בענן! 

  &lt;br /&gt;&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;strong&gt;&lt;a href="http://blogs.msdn.com/b/jasonz/archive/2011/09/14/announcing-visual-studio-11-developer-preview.aspx" target="_blank"&gt;שיפור חווית מפתח&lt;/a&gt;&lt;/strong&gt; - Code Review מובנה ב – Team Explorer וממשק ניהול עבודה נוח במיוחד. 

  &lt;br /&gt;כמפתח אוכל להעביר את הקוד שכתבתי לחבר אחר בצוות בשביל לקבל חוות דעת והמלצות, וכמובן להעביר את הקוד שלי לבדיקה ע”י ראש צוות וכו. 

  &lt;br /&gt;כלים לבדיקת קוד משוכפל (הרי רוב הבעיות מגיעות שאנחנו עושים Copy Paste &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.microsoft.co.il/blogs/shair/wlEmoticon-smile_5EF497B1.png" /&gt;), כמובן שהם לא בודקים טקסט משוכפל אלא לוגיקה זהה ומאפשרות לנו לאתר נוקודות בעייתיות. 

  &lt;br /&gt;&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;a href="http://blogs.msdn.com/b/jasonz/archive/2011/09/14/announcing-visual-studio-11-developer-preview.aspx" target="_blank"&gt;&lt;strong&gt;בדיקות&lt;/strong&gt;&lt;/a&gt; – מעבר לשיפורים בביצועים תמיכה במגוון לפטפורמות לבדיקות Unit Test נוספה יכולת חשובה מאוד לעולם הבדיקות הידניות - &lt;strong&gt;Exploratory Testing – &lt;/strong&gt;בהרבה מקרים אנשי בדיקות לא פועלים לפי תסריט בדיקות מוכן אלא כמו שאומרים “זורמים” ומבצעים בדיקה חופשית על המערכת, במהלך בדיקה חופשית יכול להיות שנגלה באג חדש במערכת ואז נצטרך לתאר מה עשינו בשביל למצוא אותו וכמובן לכתוב תסריט בדיקה מתאים, ב – Microsoft Test Manager 11 תוכלו להשתמש ביכולת ה - &lt;strong&gt;Exploratory Testing &lt;/strong&gt;בשביל לבצע בדיקה חופשית ובמקרה של מציאת באג הכלי יודע לפתוח באג ובו הצעדים המדוייקים לפעולות שבוצעו ובנוסף ניתן יהיה ליצור תסריט מאותם צעדים. 

  &lt;br /&gt;

  &lt;br /&gt;זאת היה טעימה מהגרסה הבאה של Visual Studio 11&amp;#160; ו – TFS 11.&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;strong&gt;התרשמתם? רוצים להתרשם בעצמכם?&lt;/strong&gt;&lt;/p&gt;

&lt;p dir="rtl"&gt;&lt;a href="http://blogs.msdn.com/b/briankel/archive/2011/09/16/visual-studio-11-application-lifecycle-management-virtual-machine-and-hands-on-labs-demo-scripts.aspx" target="_blank"&gt;בריאן קלר&lt;/a&gt; (Brian Keller) בנה מכונה וירטואלית עם סביבת TFS 11 ו – Visual Studio 11 אז &lt;strong&gt;נסו בעצמכם&lt;/strong&gt; - &lt;a title="http://aka.ms/VS11ALMVM" href="http://aka.ms/VS11ALMVM"&gt;http://aka.ms/VS11ALMVM&lt;/a&gt; &lt;/p&gt;

&lt;p dir="rtl"&gt;בהצלחה! &lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=906972" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Source+Control/default.aspx">Source Control</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Data+Dude/default.aspx">Data Dude</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/ITPRO/default.aspx">ITPRO</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Questions/default.aspx">Questions</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Microsoft+Test+Manager/default.aspx">Microsoft Test Manager</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4/default.aspx">.NET 4</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+11/default.aspx">TFS 11</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Microsoft+Test+Manager+11/default.aspx">Microsoft Test Manager 11</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4.5/default.aspx">.NET 4.5</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/MTM+11/default.aspx">MTM 11</category></item></channel></rss>