<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Buck Hodges</title><link>http://blogs.msdn.com/b/buckh/</link><description>Visual Studio ALM (VSALM, formerly VSTS) - Team Foundation Server (TFS)</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>After upgrading: Updating licensing and enabling async checkout for server workspaces</title><link>http://blogs.msdn.com/b/buckh/archive/2012/06/03/after-upgrading-updating-licensing-and-enabling-async-checkout-for-server-workspaces.aspx</link><pubDate>Sun, 03 Jun 2012 19:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10314429</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10314429</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/06/03/after-upgrading-updating-licensing-and-enabling-async-checkout-for-server-workspaces.aspx#comments</comments><description>&lt;p&gt;The other day I wrote a post with a &lt;a href="http://blogs.msdn.com/b/buckh/archive/2012/06/01/use-the-wizard-to-upgrade-team-projects-in-tfs-2012.aspx"&gt;summary of links for upgrading team project settings&lt;/a&gt; to turn on all of the new features, such as code review, task board, and more.&lt;/p&gt;
&lt;p&gt;There are a couple more things I want to point out that you&amp;rsquo;ll want to tweak after the upgrade.&lt;/p&gt;
&lt;p&gt;First is licensing for the feature set.&amp;nbsp; The default setting is Standard.&amp;nbsp; You can choose to set the default to Full if all of your users are licensed for Premium, Ultimate, or Test Professional 2012 (see the &lt;a href="http://www.microsoft.com/visualstudio/11/en-us/products/compare"&gt;editions page&lt;/a&gt;).&amp;nbsp; If not, you can add the people or groups who are licensed for full.&amp;nbsp; Only users with Full access will get the following features.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Backlog and Sprint Planning Tools&lt;/li&gt;
&lt;li&gt;Request and Manage Feedback&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Without adding licensing access to the feature set, you will get "TF400409: You do not have licensing rights to access this feature: Backlog and Sprint Planning Tools" (you may see other&amp;nbsp;features listed, depending on what you try access).&amp;nbsp;if you try to access the task board or product backlog.&lt;/p&gt;
&lt;p&gt;From the Welcome Page, click on Administer Team Foundation Server and then click on the Web Access tab.&amp;nbsp; To change the default, click on Full and then click on &amp;ldquo;Set as default web access&amp;rdquo; to make it the default.&amp;nbsp; The screen shot shows what you&amp;rsquo;ll see after making the change.&amp;nbsp; Note that the &amp;ldquo;Limited&amp;rdquo; setting is for users who don&amp;rsquo;t have a CAL and that you want to grant access to see their work items and file new ones (also known as &lt;a href="http://msdn.microsoft.com/en-us/library/cc668124.aspx"&gt;work item only view in the TFS 2010&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-09-metablogapi/4606.licensing_5F00_4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="licensing" border="0" alt="licensing" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-09-metablogapi/4606.licensing_5F00_thumb_5F00_1.png" width="636" height="387" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Second, while we have a great &lt;a href="http://blogs.msdn.com/b/bharry/archive/2011/08/02/version-control-model-enhancements-in-tfs-11.aspx"&gt;local workspaces&lt;/a&gt; feature that is new for TFS 2012 and you can easily switch a server workspace to a local workspace, you may want to keep your workspace a server workspace if it is extremely large (about 50,000 files for a spinning disk, higher for SSD).&amp;nbsp; Internally, our dev workspaces are often 250,000 files or more (getting them trimmed down is an ongoing effort).&amp;nbsp; We&amp;rsquo;ve introduced a feature in TFS 2012 where checkouts in VS 2012 are completely asynchronous if you enable the setting on the TFS 2012 server.&amp;nbsp; That means that there&amp;rsquo;s never a pause in VS when it checks out a file you are editing &amp;ndash; it happens in the background.&lt;/p&gt;
&lt;p&gt;As a consequence of turning on this setting, TFS disables exclusive checkout (any existing ones are converted to exclusive checkin locks) and the get latest on checkout feature.&amp;nbsp; You can find the documentation &lt;a href="http://msdn.microsoft.com/en-us/library/bb892960(v=vs.110)"&gt;here&lt;/a&gt;.&amp;nbsp; You&amp;rsquo;ll also see in this dialog that you can control whether newly created workspaces default to server or local (out of the box, the default is local workspaces, since we believe that&amp;rsquo;s what the vast majority of folks will want most of the time).&lt;/p&gt;
&lt;p&gt;To get to this dialog, choose Team &amp;ndash;&amp;gt; Team Project Collection Settings from the main menu in VS, then choose Source Control.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-09-metablogapi/2727.asynccheckout_5F00_4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="asynccheckout" border="0" alt="asynccheckout" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-09-metablogapi/4300.asynccheckout_5F00_thumb_5F00_1.png" width="449" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[UPDATE 6/4/2012]&lt;/strong&gt;&amp;nbsp; I've included the TF400409 error message.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Follow me at &lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/twitter.com/tfsbuck"&gt;twitter.com/tfsbuck&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10314429" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>Use the wizard to upgrade team projects in TFS 2012</title><link>http://blogs.msdn.com/b/buckh/archive/2012/06/01/use-the-wizard-to-upgrade-team-projects-in-tfs-2012.aspx</link><pubDate>Fri, 01 Jun 2012 18:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10313660</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10313660</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/06/01/use-the-wizard-to-upgrade-team-projects-in-tfs-2012.aspx#comments</comments><description>&lt;p&gt;As you&amp;rsquo;ve seen from &lt;a href="http://blogs.msdn.com/b/bharry/archive/2012/05/31/visual-studio-tfs-2012-release-candidate-available-today.aspx"&gt;Brian&amp;rsquo;s post&lt;/a&gt; and a bunch of others, Visual Studio and Team Foundation Server 2012 RC are now available.&amp;nbsp; One of the consistent pain points in upgrading from one version of TFS to the next has been in upgrading the process for a team project.&amp;nbsp; With TFS 2012, we&amp;rsquo;ve taken our first steps toward making it dramatically better.&amp;nbsp; We now provide a wizard that is able to upgrade a team project&amp;rsquo;s process quickly and easily if you have made no customizations or only a limited set of customizations.&amp;nbsp; There are a number of resources available to help you through the process, and I wanted to provide a collection of links in one place.&lt;/p&gt;
&lt;p&gt;First, Tim Elhajj, who creates documentation on administering TFS, has posted a very easy to read article on &lt;a href="http://elhajj.wordpress.com/upgrade-team-foundation-server/run-the-feature-enablement-wizard/"&gt;how to use this new configuration upgrade wizard&lt;/a&gt;, and the end of that page has links to MSDN for &lt;a href="http://msdn.microsoft.com/en-us/library/ff432837(VS.110).aspx"&gt;resolving errors&lt;/a&gt; and dealing with the &lt;a href="http://msdn.microsoft.com/en-us/library/hh500412(v=vs.110).aspx"&gt;differences in the Agile process template&lt;/a&gt; as well as adding new shared queries that will be automatically created for new team projects.&amp;nbsp; If you are new to upgrading TFS, you can &lt;a href="http://elhajj.wordpress.com/"&gt;start at the beginning&lt;/a&gt; to walk through the upgrade process.&lt;/p&gt;
&lt;p&gt;Ewald Hofman, a program manager for work item tracking, has posted code for a tool to allow you to &lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/05/31/how-to-configure-features-for-dozens-of-team-projects.aspx"&gt;automate upgrading many team projects&lt;/a&gt;.&amp;nbsp; For those of you with lots of team projects, that&amp;rsquo;s really useful.&amp;nbsp; If you want to know more details on how the project upgrade process works, you&amp;rsquo;ll want to read his &lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/05/31/deep-dive-on-configure-features.aspx"&gt;deep dive&lt;/a&gt; on it.&amp;nbsp; It&amp;rsquo;s called configuring features, but it is team project process upgrade.&lt;/p&gt;
&lt;p&gt;What we&amp;rsquo;ve provided in 2012 is not going to solve the problem of upgrading significantly customized or custom-built processes, but it should go a long ways toward helping so many folks who don&amp;rsquo;t make significant changes to the process template.&lt;/p&gt;
&lt;p&gt;Though not directly related to upgrading your team projects, you can get an overview of what all has changed VS and TFS 2012 on the &lt;a href="http://msdn.microsoft.com/en-us/library/bb386063(v=vs.110)"&gt;What&amp;rsquo;s New in Visual Studio 2012 RC&lt;/a&gt; page.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Follow me on &lt;a href="http://twitter.com/tfsbuck"&gt;twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10313660" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>TFS 11: API for teams and understanding burn down charts</title><link>http://blogs.msdn.com/b/buckh/archive/2012/05/23/tfs-11-api-for-teams-and-understanding-burn-down-charts.aspx</link><pubDate>Thu, 24 May 2012 03:35:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10309720</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10309720</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/05/23/tfs-11-api-for-teams-and-understanding-burn-down-charts.aspx#comments</comments><description>&lt;p&gt;Ivan Popek has been spending a lot of time lately digging into TFS 11.&amp;#160; He has written a series of posts on the APIs for teams in TFS 11, and he explains the burn down chart trend lines.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/tfs11-api-query-teams-and-team-members/"&gt;TFS11 API: Query Teams and Team Members&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/tfs11-api-reading-the-team-configuration-iterations-and-areas/"&gt;TFS11 API: Reading the Team Configuration – Iterations and Areas&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/tfs11-api-managing-the-team-iteration-schedule/"&gt;TFS11 API: Managing the Team Iteration Schedule&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/tfs11-api-managing-team-administrators/"&gt;TFS11 API: Managing Team Administrators&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/tfs11-api-customizing-the-process-configuration/"&gt;TFS11 API: Customizing the Process Configuration&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/understanding-how-the-team-webaccess-burndown-chart-works-part-1/"&gt;Understanding how the Team WebAccess burndown chart works, Part 1&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/understanding-how-the-team-webaccess-burndown-chart-works-part-2/"&gt;Understanding how the Team WebAccess burndown chart works, Part 2&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h4&gt;&lt;a href="http://blog.johnsworkshop.net/understanding-how-the-team-webaccess-burndown-chart-works-part-3/"&gt;Understanding how the Team WebAccess burndown chart works, Part 3&lt;/a&gt;&lt;/h4&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Follow me on Twitter at &lt;/em&gt;&lt;a href="http://twitter.com/tfsbuck"&gt;&lt;em&gt;twitter.com/tfsbuck&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10309720" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+API/">TFS API</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>Perf counters in TFS 11</title><link>http://blogs.msdn.com/b/buckh/archive/2012/05/22/perf-counters-in-tfs-11.aspx</link><pubDate>Tue, 22 May 2012 12:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10308843</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10308843</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/05/22/perf-counters-in-tfs-11.aspx#comments</comments><description>&lt;p&gt;Jim Szubryt has written a &lt;a href="http://blog.jimszubryt.com/2012/05/21/new-perfmon-counters-with-tfs-11-beta/"&gt;post&lt;/a&gt; listing the perf counters available in all versions of TFS and calls out the new ones in TFS 11.&amp;nbsp; Check it out if you are looking at the performance of your server.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.jimszubryt.com/2012/05/21/new-perfmon-counters-with-tfs-11-beta/"&gt;New Perfmon Counters With TFS 11 Beta&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Whether you are a small company running TFS or a large Enterprise there may come a time for you too where performance of your TFS system may come into question and you will need to determine what to look at when &amp;ldquo;TFS seems to be running slow&amp;rdquo;. You should proactively be establishing a baseline of performance for your environment and Perfmon counters can help. Having this baseline will be &lt;strong&gt;extremely important&lt;/strong&gt; in understanding the differences between what has changed from when the application was running properly and the state when it is not. I can attest to this from experiences I have had with when load testing a financial system a few years ago before it went live. We started capturing Perfmon counters prior to processing transactions and then ramped up the users/transactions created. We were able to identify and address memory and SAN issues before the system went live. Much better than doing this in a production environment and affecting real users.&lt;/p&gt;
&lt;p&gt;With the upcoming release of TFS there will be additional counters to assist in identifying what may be affecting TFS. My intention with this post is to raise your awareness of what options you have and not to guide you through determining which value is indicating a performance issue. That task is left to you to measure against what they were when the system was running smoothly and what they are when it is not. If you need some help in setting up counter collection you can take a look at Grant Holliday&amp;rsquo;s &lt;a href="http://blogs.msdn.com/b/granth/archive/2008/11/07/querying-perfmon-data-from-sql.aspx"&gt;post &lt;/a&gt;on Querying Perfmon data from SQL. He has another good &lt;a href="http://blogs.msdn.com/b/granth/archive/2009/05/21/large-team-foundation-server-performance-characteristics.aspx"&gt;post &lt;/a&gt;on Large TFS Performance characteristics. They are a couple years old however, they are still very relevant.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.jimszubryt.com/2012/05/21/new-perfmon-counters-with-tfs-11-beta/"&gt;more&amp;hellip;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Follow me at &lt;a href="http://twitter.com/tfsbuck"&gt;twitter.com/tfsbuck&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10308843" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>TFS 11 Beta upgrade: Existing workflows that have custom workflow activities using the TFS client OM</title><link>http://blogs.msdn.com/b/buckh/archive/2012/03/19/tfs-11-beta-upgrade-existing-workflows-that-have-custom-workflow-activities-using-the-tfs-client-om.aspx</link><pubDate>Mon, 19 Mar 2012 19:59:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10285109</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10285109</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/03/19/tfs-11-beta-upgrade-existing-workflows-that-have-custom-workflow-activities-using-the-tfs-client-om.aspx#comments</comments><description>&lt;p align="left"&gt;&lt;a href="http://blogs.msdn.com/b/duat_le/"&gt;Duat&lt;/a&gt;, a developer on Team Foundation Build, has written a blog post on how to resolve post-upgrade issues with your build workflow if your 2010 build workflow uses custom workflow activities that use the TFS client object model.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/duat_le/archive/2012/03/16/your-custom-assemblies-need-update-or-else-redirecting.aspx"&gt;Your custom assemblies need update, or else, redirecting&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Loading your custom assemblies in the TFS 11 build service process triggers loading TFS 2010 assemblies, and the Workflow Foundation (WF) services are not happy about that. Why?&lt;/p&gt;    &lt;p&gt;The build process template, for a &lt;a href="http://blogs.msdn.com/b/duat_le/archive/2011/05/29/view-build-default-template-on-an-sxs-setup.aspx"&gt;particular reason&lt;/a&gt;, references the TFS OM assemblies by their simple names. When there are more than one version of the same assembly present in the process, the WF services, while loading and validating the build workflow, attempts to resolve the simple-name references with best effort, and in this case it decides to fail with a namespace ambiguity error.&lt;/p&gt;    &lt;p&gt;Here’s what you likely see when this issue occurs:&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;strong&gt;TF215097:&lt;/strong&gt; An error occurred while initializing a build for build definition \TFS\Build MAIN: The root element of the build process template found at $/TFS/BuildProcessTemplates/MainDefaultTemplate.xaml (version C182) is not valid. (The build process failed validation. Details: Validation Error: Compiler error(s) encountered processing expression &amp;quot;New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()&amp;quot;.'BuildSettings' is ambiguous in the namespace 'Microsoft.TeamFoundation.Build.Workflow.Activities'.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/duat_le/archive/2012/03/16/your-custom-assemblies-need-update-or-else-redirecting.aspx"&gt;more…&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10285109" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Build/">Team Build</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>Running only impacted tests in TFS 2010 Build</title><link>http://blogs.msdn.com/b/buckh/archive/2012/03/12/running-only-impacted-tests-in-tfs-2010-build.aspx</link><pubDate>Mon, 12 Mar 2012 13:06:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10281338</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10281338</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/03/12/running-only-impacted-tests-in-tfs-2010-build.aspx#comments</comments><description>&lt;p&gt;Richard Hundhausen pointed out this blog post recently, and I thought I’d mention it here.&amp;#160; Rob Maher walks through the process of setting up a build definition to run only the tests that involve the code that was changed.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;a href="http://scrumdod.blogspot.com/2011/03/tfs-2010-build-only-run-impacted-tests.html"&gt;TFS 2010 Build - Only run impacted tests&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;If your tests take a long time to run, you may wish to only run the tests that have been impacted by code changes checked in with the build (and of course run a full nightly build that executes all tests :) Unfortunately there is no out of the box feature to do this, so we need to edit our build xaml to do it. &lt;/p&gt;    &lt;p&gt;&lt;a href="http://scrumdod.blogspot.com/2011/03/tfs-2010-build-only-run-impacted-tests.html"&gt;more…&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10281338" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Build/">Team Build</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>Team Foundation Version Control client API example for TFS 2010 and newer</title><link>http://blogs.msdn.com/b/buckh/archive/2012/03/10/team-foundation-version-control-client-api-example-for-tfs-2010-and-newer.aspx</link><pubDate>Sat, 10 Mar 2012 16:12:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10280838</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10280838</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/03/10/team-foundation-version-control-client-api-example-for-tfs-2010-and-newer.aspx#comments</comments><description>&lt;p&gt;&lt;em&gt;Over six years ago, I posted a &lt;/em&gt;&lt;a href="http://blogs.msdn.com/b/buckh/archive/2005/09/09/463287.aspx"&gt;&lt;em&gt;sample&lt;/em&gt;&lt;/a&gt;&lt;em&gt; on how to use the version control API.&amp;#160; The API changed in TFS 2010, but I hadn’t updated the sample.&amp;#160; Here is a version that works with 2010 and newer and is a little less aggressive on clean up in the finally block.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This is a really simple example that uses the version control API.&amp;#160; It shows how to create a workspace, pend changes, check in those changes, and hook up some important event listeners.&amp;#160; This sample doesn't do anything useful, but it should get you going.&lt;/p&gt;  &lt;p&gt;You have to supply a Team Project as an argument.&lt;/p&gt;  &lt;p&gt;The only real difference in this version is that it uses the TeamFoundationServer constructor (in beta 3, you were forced to use the factory class).&lt;/p&gt;  &lt;p&gt;You'll need to add references to the following TFS assemblies to compile this example.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Microsoft.TeamFoundation.VersionControl.Client.dll     &lt;br /&gt;Microsoft.TeamFoundation.Client.dll&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;   &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:29c8a3d1-2732-4d8c-9917-3ca0c5d828e7" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px"&gt;Code Snippet&lt;/div&gt; &lt;div style="background: #ddd; max-height: 500px; overflow: auto"&gt; &lt;ol start="1" style="background: #ffffff; margin: 0 0 0 3em; padding: 0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Diagnostics;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.IO;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Text;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.TeamFoundation.Client;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.TeamFoundation.VersionControl.Client;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; BasicSccExample&lt;/li&gt; &lt;li&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af"&gt;Example&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Main(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;[] args)&lt;/li&gt; &lt;li&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#008000"&gt;// Verify that we have the arguments we require. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (args.Length &amp;lt; 2)&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;String&lt;/span&gt; appName = &lt;span style="color:#2b91af"&gt;Path&lt;/span&gt;.GetFileName(&lt;span style="color:#2b91af"&gt;Process&lt;/span&gt;.GetCurrentProcess().MainModule.FileName);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.Error.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Usage: {0} collectionURL teamProjectPath&amp;quot;&lt;/span&gt;, appName);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.Error.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Example: {0} http://tfsserver:8080/tfs/DefaultCollection $/MyProject&amp;quot;&lt;/span&gt;, appName);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Environment&lt;/span&gt;.Exit(1);&lt;/li&gt; &lt;li&gt;            }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#008000"&gt;// Get a reference to our Team Foundation Server. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af"&gt;TfsTeamProjectCollection&lt;/span&gt; tpc = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;TfsTeamProjectCollection&lt;/span&gt;(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;Uri&lt;/span&gt;(args[0]));&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#008000"&gt;// Get a reference to Version Control. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af"&gt;VersionControlServer&lt;/span&gt; versionControl = tpc.GetService&amp;lt;&lt;span style="color:#2b91af"&gt;VersionControlServer&lt;/span&gt;&amp;gt;(); &lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#008000"&gt;// Listen for the Source Control events. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;            versionControl.NonFatalError += &lt;span style="color:#2b91af"&gt;Example&lt;/span&gt;.OnNonFatalError;&lt;/li&gt; &lt;li&gt;            versionControl.Getting += &lt;span style="color:#2b91af"&gt;Example&lt;/span&gt;.OnGetting;&lt;/li&gt; &lt;li&gt;            versionControl.BeforeCheckinPendingChange += &lt;span style="color:#2b91af"&gt;Example&lt;/span&gt;.OnBeforeCheckinPendingChange;&lt;/li&gt; &lt;li&gt;            versionControl.NewPendingChange += &lt;span style="color:#2b91af"&gt;Example&lt;/span&gt;.OnNewPendingChange;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#008000"&gt;// Create a workspace. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af"&gt;Workspace&lt;/span&gt; workspace = versionControl.CreateWorkspace(&lt;span style="color:#a31515"&gt;&amp;quot;BasicSccExample&amp;quot;&lt;/span&gt;, versionControl.AuthorizedUser);&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af"&gt;String&lt;/span&gt; topDir = &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;try&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;String&lt;/span&gt; localDir = &lt;span style="color:#a31515"&gt;@&amp;quot;c:&amp;#92;temp&amp;#92;BasicSccExample&amp;quot;&lt;/span&gt;;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Create a mapping: {0} -&amp;gt; {1}&amp;quot;&lt;/span&gt;, args[1], localDir); &lt;/li&gt; &lt;li&gt;                workspace.Map(args[1], localDir);&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Get the files from the repository.&amp;#92;r&amp;#92;n&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                workspace.Get();&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Create a file.&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                topDir = &lt;span style="color:#2b91af"&gt;Path&lt;/span&gt;.Combine(workspace.Folders[0].LocalItem, &lt;span style="color:#a31515"&gt;&amp;quot;sub&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Directory&lt;/span&gt;.CreateDirectory(topDir);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;String&lt;/span&gt; fileName = &lt;span style="color:#2b91af"&gt;Path&lt;/span&gt;.Combine(topDir, &lt;span style="color:#a31515"&gt;&amp;quot;basic.cs&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt; sw = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(fileName))&lt;/li&gt; &lt;li&gt;                {&lt;/li&gt; &lt;li&gt;                    sw.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;revision 1 of basic.cs&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Now add everything.&amp;#92;r&amp;#92;n&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                workspace.PendAdd(topDir, &lt;span style="color:#0000ff"&gt;true&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Show our pending changes.&amp;#92;r&amp;#92;n&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;PendingChange&lt;/span&gt;[] pendingChanges = workspace.GetPendingChanges();&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Your current pending changes:&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color:#2b91af"&gt;PendingChange&lt;/span&gt; pendingChange &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; pendingChanges)&lt;/li&gt; &lt;li&gt;                {&lt;/li&gt; &lt;li&gt;                    &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;    path: &amp;quot;&lt;/span&gt; + pendingChange.LocalItem +&lt;/li&gt; &lt;li&gt;                                      &lt;span style="color:#a31515"&gt;&amp;quot;, change: &amp;quot;&lt;/span&gt; + &lt;span style="color:#2b91af"&gt;PendingChange&lt;/span&gt;.GetLocalizedStringForChangeType(pendingChange.ChangeType));&lt;/li&gt; &lt;li&gt;                }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Checkin the items we added.&amp;#92;r&amp;#92;n&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;int&lt;/span&gt; changesetNumber = workspace.CheckIn(pendingChanges, &lt;span style="color:#a31515"&gt;&amp;quot;Sample changes&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Checked in changeset &amp;quot;&lt;/span&gt; + changesetNumber);&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Checkout and modify the file.&amp;#92;r&amp;#92;n&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                workspace.PendEdit(fileName);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt; sw = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(fileName))&lt;/li&gt; &lt;li&gt;                {&lt;/li&gt; &lt;li&gt;                    sw.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;revision 2 of basic.cs&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Get the pending change and check in the new revision.&amp;#92;r&amp;#92;n&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                pendingChanges = workspace.GetPendingChanges();&lt;/li&gt; &lt;li&gt;                changesetNumber = workspace.CheckIn(pendingChanges, &lt;span style="color:#a31515"&gt;&amp;quot;Modified basic.cs&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Checked in changeset &amp;quot;&lt;/span&gt; + changesetNumber);&lt;/li&gt; &lt;li&gt;            }&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;finally&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (topDir != &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;)&lt;/li&gt; &lt;li&gt;                {&lt;/li&gt; &lt;li&gt;                    &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Delete all of the items under the test project.&amp;#92;r&amp;#92;n&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                    workspace.PendDelete(topDir, &lt;span style="color:#2b91af"&gt;RecursionType&lt;/span&gt;.Full);&lt;/li&gt; &lt;li&gt;                    &lt;span style="color:#2b91af"&gt;PendingChange&lt;/span&gt;[] pendingChanges = workspace.GetPendingChanges();&lt;/li&gt; &lt;li&gt;                    &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (pendingChanges.Length &amp;gt; 0)&lt;/li&gt; &lt;li&gt;                    {&lt;/li&gt; &lt;li&gt;                        workspace.CheckIn(pendingChanges, &lt;span style="color:#a31515"&gt;&amp;quot;Clean up!&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                    }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                    &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;&amp;#92;r&amp;#92;n--- Delete the workspace.&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;                    workspace.Delete();&lt;/li&gt; &lt;li&gt;                }&lt;/li&gt; &lt;li&gt;            }&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;internal&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; OnNonFatalError(&lt;span style="color:#2b91af"&gt;Object&lt;/span&gt; sender, &lt;span style="color:#2b91af"&gt;ExceptionEventArgs&lt;/span&gt; e)&lt;/li&gt; &lt;li&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (e.Exception != &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;)&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.Error.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Non-fatal exception: &amp;quot;&lt;/span&gt; + e.Exception.Message);&lt;/li&gt; &lt;li&gt;            }&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;else&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.Error.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Non-fatal failure: &amp;quot;&lt;/span&gt; + e.Failure.Message);&lt;/li&gt; &lt;li&gt;            }&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;internal&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; OnGetting(&lt;span style="color:#2b91af"&gt;Object&lt;/span&gt; sender, &lt;span style="color:#2b91af"&gt;GettingEventArgs&lt;/span&gt; e)&lt;/li&gt; &lt;li&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Getting: &amp;quot;&lt;/span&gt; + e.TargetLocalItem + &lt;span style="color:#a31515"&gt;&amp;quot;, status: &amp;quot;&lt;/span&gt; + e.Status);&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;internal&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; OnBeforeCheckinPendingChange(&lt;span style="color:#2b91af"&gt;Object&lt;/span&gt; sender, &lt;span style="color:#2b91af"&gt;ProcessingChangeEventArgs&lt;/span&gt; e)&lt;/li&gt; &lt;li&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Checking in &amp;quot;&lt;/span&gt; + e.PendingChange.LocalItem);&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;internal&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; OnNewPendingChange(&lt;span style="color:#2b91af"&gt;Object&lt;/span&gt; sender, &lt;span style="color:#2b91af"&gt;PendingChangeEventArgs&lt;/span&gt; e)&lt;/li&gt; &lt;li&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;  Pending &amp;quot;&lt;/span&gt; + &lt;span style="color:#2b91af"&gt;PendingChange&lt;/span&gt;.GetLocalizedStringForChangeType(e.PendingChange.ChangeType) +&lt;/li&gt; &lt;li&gt;                              &lt;span style="color:#a31515"&gt;&amp;quot; on &amp;quot;&lt;/span&gt; + e.PendingChange.LocalItem);&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10280838" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Source+Control/">Source Control</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+API/">TFS API</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>Updating a team project to use new features after upgrading to TFS 11 Beta</title><link>http://blogs.msdn.com/b/buckh/archive/2012/03/05/updating-a-team-project-to-use-new-features-after-upgrading-to-tfs-11-beta.aspx</link><pubDate>Tue, 06 Mar 2012 03:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10278161</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10278161</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/03/05/updating-a-team-project-to-use-new-features-after-upgrading-to-tfs-11-beta.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;[UPDATE 3/12/12]&lt;/strong&gt; Aaron pointed out Ewald's recent detailed blog post that walks through adding optional metadata beyond the MSDN article: &lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/06/get-your-agile-project-fixed-after-an-upgrade-from-tfs2010-to-tfs11-beta.aspx"&gt;http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/06/get-your-agile-project-fixed-after-an-upgrade-from-tfs2010-to-tfs11-beta.aspx.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads"&gt;Team Foundation Server 11 Beta&lt;/a&gt; can be used to upgrade your existing TFS 2010 or 2008 server and used in production.&amp;nbsp; We&amp;rsquo;ll be supporting upgrade from TFS 11 Beta to RC (you&amp;rsquo;ll very likely need to go from Beta to RC to RTM in order to follow the supported path).&amp;nbsp; As Jason said in his &lt;a href="http://blogs.msdn.com/b/jasonz/archive/2012/02/29/welcome-to-the-beta-of-visual-studio-11-and-net-framework-4-5.aspx"&gt;beta blog post&lt;/a&gt;, TFS 11 beta is &amp;ldquo;go-live,&amp;rdquo; which means you can use it in production and receive support (&lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads/go-live"&gt;details&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Once you upgrade your server, you&amp;rsquo;ll want to enable new features that require things like new work item types.&amp;nbsp; We are working on changes that will hopefully make it easier for RC.&amp;nbsp; Here&amp;rsquo;s the documentation you&amp;rsquo;ll need to make the necessary changes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;h3&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff432837(v=vs.110).aspx"&gt;&lt;span style="font-weight: bold;"&gt;Updating an Upgraded Team Project to Access New Features&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;After you upgrade to Visual Studio 11 Team Foundation Server Beta, you can still access the data from team projects that you created in the previous release. By downloading a localized zip file, extracting the files, and running the provided batch file of commands, you can update your team project to use the following new tools for managing the application lifecycle:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee518933(v=vs.110).aspx"&gt;Product Backlog&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/ee191595(v=vs.110).aspx"&gt;Sprint Backlog and Team Capacity&lt;/a&gt;, and &lt;a href="http://msdn.microsoft.com/en-us/library/ee191590(v=vs.110).aspx"&gt;Task Board and Burndown Charts&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh301769(v=vs.110).aspx"&gt;Manage stakeholder feedback&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh543900(v=vs.110).aspx"&gt;My Work&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/2fc2a1ff-70a2-4b4e-8dff-73238628f956.htm#code-review-request"&gt;Conduct code reviews&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hide specific types of work items so they don't appear in the drop-down menus that are used to create work items.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff432837(v=vs.110).aspx"&gt;read more&amp;hellip;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10278161" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>Permission error with creating a team project from VS 2010 on TFS 11 Beta</title><link>http://blogs.msdn.com/b/buckh/archive/2012/03/05/permission-error-with-creating-a-team-project-from-vs-2010-on-tfs-11-beta.aspx</link><pubDate>Mon, 05 Mar 2012 16:20:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10277747</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10277747</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/03/05/permission-error-with-creating-a-team-project-from-vs-2010-on-tfs-11-beta.aspx#comments</comments><description>&lt;p&gt;You must use the Visual Studio Team Explorer 11 Beta to create a team project on a TFS 11 Beta server.&amp;#160; If you use VS 2010, you will get an error about not having permission.&amp;#160; The error message is very misleading, because it’s not a problem with your permissions.&lt;/p&gt;  &lt;p&gt;---------------------------   &lt;br /&gt;Microsoft Visual Studio    &lt;br /&gt;---------------------------    &lt;br /&gt;TF30172: You do not have permission to create a new team project.    &lt;br /&gt;---------------------------    &lt;br /&gt;OK&amp;#160;&amp;#160; Help&amp;#160;&amp;#160; &lt;br /&gt;---------------------------    &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10277747" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/VS11/">VS11</category></item><item><title>Listing the work items associated with changesets for a path</title><link>http://blogs.msdn.com/b/buckh/archive/2012/02/01/listing-the-work-items-associated-with-changesets-for-a-path.aspx</link><pubDate>Wed, 01 Feb 2012 14:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10262738</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10262738</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/02/01/listing-the-work-items-associated-with-changesets-for-a-path.aspx#comments</comments><description>&lt;p&gt;Philip wrote a simple app to list the work items associated with the changesets for a given path, and it&amp;rsquo;s in some ways an enhanced update of &lt;a href="http://blogs.msdn.com/b/narend/archive/2006/08/08/691625.aspx"&gt;Naren&amp;rsquo;s post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Given an URL to a collection and a server path (e.g., $/myproject/coolthing), it will list the work items that are associated with the most recent 25 checkins.&amp;nbsp; This sample shows how to use the linking service to convert the work item artifact URIs that are stored with the changesets to get the core work item fields (ID, assigned to, state, type, and title).&lt;/p&gt;
&lt;p&gt;It will produce output like the following.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Id: 352694 Title: Improve performance of queuing servicing jobs on Azure.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You will need to reference the following DLLs to build this, all of which are found on the .NET tab of the Add Reference dialog in Visual Studio 2010.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Microsoft.TeamFoundation.Client.dll&lt;/li&gt;
&lt;li&gt;Microsoft.TeamFoundation.Common.dll&lt;/li&gt;
&lt;li&gt;Microsoft.TeamFoundation.VersionControl.Client.dll&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System; 
&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Collections.Generic; 
&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Diagnostics; 
&lt;span style="color: blue;"&gt;using&lt;/span&gt; Microsoft.TeamFoundation; 
&lt;span style="color: blue;"&gt;using&lt;/span&gt; Microsoft.TeamFoundation.Client; 
&lt;span style="color: blue;"&gt;using&lt;/span&gt; Microsoft.TeamFoundation.VersionControl.Client; 

&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; ListWorkItems 
{ 
    &lt;span style="color: blue;"&gt;class&lt;/span&gt; Program 
    { 
        &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main(&lt;span style="color: blue;"&gt;string&lt;/span&gt;[] args) 
        { 
            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (args.Length &amp;lt; &lt;span style="color: maroon;"&gt;2&lt;/span&gt;)
            { 
                Console.WriteLine(&lt;span style="color: maroon;"&gt;"Usage: listworkitems &amp;lt;URL for TFS&amp;gt; &amp;lt;server path&amp;gt;"&lt;/span&gt;); 
                Environment.Exit(&lt;span style="color: maroon;"&gt;1&lt;/span&gt;); 
            } 

            TfsTeamProjectCollection tpc = &lt;span style="color: blue;"&gt;new&lt;/span&gt; TfsTeamProjectCollection(&lt;span style="color: blue;"&gt;new&lt;/span&gt; Uri(args[&lt;span style="color: maroon;"&gt;0&lt;/span&gt;]));
            VersionControlServer vcs = tpc.GetService&amp;lt;VersionControlServer&amp;gt;(); 

            &lt;span style="color: green;"&gt;// Get the changeset artifact URIs for each changeset in the history query&lt;/span&gt;
            List&amp;lt;String&amp;gt; changesetArtifactUris = &lt;span style="color: blue;"&gt;new&lt;/span&gt; List&amp;lt;String&amp;gt;(); 

            &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (Object obj &lt;span style="color: blue;"&gt;in&lt;/span&gt; vcs.QueryHistory(args[&lt;span style="color: maroon;"&gt;1&lt;/span&gt;],                       &lt;span style="color: green;"&gt;// path we care about ($/project/whatever)&lt;/span&gt; 
                                                    VersionSpec.Latest,            &lt;span style="color: green;"&gt;// version of that path&lt;/span&gt;
                                                    &lt;span style="color: maroon;"&gt;0&lt;/span&gt;,                             &lt;span style="color: green;"&gt;// deletion ID (0 = not deleted)&lt;/span&gt; 
                                                    RecursionType.Full,            &lt;span style="color: green;"&gt;// entire tree - full recursion&lt;/span&gt;
                                                    &lt;span style="color: blue;"&gt;null&lt;/span&gt;,                          &lt;span style="color: green;"&gt;// include changesets from all users&lt;/span&gt;
                                                    &lt;span style="color: blue;"&gt;new&lt;/span&gt; ChangesetVersionSpec(&lt;span style="color: maroon;"&gt;1&lt;/span&gt;),   &lt;span style="color: green;"&gt;// start at the beginning of time&lt;/span&gt;
                                                    VersionSpec.Latest,            &lt;span style="color: green;"&gt;// end at latest&lt;/span&gt;
                                                    &lt;span style="color: maroon;"&gt;25&lt;/span&gt;,                            &lt;span style="color: green;"&gt;// only return this many&lt;/span&gt;
                                                    &lt;span style="color: maroon;"&gt;false&lt;/span&gt;,                         &lt;span style="color: green;"&gt;// we don't want the files changed&lt;/span&gt;
                                                    &lt;span style="color: maroon;"&gt;true&lt;/span&gt;))                         &lt;span style="color: green;"&gt;// do history on the path&lt;/span&gt;
            { 
                Changeset c = obj &lt;span style="color: blue;"&gt;as&lt;/span&gt; Changeset; 
                changesetArtifactUris.Add(c.ArtifactUri.AbsoluteUri); 
            } 

            &lt;span style="color: green;"&gt;// We'll use the linking service to get information about the associated work items&lt;/span&gt;
            ILinking linkingService = tpc.GetService&amp;lt;ILinking&amp;gt;(); 
            LinkFilter linkFilter = &lt;span style="color: blue;"&gt;new&lt;/span&gt; LinkFilter(); 
            linkFilter.FilterType = FilterType.ToolType; 
            linkFilter.FilterValues = &lt;span style="color: blue;"&gt;new&lt;/span&gt; String[&lt;span style="color: maroon;"&gt;1&lt;/span&gt;] { ToolNames.WorkItemTracking };  &lt;span style="color: green;"&gt;// we only want work itms&lt;/span&gt;

            &lt;span style="color: green;"&gt;// Convert the artifact URIs for the work items into strongly-typed objects holding the properties rather than name/value pairs&lt;/span&gt; 
            Artifact[] artifacts = linkingService.GetReferencingArtifacts(changesetArtifactUris.ToArray(), &lt;span style="color: blue;"&gt;new&lt;/span&gt; LinkFilter[&lt;span style="color: maroon;"&gt;1&lt;/span&gt;] { linkFilter });
            AssociatedWorkItemInfo[] workItemInfos = AssociatedWorkItemInfo.FromArtifacts(artifacts);

            &lt;span style="color: green;"&gt;// Here we'll just print the IDs and titles of the work items&lt;/span&gt;
            &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (AssociatedWorkItemInfo workItemInfo &lt;span style="color: blue;"&gt;in&lt;/span&gt; workItemInfos)
            { 
                Console.WriteLine(&lt;span style="color: maroon;"&gt;"Id: "&lt;/span&gt; + workItemInfo.Id + &lt;span style="color: maroon;"&gt;" Title: "&lt;/span&gt; + workItemInfo.Title); 
            } 
        } 
    } 

    &lt;span style="color: blue;"&gt;internal&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; AssociatedWorkItemInfo
    { 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; AssociatedWorkItemInfo() 
        { 
        } 

        &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;int&lt;/span&gt; Id 
        { 
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; 
            { 
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; m_id; 
            } 
        } 

        &lt;span style="color: blue;"&gt;public&lt;/span&gt; String Title 
        { 
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; 
            { 
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; m_title; 
            } 
        } 

        &lt;span style="color: blue;"&gt;public&lt;/span&gt; String AssignedTo 
        { 
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; 
            { 
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; m_assignedTo; 
            } 
        } 

        &lt;span style="color: blue;"&gt;public&lt;/span&gt; String WorkItemType 
        { 
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; 
            { 
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; m_type; 
            } 
        } 

        &lt;span style="color: blue;"&gt;public&lt;/span&gt; String State 
        { 
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; 
            { 
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; m_state; 
            } 
        } 

        &lt;span style="color: blue;"&gt;internal&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; AssociatedWorkItemInfo[] FromArtifacts(IEnumerable&amp;lt;Artifact&amp;gt; artifacts)
        { 
            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: blue;"&gt;null&lt;/span&gt; == artifacts)
            { 
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; AssociatedWorkItemInfo[&lt;span style="color: maroon;"&gt;0&lt;/span&gt;];
            } 

            List&amp;lt;AssociatedWorkItemInfo&amp;gt; toReturn = &lt;span style="color: blue;"&gt;new&lt;/span&gt; List&amp;lt;AssociatedWorkItemInfo&amp;gt;(); 

            &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (Artifact artifact &lt;span style="color: blue;"&gt;in&lt;/span&gt; artifacts)
            { 
                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (artifact == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)
                { 
                    &lt;span style="color: blue;"&gt;continue&lt;/span&gt;; 
                } 

                AssociatedWorkItemInfo awii = &lt;span style="color: blue;"&gt;new&lt;/span&gt; AssociatedWorkItemInfo();

                &lt;span style="color: green;"&gt;// Convert the name/value pairs into strongly-typed objects containing the work item info&lt;/span&gt; 
                &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (ExtendedAttribute ea &lt;span style="color: blue;"&gt;in&lt;/span&gt; artifact.ExtendedAttributes)
                { 
                    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (String.Equals(ea.Name, &lt;span style="color: maroon;"&gt;"System.Id"&lt;/span&gt;, StringComparison.OrdinalIgnoreCase)) 
                    { 
                        &lt;span style="color: blue;"&gt;int&lt;/span&gt; workItemId; 

                        &lt;span style="color: blue;"&gt;if&lt;/span&gt; (Int32.TryParse(ea.Value, &lt;span style="color: blue;"&gt;out&lt;/span&gt; workItemId))
                        { 
                            awii.m_id = workItemId; 
                        } 
                    } 
                    &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (String.Equals(ea.Name, &lt;span style="color: maroon;"&gt;"System.Title"&lt;/span&gt;, StringComparison.OrdinalIgnoreCase)) 
                    { 
                        awii.m_title = ea.Value; 
                    } 
                    &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (String.Equals(ea.Name, &lt;span style="color: maroon;"&gt;"System.AssignedTo"&lt;/span&gt;, StringComparison.OrdinalIgnoreCase)) 
                    { 
                        awii.m_assignedTo = ea.Value; 
                    } 
                    &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (String.Equals(ea.Name, &lt;span style="color: maroon;"&gt;"System.State"&lt;/span&gt;, StringComparison.OrdinalIgnoreCase)) 
                    { 
                        awii.m_state = ea.Value; 
                    } 
                    &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (String.Equals(ea.Name, &lt;span style="color: maroon;"&gt;"System.WorkItemType"&lt;/span&gt;, StringComparison.OrdinalIgnoreCase)) 
                    { 
                        awii.m_type = ea.Value; 
                    } 
                } 

                Debug.Assert(&lt;span style="color: maroon;"&gt;0&lt;/span&gt; != awii.m_id, &lt;span style="color: maroon;"&gt;"Unable to decode artifact into AssociatedWorkItemInfo object."&lt;/span&gt;); 

                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: maroon;"&gt;0&lt;/span&gt; != awii.m_id)
                { 
                    toReturn.Add(awii); 
                } 
            } 

            &lt;span style="color: blue;"&gt;return&lt;/span&gt; toReturn.ToArray(); 
        } 

        &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;int&lt;/span&gt; m_id; 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; String m_title; 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; String m_assignedTo; 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; String m_type; 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; String m_state; 
    } 
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10262738" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+API/">TFS API</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>How to get the TFS objects used in our own UI integration</title><link>http://blogs.msdn.com/b/buckh/archive/2012/01/25/how-to-get-the-tfs-objects-used-in-our-own-ui-integration.aspx</link><pubDate>Thu, 26 Jan 2012 00:05:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10260691</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10260691</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/01/25/how-to-get-the-tfs-objects-used-in-our-own-ui-integration.aspx#comments</comments><description>&lt;p&gt;Philip, a dev on version control, recently helped with a question on how to get the TFS objects we use in our UI.&amp;#160; I thought I’d post since others may find it useful.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We recently had a request from a customer for a VS add-in that would be able to access the same TfsTeamProjectCollection and VersionControlServer objects that our own UI integration (such as the Team Explorer and Pending Changes toolwindow) are using. In this particular case the customer wanted to hook the BeforeCheckinPendingChange event from the VersionControlServer object and take a specific action when that occurred. But the framework shown in this piece of sample code is generic -- you can use it to get the very same VersionControlServer or WorkItemStore object that our integration is using to connect to TFS.&lt;/p&gt;    &lt;p&gt;The trick here is to hook the ProjectContextChanged event on the TeamFoundationServerExt extensibility object. While that extensibility point won't give you the TfsTeamProjectCollection object directly, we can ask the TfsTeamProjectCollectionFactory's static GetTeamProjectCollection method to retrieve it from a runtime cache. The cache is keyed by URI -- which (handily) is provided by TeamFoundationServerExt. By the time the ProjectContextChanged event fires, the ActiveProjectContext.DomainUri property has already been updated.&lt;/p&gt;    &lt;p&gt;All the services in the TFS client object model are owned by the TfsTeamProjectCollection. Once we have it, we can call GetService to request the VersionControlServer object. There's only one per TfsTeamProjectCollection; the same holds true for WorkItemStore, IBuildServer, or any of the other client object model services you may be familiar with.&lt;/p&gt;    &lt;p&gt;Happy extending!&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Diagnostics;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Windows.Forms;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;Extensibility;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;EnvDTE;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;EnvDTE80;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.TeamFoundation.Common;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.TeamFoundation.Client;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.TeamFoundation.VersionControl.Common;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.TeamFoundation.VersionControl.Client;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.VisualStudio.TeamFoundation;     &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.VisualStudio.TeamFoundation.VersionControl;     &lt;br /&gt;    &lt;br /&gt;&lt;span style="color: blue"&gt;namespace &lt;/span&gt;MyAddin1     &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The object for implementing an Add-in.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;seealso class='IDTExtensibility2' /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Connect &lt;/span&gt;: IDTExtensibility2     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Implements the constructor for the Add-in object. Place your initialization code within this method.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;Connect()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='application'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Root object of the host application.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='connectMode'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Describes how the Add-in is being loaded.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='addInInst'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Object representing this Add-in.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;seealso class='IDTExtensibility2' /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnConnection(&lt;span style="color: blue"&gt;object &lt;/span&gt;application, ext_ConnectMode connectMode, &lt;span style="color: blue"&gt;object &lt;/span&gt;addInInst, &lt;span style="color: blue"&gt;ref &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Array &lt;/span&gt;custom)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _applicationObject = (DTE2)application;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _addInInstance = (AddIn)addInInst;     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;try      &lt;br /&gt;&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;br /&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; m_tfsExt = _applicationObject.GetObject(&lt;span style="color: #a31515"&gt;&amp;quot;Microsoft.VisualStudio.TeamFoundation.TeamFoundationServerExt&amp;quot;&lt;/span&gt;) &lt;span style="color: blue"&gt;as &lt;/span&gt;TeamFoundationServerExt;     &lt;br /&gt;    &lt;br /&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 style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;!= m_tfsExt)     &lt;br /&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;br /&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;#160;&amp;#160;&amp;#160;&amp;#160; m_tfsExt.ProjectContextChanged += &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EventHandler&lt;/span&gt;(m_tfsExt_ProjectContextChanged);     &lt;br /&gt;    &lt;br /&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;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;!= m_tfsExt.ActiveProjectContext)     &lt;br /&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;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: green"&gt;// Run the event handler without the event actually having fired, so we pick up the initial state.      &lt;br /&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;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;m_tfsExt_ProjectContextChanged(&lt;span style="color: blue"&gt;null&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;EventArgs&lt;/span&gt;.Empty);     &lt;br /&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;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&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;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;catch &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Exception &lt;/span&gt;ex)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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; MessageBox.Show(ex.Message);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Implements the OnDisconnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being unloaded.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='disconnectMode'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Describes how the Add-in is being unloaded.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='custom'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Array of parameters that are host application specific.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;seealso class='IDTExtensibility2' /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnDisconnection(ext_DisconnectMode disconnectMode, &lt;span style="color: blue"&gt;ref &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Array &lt;/span&gt;custom)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: green"&gt;// Unhook the ProjectContextChanged event handler.      &lt;br /&gt;&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;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;!= m_tfsExt)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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; m_tfsExt.ProjectContextChanged -= &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EventHandler&lt;/span&gt;(m_tfsExt_ProjectContextChanged);     &lt;br /&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; m_tfsExt = &lt;span style="color: blue"&gt;null&lt;/span&gt;;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Implements the OnAddInsUpdate method of the IDTExtensibility2 interface. Receives notification when the collection of Add-ins has changed.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='custom'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Array of parameters that are host application specific.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;seealso class='IDTExtensibility2' /&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnAddInsUpdate(&lt;span style="color: blue"&gt;ref &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Array &lt;/span&gt;custom)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Implements the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='custom'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Array of parameters that are host application specific.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;seealso class='IDTExtensibility2' /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnStartupComplete(&lt;span style="color: blue"&gt;ref &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Array &lt;/span&gt;custom)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Implements the OnBeginShutdown method of the IDTExtensibility2 interface. Receives notification that the host application is being unloaded.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param term='custom'&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Array of parameters that are host application specific.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;seealso class='IDTExtensibility2' /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnBeginShutdown(&lt;span style="color: blue"&gt;ref &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Array &lt;/span&gt;custom)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;/// &amp;lt;summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &lt;/span&gt;&lt;span style="color: green"&gt;Raised by the TFS Visual Studio integration package when the active project context changes.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;sender&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;e&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;m_tfsExt_ProjectContextChanged(&lt;span style="color: #2b91af"&gt;Object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;try      &lt;br /&gt;&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;br /&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 style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;!= m_tfsExt.ActiveProjectContext &amp;amp;&amp;amp;     &lt;br /&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;#160;&amp;#160;&amp;#160;&amp;#160; !&lt;span style="color: #2b91af"&gt;String&lt;/span&gt;.IsNullOrEmpty(m_tfsExt.ActiveProjectContext.DomainUri))     &lt;br /&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;br /&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;#160;&amp;#160;&amp;#160;&amp;#160; SwitchToTfs(TfsTeamProjectCollectionFactory.GetTeamProjectCollection(&lt;span style="color: blue"&gt;new &lt;/span&gt;Uri(m_tfsExt.ActiveProjectContext.DomainUri)));     &lt;br /&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;br /&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 style="color: blue"&gt;else      &lt;br /&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;br /&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;#160;&amp;#160;&amp;#160;&amp;#160; SwitchToTfs(&lt;span style="color: blue"&gt;null&lt;/span&gt;);     &lt;br /&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;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;catch &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Exception &lt;/span&gt;ex)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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; MessageBox.Show(ex.Message);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;private void &lt;/span&gt;SwitchToTfs(TfsTeamProjectCollection tfs)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Object&lt;/span&gt;.ReferenceEquals(m_tfs, tfs))     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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 style="color: green"&gt;// No work to do; could be a team project switch only      &lt;br /&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;span style="color: blue"&gt;return&lt;/span&gt;;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;!= m_tfs)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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; m_tfs.GetService&amp;lt;VersionControlServer&amp;gt;().BeforeCheckinPendingChange -= &lt;span style="color: blue"&gt;new &lt;/span&gt;ProcessingChangeEventHandler(VersionControlServer_BeforeCheckinPendingChange);     &lt;br /&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; m_tfs = &lt;span style="color: blue"&gt;null&lt;/span&gt;;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;!= tfs)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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; m_tfs = tfs;     &lt;br /&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; m_tfs.GetService&amp;lt;VersionControlServer&amp;gt;().BeforeCheckinPendingChange += &lt;span style="color: blue"&gt;new &lt;/span&gt;ProcessingChangeEventHandler(VersionControlServer_BeforeCheckinPendingChange);&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;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;private void &lt;/span&gt;VersionControlServer_BeforeCheckinPendingChange(&lt;span style="color: #2b91af"&gt;Object &lt;/span&gt;sender, ProcessingChangeEventArgs e)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;null &lt;/span&gt;!= e.PendingChange &amp;amp;&amp;amp;     &lt;br /&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 style="color: #2b91af"&gt;String&lt;/span&gt;.IsNullOrEmpty(e.PendingChange.ServerItem))     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&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; MessageBox.Show(&lt;span style="color: #a31515"&gt;&amp;quot;About to check in: &amp;quot; &lt;/span&gt;+ e.PendingChange.ServerItem);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;private &lt;/span&gt;DTE2 _applicationObject;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;private &lt;/span&gt;AddIn _addInInstance;     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;private &lt;/span&gt;TeamFoundationServerExt m_tfsExt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;private &lt;/span&gt;TfsTeamProjectCollection m_tfs;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;}     &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10260691" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+API/">TFS API</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>A tool to find duplicate copies in a build</title><link>http://blogs.msdn.com/b/buckh/archive/2012/01/21/a-tool-to-find-duplicate-copies-in-a-build.aspx</link><pubDate>Sat, 21 Jan 2012 20:25:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10259279</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10259279</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2012/01/21/a-tool-to-find-duplicate-copies-in-a-build.aspx#comments</comments><description>&lt;p&gt;As part of our builds, quite a few projects copy files to the binaries directory or other locations.&amp;#160; These can be anything from image files to test scripts.&amp;#160; To have our builds complete more quickly, we use the multi-process option (&lt;a href="http://msdn.microsoft.com/en-us/library/ms164311.aspx"&gt;/maxcpucount&lt;/a&gt;) of msbuild to &lt;a href="http://msdn.microsoft.com/en-us/library/bb651790.aspx"&gt;build projects in parallel&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This all sounds normal, so what’s the problem?&amp;#160; In a large team, people will sometimes inadvertently add statements to different project files that copy files to the same destination.&amp;#160; When those project files have no references to each other, directly or indirectly, msbuild may build them in parallel.&amp;#160; If it does happen to run those projects in parallel on different nodes and the copies happen at the same time, the build breaks because one copy succeeds and one fails.&amp;#160; Since the timing is not going to be the same on every build, the result is random build breaks.&amp;#160; Build breaks suck.&amp;#160; They drain the productivity of the team and are frustrating.&lt;/p&gt;  &lt;p&gt;Whether the build is continuous integration or gated checkin, these breaks may happen randomly.&amp;#160; They are most likely to happen on incremental builds where the percentage of time spent during the build on doing copies is much higher than a clean build.&amp;#160; Tracking them down as they happen is painful.&lt;/p&gt;  &lt;p&gt;So, I wrote a simple tool to find cases in the log where the destination is the same for more than one copy operation.&amp;#160; The comment in the header explains what the code is looking for.&amp;#160; Running this on the normal verbosity msbuild logs from a clean build ensures that all of the copies are in the log for analysis.&amp;#160; We also build what we call partitions separately, resulting in the number of log files being a multiple of the number of partitions being built (a partition is a subset of the source and is typically a top-level directory in the branch).&lt;/p&gt;  &lt;p&gt;In our internal builds, we record multiple log files for our builds, including minimal, normal, and detailed.&amp;#160; When there’s a problem, you can start with the smaller build logs and increase to the more verbose logging as needed.&lt;/p&gt;  &lt;p&gt;I’m posting this for any of you who might run into the same thing.&amp;#160; Keep in mind that there are other things, such as antivirus software, that can interfere with the build process and result in errors for files being copied.&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.IO;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text.RegularExpressions;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Threading.Tasks;

&lt;span class="rem"&gt;/*&lt;/span&gt;
&lt;span class="rem"&gt; * This tool finds cases where more than one file is copied to the same target.  This will cause&lt;/span&gt;
&lt;span class="rem"&gt; * build breaks when msbuild executes the copies in parallel because the copies are independent&lt;/span&gt;
&lt;span class="rem"&gt; * (there are no dependencies).  This typically occurs in incremental builds because incremental&lt;/span&gt;
&lt;span class="rem"&gt; * builds do a lot less work (not nearly as much to build), resulting in the copies being a much&lt;/span&gt;
&lt;span class="rem"&gt; * higher percentage of the build activities and more likely to collide.  Gated checkin,&lt;/span&gt;
&lt;span class="rem"&gt; * continuous integration, and developer/tester builds are almost always incremental, not clean.&lt;/span&gt;
&lt;span class="rem"&gt; * These issues are still possible in regular clean builds, such as done nightly by the build lab.&lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt; * These race conditions are difficult to debug manually.  Since msbuild records all of the copies&lt;/span&gt;
&lt;span class="rem"&gt; * made via the copy task, we can use the log file to identify cases where the same destination&lt;/span&gt;
&lt;span class="rem"&gt; * path is used in more than one copy.&lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt; * Use the *.normal.* logs from a clean build with this tool.&lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt; * The best thing to do is to ensure that each file copy to a particular destination is done by&lt;/span&gt;
&lt;span class="rem"&gt; * one and only one project.  When that is the case, you are guaranteed not to have problems&lt;/span&gt;
&lt;span class="rem"&gt; * with two copies colliding and breaking your build.&lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt; * Here's example output from buildr.suitesrc.normal.log that shows a copy failure.  Here two&lt;/span&gt;
&lt;span class="rem"&gt; * copies were executed in parallel and the second one failed, causing the build to fail.&lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt;    48&amp;gt;Project &amp;quot;D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\dirs.proj&amp;quot; (48) is building &amp;quot;D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\Azure\Microsoft.TeamFoundation.Data.Azure.csproj&amp;quot; (55) on node 8 (BuildLinked target(s)).&lt;/span&gt;
&lt;span class="rem"&gt;&lt;/span&gt;
&lt;span class="rem"&gt;    55&amp;gt;_CopyOutOfDateSourceItemsToOutputDirectory:&lt;/span&gt;
&lt;span class="rem"&gt;         Copying file from &amp;quot;D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\ReleaseManifest.xml&amp;quot; to &amp;quot;D:\a1\binaries.x86ret\bin\i386\ReleaseManifest.xml&amp;quot;.&lt;/span&gt;
&lt;span class="rem"&gt;&lt;/span&gt;
&lt;span class="rem"&gt;&lt;/span&gt;
&lt;span class="rem"&gt;    48&amp;gt;Project &amp;quot;D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\dirs.proj&amp;quot; (48) is building &amp;quot;D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\SqlServer\Microsoft.TeamFoundation.Data.csproj&amp;quot; (53) on node 4 (BuildLinked target(s)).&lt;/span&gt;
&lt;span class="rem"&gt;&lt;/span&gt;
&lt;span class="rem"&gt;    53&amp;gt;_CopyOutOfDateSourceItemsToOutputDirectory:&lt;/span&gt;
&lt;span class="rem"&gt;         Copying file from &amp;quot;D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\ReleaseManifest.xml&amp;quot; to &amp;quot;D:\a1\binaries.x86ret\bin\i386\ReleaseManifest.xml&amp;quot;.&lt;/span&gt;
&lt;span class="rem"&gt;&lt;/span&gt;
&lt;span class="rem"&gt;    53&amp;gt;D:\a1\dd\tools\x86\managed\v4.5\Microsoft.Common.targets(3516,5): error MSB3021: Unable to copy file &amp;quot;D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\ReleaseManifest.xml&amp;quot; to &amp;quot;D:\a1\binaries.x86ret\bin\i386\ReleaseManifest.xml&amp;quot;. Access to the path 'D:\a1\binaries.x86ret\bin\i386\ReleaseManifest.xml' is denied. [D:\a1\dd\alm\tfs_core\Admin\Servicing\Data\SqlServer\Microsoft.TeamFoundation.Data.csproj]&lt;/span&gt;
&lt;span class="rem"&gt;  &lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt; * Note that there may be multiple copies in a sequence.&lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt;    291&amp;gt;_CopyOutOfDateSourceItemsToOutputDirectoryAlways:&lt;/span&gt;
&lt;span class="rem"&gt;         Copying file from &amp;quot;D:\a1\dd\suitesrc\TFS\common\deploytools\httpcfg.exe&amp;quot; to &amp;quot;D:\a1\binaries.x86ret\SuiteBin\i386\TFS\Tests\httpcfg.exe&amp;quot;.&lt;/span&gt;
&lt;span class="rem"&gt;         Copying file from &amp;quot;D:\a1\dd\suitesrc\TFS\common\deploytools\makecert.exe&amp;quot; to &amp;quot;D:\a1\binaries.x86ret\SuiteBin\i386\TFS\Tests\makecert.exe&amp;quot;.&lt;/span&gt;
&lt;span class="rem"&gt;         Copying file from &amp;quot;D:\a1\dd\suitesrc\TFS\common\deploytools\winhttpcertcfg.exe&amp;quot; to &amp;quot;D:\a1\binaries.x86ret\SuiteBin\i386\TFS\Tests\winhttpcertcfg.exe&amp;quot;.&lt;/span&gt;
&lt;span class="rem"&gt;       CopyFilesToOutputDirectory:&lt;/span&gt;
&lt;span class="rem"&gt;         Copying file from &amp;quot;D:\int\641\194\suitesrc\tfshttpsconfig.csproj_80399372\objr\x86\TfsHttpsConfig.exe&amp;quot; to &amp;quot;D:\a1\binaries.x86ret\SuiteBin\i386\TFS\Tests\TfsHttpsConfig.exe&amp;quot;.&lt;/span&gt;
&lt;span class="rem"&gt;&lt;/span&gt;
&lt;span class="rem"&gt; * Nodes are reused by msbuild.  The result is that a given may process many projects, so it's not&lt;/span&gt;
&lt;span class="rem"&gt; * possible to scan and pair up all of the nodes and project files at once.  In the code below, &lt;/span&gt;
&lt;span class="rem"&gt; * you will see that it always tracks the most recent node for that reason.&lt;/span&gt;
&lt;span class="rem"&gt; * &lt;/span&gt;
&lt;span class="rem"&gt; */&lt;/span&gt;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; FindBadCopies
{
    &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main(&lt;span class="kwrd"&gt;string&lt;/span&gt;[] args)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (args.Length &amp;lt; 1)
            {
                Console.WriteLine(&lt;span class="str"&gt;&amp;quot;Usage: findbadcopies &amp;lt;logfile&amp;gt;\r\n&amp;quot;&lt;/span&gt;);
                Console.WriteLine(
&lt;span class="str"&gt;@&amp;quot;This tool scans a build log, such as buildr.suitesrc.normal.log, and produces a
list of file paths that are the targets of more than one copy and shows which
project files initiated each copy.  These redundant file copies are prone to
fail periodically in incremental builds, such as gated check ins and CI builds,
because copies are a higher percentage of the operations in the build, making
it more likely that two collide.&amp;quot;&lt;/span&gt;);

                &lt;span class="kwrd"&gt;return&lt;/span&gt;;
            }

            ProcessFile(args[0]);
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ProcessFile(String fileName)
        {
            Dictionary&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;, String&amp;gt; nodeTable = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;, String&amp;gt;(1000);
            Dictionary&amp;lt;String, &lt;span class="kwrd"&gt;int&lt;/span&gt;&amp;gt; pathTable = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;String, &lt;span class="kwrd"&gt;int&lt;/span&gt;&amp;gt;(1000, StringComparer.InvariantCultureIgnoreCase);
            String previousLine;

            &lt;span class="kwrd"&gt;string&lt;/span&gt;[] text = File.ReadAllLines(fileName);

            &lt;span class="rem"&gt;// Process all of the lines in the file, skipping the first line (we need the previous line,&lt;/span&gt;
            &lt;span class="rem"&gt;// and the first line in the file isn't important to this tool).&lt;/span&gt;
            &lt;span class="kwrd"&gt;int&lt;/span&gt; lastNode = 0;
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 1; i &amp;lt; text.Length; i++)
            {
                previousLine = text[i - 1];

                &lt;span class="rem"&gt;// Record most recent node.  The text that appears with it can be different&lt;/span&gt;
                &lt;span class="rem"&gt;// (see sample log data).&lt;/span&gt;
                &lt;span class="kwrd"&gt;string&lt;/span&gt; prevLinePattern = &lt;span class="str"&gt;@&amp;quot;([0-9]+)[&amp;gt;]&amp;quot;&lt;/span&gt;;
                Match match = Regex.Match(previousLine, prevLinePattern, RegexOptions.IgnoreCase);
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (match.Success)
                {
                    lastNode = Int32.Parse(match.Groups[1].Value);
                }

                &lt;span class="rem"&gt;// If the line is recording the start of a project, add it to the table.&lt;/span&gt;
                &lt;span class="kwrd"&gt;string&lt;/span&gt; pattern = &lt;span class="str"&gt;@&amp;quot;[0-9]+[&amp;gt;]Project &amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;[^&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;]+&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot; \([0-9]+\) is building &amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;([^&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;]+)&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot; \(([0-9]+)\)&amp;quot;&lt;/span&gt;;
                match = Regex.Match(text[i], pattern, RegexOptions.IgnoreCase);
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (match.Success)
                {
                    &lt;span class="kwrd"&gt;int&lt;/span&gt; node = Int32.Parse(match.Groups[2].Value);
                    String projectPath = Path.GetFullPath(match.Groups[1].Value);

                    &lt;span class="rem"&gt;// Because nodes are reused, we are only keeping the project path for the most recent use&lt;/span&gt;
                    &lt;span class="rem"&gt;// of a given node.&lt;/span&gt;
                    nodeTable[node] = projectPath;

                    &lt;span class="rem"&gt;// If we matched a project line, it can't be a copy line.&lt;/span&gt;
                    &lt;span class="kwrd"&gt;continue&lt;/span&gt;;
                }

                &lt;span class="rem"&gt;// If the line is one that records a copy, see if there was an earlier copy made to&lt;/span&gt;
                &lt;span class="rem"&gt;// the same target path.  First, try the output of a copying task.&lt;/span&gt;
                &lt;span class="kwrd"&gt;string&lt;/span&gt; copyingPattern = &lt;span class="str"&gt;@&amp;quot;Copying file from &amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;[^&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;]+&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot; to &amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;([^&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;]+)&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
                match = Regex.Match(text[i], copyingPattern, RegexOptions.IgnoreCase);
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (match.Success)
                {
                    String targetPath = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;try&lt;/span&gt;
                    {
                        targetPath = Path.GetFullPath(match.Groups[1].Value);
                    }
                    &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception e)
                    {
                        &lt;span class="rem"&gt;// There is a file in the test tree that uses non-English chars that causes&lt;/span&gt;
                        &lt;span class="rem"&gt;// GetFullPath() to throw (TODO: understand why), so we keep the raw text.&lt;/span&gt;
                        &lt;span class="rem"&gt;// Console.WriteLine(match.Groups[1].Value);&lt;/span&gt;
                        targetPath = match.Groups[1].Value;
                    }

                    &lt;span class="rem"&gt;// If we have already seen the target path, then we have a duplicate copy path&lt;/span&gt;
                    &lt;span class="rem"&gt;// target to report.&lt;/span&gt;
                    &lt;span class="kwrd"&gt;int&lt;/span&gt; otherNode;
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (pathTable.TryGetValue(targetPath, &lt;span class="kwrd"&gt;out&lt;/span&gt; otherNode))
                    {
                        Console.ForegroundColor = ConsoleColor.Cyan;
                        Console.WriteLine(&lt;span class="str"&gt;&amp;quot;{0}&amp;quot;&lt;/span&gt;, targetPath);
                        Console.ResetColor();

                        Console.WriteLine(&lt;span class="str"&gt;&amp;quot;      {0}&amp;quot;&lt;/span&gt;, nodeTable[otherNode]);
                        Console.WriteLine(&lt;span class="str"&gt;&amp;quot;      {0}&amp;quot;&lt;/span&gt;, nodeTable[lastNode]);
                        Console.WriteLine();
                    }

                    pathTable[targetPath] = lastNode;
                }
            }
        }
    }
}&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10259279" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Build/">Team Build</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/MSBuild/">MSBuild</category></item><item><title>How to subscribe to checkins not under a particular path</title><link>http://blogs.msdn.com/b/buckh/archive/2011/10/31/how-to-subscribe-to-checkins-not-under-a-particular-path.aspx</link><pubDate>Mon, 31 Oct 2011 14:19:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10231669</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10231669</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/10/31/how-to-subscribe-to-checkins-not-under-a-particular-path.aspx#comments</comments><description>&lt;p&gt;Nick Kirchem, who works on the TFS web access team, recently answered a question on how email subscriptions on checkin alerts.&amp;#160; The question was, how do I subscribe to checkin alerts &lt;em&gt;not &lt;/em&gt;under a particular folder?&lt;/p&gt;  &lt;p&gt;Here’s how to do it.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;bissubscribe /eventType CheckinEvent /address someone@domain.com /deliveryType EmailHtml /server http://myserver:8080/tfs/DefaultCollection &amp;quot;'Artifacts/Artifact[@ArtifactType=\&amp;quot;VersionedItem\&amp;quot;][not(starts-with(translate(@ServerItem, \&amp;quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ\&amp;quot;, \&amp;quot;abcdefghijklmnopqrstuvwxyz\&amp;quot;), \&amp;quot;$/devdiv/feature/build/qa\&amp;quot;))]' &amp;lt;&amp;gt; null&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Let’s break it down.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt; /eventType – Here we want CheckinEvent.&amp;#160; There are others.&amp;#160; Rather than list them, I’d recommend the Alerts Explorer that is part of the Team Foundation Server Power Tools.&amp;#160; You can use it to discover more, as each different type has different things you can filter on.&lt;/li&gt;    &lt;li&gt;/address – The email address to use.&lt;/li&gt;    &lt;li&gt;/deliveryType – We want HTML-formatted email.&lt;/li&gt;    &lt;li&gt;/server – Here I’ve used the URL to the default collection on a TFS 2010 server.&amp;#160; You’ll need to edit it to match the server and collection you need to use.&lt;/li&gt;    &lt;li&gt;expression – The expression is somewhat hard to read.&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;The path we want to filter out is listed last, which $/devdiv/feature/build/qa in this case.&amp;#160; You must use lowercase for your path.&lt;/li&gt;      &lt;li&gt;The translate XPath function is used to normalize the casing of the server path to be all lower case.&amp;#160; This is important because XPath is case sensitive.&lt;/li&gt;      &lt;li&gt;The starts-with XPath function tests to see if the path is one we are interested in (in this case to filter out).&lt;/li&gt;      &lt;li&gt;The not XPath function inverts the test to see if it is not under the path we want to filter out.&lt;/li&gt;      &lt;li&gt;The quotation marks are escaped so that they can be inside quotation marks on the Windows command prompt.&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;I recommend using the &lt;a href="http://www.edsquared.com/2010/02/25/Where+Is+The+Alerts+Editor+Explorer+In+The+TFS+2010+Power+Tools.aspx"&gt;Alerts Explorer&lt;/a&gt; &lt;a href="http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f"&gt;power tool&lt;/a&gt; rather than doing this by hand.&amp;#160; However, in this case, the Alerts Explorer does not support this.&lt;/p&gt;  &lt;p&gt;Nick has also written a feature for TFS 11 to allow you to edit alerts inside the product through the web interface.&amp;#160; An early version of it is in the TFS 11 CTP release that came out in concert with the Windows’ //build conference.&amp;#160; Here’s a screen shot of it.&amp;#160; Note that you can only see it in the UI if you enable email in the TFS Administration Console.&amp;#160; Since then he’s made it easier to use and made it so that you can administer other user alerts, if you are an administrator.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-09-metablogapi/6366.image_5F00_7D4A62E7.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-09-metablogapi/7652.image_5F00_thumb_5F00_67144795.png" width="1019" height="623" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Related post: &lt;a href="http://blogs.msdn.com/b/buckh/archive/2006/09/29/checkinevent-path-filter.aspx"&gt;Adding a path filter to a CheckinEvent subscription using bissubscribe&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10231669" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+API/">TFS API</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>How to delete a team project from TFS on Azure</title><link>http://blogs.msdn.com/b/buckh/archive/2011/09/19/how-to-delete-a-team-project-from-tfs-on-azure.aspx</link><pubDate>Mon, 19 Sep 2011 13:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10213448</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10213448</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/09/19/how-to-delete-a-team-project-from-tfs-on-azure.aspx#comments</comments><description>&lt;p&gt;The question came up as to how to delete a team project&amp;nbsp;in the&amp;nbsp;Team Foundation Service Preview.&amp;nbsp; When I first tried it, it didn&amp;rsquo;t work.&amp;nbsp; Then I realized it&amp;rsquo;s the one case where you have to explicitly specify the collection name.&amp;nbsp; It&amp;rsquo;s surprising because in hosted TFS each account has only one collection.&amp;nbsp; You cannot create multiple collections currently as you can with on-premise TFS (this will change at some point in the future).&amp;nbsp; Incidentally, you cannot delete a collection right now either.&lt;/p&gt;
&lt;p&gt;You must have installed the&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-US/vstudio/"&gt;Visual Studio&amp;nbsp;11 Developer Preview &lt;/a&gt;(or newer build of VS/TE 11) to do this.&amp;nbsp; Even with the patch to support hosting, the 2010 version of tfsdeleteproject.exe will not work.&lt;/p&gt;
&lt;p&gt;If you leave off the collection, here&amp;rsquo;s the error you will see when I try to delete the team project called Testing.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;C:\project&amp;gt;tfsdeleteproject /collection:https://buckh-test2.tfspreview.com Testing &lt;br /&gt;Team Foundation services are not available from server https://buckh-test2.tfspreview.com/. &lt;br /&gt;Technical information (for administrator): &lt;br /&gt;&amp;nbsp; HTTP code 404: Not Found&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With DefaultCollection added to your hosting account&amp;rsquo;s URL, you will get the standard experience with tfsdeleteproject and successfully delete the team project.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;C:\project&amp;gt;tfsdeleteproject /collection:https://buckh-test2.tfspreview.com/DefaultCollection Testing&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;Warning: Deleting a team project is an irrecoverable operation. All version control, work item tracking and Team Foundation build data will be destroyed from the system. The only way to recover this data is by restoring a stored backup of the databases. Are you sure you want to delete the team project and all of its data (Y/N)?y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;Deleting from Build ... &lt;br /&gt;Done &lt;br /&gt;Deleting from Version Control ... &lt;br /&gt;Done &lt;br /&gt;Deleting from Work Item Tracking ... &lt;br /&gt;Done &lt;br /&gt;Deleting from TestManagement ... &lt;br /&gt;Done &lt;br /&gt;Deleting from LabManagement ... &lt;br /&gt;Done &lt;br /&gt;Deleting from ProjectServer ... &lt;br /&gt;Done &lt;br /&gt;Warning. Did not find Report Server service. &lt;br /&gt;Warning. Did not find SharePoint site service. &lt;br /&gt;Deleting from Team Foundation Core ... &lt;br /&gt;Done&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is the error you will get when using tfsdeleteproject 2010, even with the patch for hosting access.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;C:\Program Files\Microsoft Visual Studio 10.0\VC&amp;gt;tfsdeleteproject /collection:https://buckh-test2.tfspreview.com/DefaultCollection Testing2&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;Warning: Deleting a team project is an irrecoverable operation. All version control, work item tracking and Team Foundation build data will be destroyed from the system. The only way to recover this data is by restoring a stored backup of the databases. Are you sure you want to delete the team project and all of its data (Y/N)?y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;TF200040: You cannot delete a team project with your version of Team Explorer. Contact your system administrator to determine how to upgrade your Team Explorer client to the version compatible with Team Foundation Server.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10213448" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2012/">TFS 2012</category></item><item><title>Now on Twitter: tfsbuck</title><link>http://blogs.msdn.com/b/buckh/archive/2011/09/19/now-on-twitter-tfsbuck.aspx</link><pubDate>Mon, 19 Sep 2011 12:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10213437</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10213437</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/09/19/now-on-twitter-tfsbuck.aspx#comments</comments><description>&lt;p&gt;With the build conference last week, I got a Twitter account and started following the comments and responding to questions.&amp;nbsp; I&amp;rsquo;m &lt;a href="http://twitter.com//tfsbuck"&gt;@tfsbuck&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10213437" width="1" height="1"&gt;</description></item><item><title>TFS 2010 SP1 Cumulative Update 1 available (again)</title><link>http://blogs.msdn.com/b/buckh/archive/2011/08/15/tfs-2010-sp1-cumulative-update-1-available-again.aspx</link><pubDate>Mon, 15 Aug 2011 12:58:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10195692</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10195692</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/08/15/tfs-2010-sp1-cumulative-update-1-available-again.aspx#comments</comments><description>&lt;p&gt;Brian posted about the &lt;a href="http://blogs.msdn.com/b/bharry/archive/2011/06/13/tfs-2010-sp1-cumulative-update-1-available.aspx"&gt;cumulative update for TFS&lt;/a&gt; (the TFS SKU, not the client/VS) back in June.&amp;#160; After it was released we learned of a couple of bugs in it, including one where upgrades would not work in certain cases.&amp;#160; Last Thursday, we re-released it with all of the known bugs fixed.&amp;#160; We understand where we went wrong, and we apologize for the inconvenience.&lt;/p&gt;  &lt;p&gt;You should apply this update to the server, build machine, proxy, and SharePoint extensions – all of the things that the TFS SKU installs.&amp;#160; SP1 is a pre-requisite (i.e., this patch does &lt;em&gt;not&lt;/em&gt; include SP1).&lt;/p&gt;  &lt;p&gt;Download: &lt;a title="http://www.microsoft.com/download/en/details.aspx?id=26211" href="http://www.microsoft.com/download/en/details.aspx?id=26211"&gt;http://www.microsoft.com/download/en/details.aspx?id=26211&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10195692" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>Patch to improve perf and reliability of the Workflow Designer</title><link>http://blogs.msdn.com/b/buckh/archive/2011/08/09/patch-to-improve-perf-and-reliability-of-the-workflow-designer.aspx</link><pubDate>Tue, 09 Aug 2011 13:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10194005</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10194005</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/08/09/patch-to-improve-perf-and-reliability-of-the-workflow-designer.aspx#comments</comments><description>&lt;p&gt;Today the .NET team is releasing a cumulative update patch.&amp;nbsp; This has all of the QFEs up until a couple of months ago rolled into one patch.&amp;nbsp; Included as part of that is a patch for WPF that improves the performance of the Windows Workflow Designer as well as a hang that a number of folks have hit.&amp;nbsp; I had a few customers try it out, and they were happy with the improvements.&amp;nbsp; I recommend this update to you if you work with the WF Designer (e.g., editing the workflow for Team Build definitions).&amp;nbsp; There are still perf issues even with this fix, and the WF Designer team has made some very good perf improvements for the next release.&lt;/p&gt;
&lt;p&gt;You can find a complete list of the issues fixed at &lt;a href="http://support.microsoft.com/kb/2468871"&gt;KB 2468871&lt;/a&gt; under &lt;a href="http://support.microsoft.com/kb/2468871#MoreInfo"&gt;More Information&lt;/a&gt;.&amp;nbsp; There are also six features related to ASP.NET and Silverlight listed after the issues.&lt;/p&gt;
&lt;p&gt;Here is the download page: &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=3556"&gt;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=3556&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;P.S. &amp;nbsp;This is completely unrelated to the TFS cumulative update that Brian has written about &lt;a href="http://blogs.msdn.com/b/bharry/archive/2011/08/09/tfs-2010-cumulative-update-republished.aspx"&gt;here&lt;/a&gt;. &amp;nbsp;I recommend both.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10194005" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Build/">Team Build</category></item><item><title>Knowing which thread BackgroundWorker will use for its events</title><link>http://blogs.msdn.com/b/buckh/archive/2011/07/19/knowing-which-thread-backgroundworker-will-use-for-its-events.aspx</link><pubDate>Tue, 19 Jul 2011 20:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10187995</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10187995</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/07/19/knowing-which-thread-backgroundworker-will-use-for-its-events.aspx#comments</comments><description>&lt;p&gt;[UPDATE 7/19/2011] &amp;nbsp;Stephen pointed me to his article covering this and more in February issue of MSDN Magazine, and I recommend it:&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/magazine/gg598924.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/gg598924.aspx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We hit this recently, so I thought I&amp;rsquo;d post this email from Chad, a developer on version control, for anyone else who may have missed this subtlety.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Today we discovered some of our code was making an incorrect assumption about the behavior of BackgroundWorker, so I thought it might be useful to send a note detailing what we found.&lt;/p&gt;
&lt;p&gt;Our code assumed BackgroundWorker would always call ProgressChanged and RunWorkerCompleted on the UI thread.&amp;nbsp; This mistake was based on the assumption that BackgroundWorker saved off the SynchronizationContext for the thread on which it was created.&lt;/p&gt;
&lt;p&gt;After reviewing the BackgroundWorker code, we found that it actually saves the SynchronizationContext for the thread where RunWorkerAsync is called (by calling AsyncOperationManager.CreateOperation).&amp;nbsp; Then, ProgressChanged and RunWorkerCompleted are called on that thread if it is still running.&amp;nbsp; If not, the events appear to be called on a random thread.&lt;/p&gt;
&lt;p&gt;This of course leads to a crash when there are attempts to update UI from the wrong thread.&amp;nbsp; If you are relying on BackgroundWorker to return you to the UI thread, make sure to only call RunWorkerAsync from the UI thread.&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;-Chad&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10187995" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/C_2300_/">C#</category></item><item><title>Updates to our docs on MSDN last month</title><link>http://blogs.msdn.com/b/buckh/archive/2011/06/01/updates-to-our-docs-on-msdn-last-month.aspx</link><pubDate>Thu, 02 Jun 2011 01:17:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10170526</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10170526</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/06/01/updates-to-our-docs-on-msdn-last-month.aspx#comments</comments><description>&lt;p&gt;The fine folks who write documentation for our product are woefully outnumbered.&amp;#160; Every month they release updates to the docs, adding new topics and enhancing existing ones.&amp;#160; You can find the latest set of updates described on their &lt;a href="http://blogs.msdn.com/b/vstsue/"&gt;blog&lt;/a&gt;.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/vstsue/archive/2011/06/01/vs-alm-library-updates-on-msdn-for-may-2011.aspx#install"&gt;Team Foundation Server, Microsoft Office SharePoint Server, SQL Server&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/vstsue/archive/2011/06/01/vs-alm-library-updates-on-msdn-for-may-2011.aspx#build"&gt;Building the Application&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/vstsue/archive/2011/06/01/vs-alm-library-updates-on-msdn-for-may-2011.aspx#everywhere"&gt;Team Explorer Everywhere&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/vstsue/archive/2011/06/01/vs-alm-library-updates-on-msdn-for-may-2011.aspx#featurePack"&gt;Team Foundation Server and Project Server Integration Feature Pack&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10170526" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>Ewald’s posts on TFS Build 2010</title><link>http://blogs.msdn.com/b/buckh/archive/2011/05/31/ewald-s-posts-on-tfs-build-2010.aspx</link><pubDate>Tue, 31 May 2011 15:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10169944</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10169944</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/05/31/ewald-s-posts-on-tfs-build-2010.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://www.ewaldhofman.nl/"&gt;Ewald Hofman&lt;/a&gt;, an ALM MVP, has written a great series of blog posts on Team Build in Team Foundation Server 2010.&amp;nbsp; The 2010 release introduces Windows Workflow as the overall orchestrator of the build process.&amp;nbsp; Ewald walks you through quite a few topics related to this and the other new features.&amp;nbsp; Check it out!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/04/20/Customize-Team-Build-2010-e28093-Part-1-Introduction.aspx"&gt;Part 1: Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/04/27/Customize-Team-Build-2010-e28093-Part-2-Add-arguments-and-variables.aspx"&gt;Part 2: Add arguments and variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/04/28/Customize-Team-Build-2010-e28093-Part-3-Use-more-complex-arguments.aspx"&gt;Part 3: Use more complex arguments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/04/29/Customize-Team-Build-2010-e28093-Part-4-Create-your-own-activity.aspx"&gt;Part 4: Create your own activity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/05/13/Customize-Team-Build-2010-e28093-Part-5-Increase-AssemblyVersion.aspx"&gt;Part 5: Increase AssemblyVersion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/05/17/Customize-Team-Build-2010-e28093-Part-6-Use-custom-type-for-an-argument.aspx"&gt;Part 6: Use custom type for an argument&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/05/27/Customize-Team-Build-2010-e28093-Part-7-How-is-the-custom-assembly-found.aspx"&gt;Part 7: How is the custom assembly found&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/05/28/Customize-Team-Build-2010-e28093-Part-8-Send-information-to-the-build-log.aspx"&gt;Part 8: Send information to the build log&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/05/28/Customize-Team-Build-2010-e28093-Part-9-Impersonate-activities-(run-under-other-credentials).aspx"&gt;Part 9: Impersonate activities (run under other credentials)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/06/01/Customize-Team-Build-2010-e28093-Part-10-Include-Version-Number-in-the-Build-Number.aspx"&gt;Part 10: Include Version Number in the Build Number&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/10/01/Customize-Team-Build-2010-e28093-Part-11-Speed-up-opening-my-build-process-template.aspx"&gt;Part 11: Speed up opening my build process template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/10/01/Customize-Team-Build-2010-e28093-Part-12-How-to-debug-my-custom-activities.aspx"&gt;Part 12: How to debug my custom activities&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/10/02/Customize-Team-Build-2010-e28093-Part-13-Get-control-over-the-Build-Output.aspx"&gt;Part 13: Get control over the Build Output&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/11/09/Part-14-Execute-a-PowerShell-script.aspx"&gt;Part 14: Execute a PowerShell script&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2010/11/09/Part-15-Fail-a-build-based-on-the-exit-code-of-a-console-application.aspx"&gt;Part 15: Fail a build based on the exit code of a console application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ewaldhofman.nl/post/2011/04/06/Customize-Team-Build-2010-e28093-Part-16-Specify-the-relative-reference-path.aspx"&gt;Part 16: Specify the relative reference path&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/tfs+2010"&gt;tfs 2010&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/team+build"&gt;team build&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/windows+workflow"&gt;windows workflow&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10169944" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Build/">Team Build</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>Be a developer at Microsoft in Durham, NC</title><link>http://blogs.msdn.com/b/buckh/archive/2011/04/25/be-a-developer-at-microsoft-in-durham-nc.aspx</link><pubDate>Tue, 26 Apr 2011 02:32:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10157949</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10157949</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/04/25/be-a-developer-at-microsoft-in-durham-nc.aspx#comments</comments><description>&lt;p&gt;Do you want to be part of a team of talented developers and build great software?&amp;#160; Here’s your chance to join the TFS team.&amp;#160; In addition to development positions in Redmond (work item tracking &lt;a href="https://careers.microsoft.com/JobDetails.aspx?ss=&amp;amp;pg=0&amp;amp;so=&amp;amp;rw=1&amp;amp;jid=32290&amp;amp;jlang=EN"&gt;client&lt;/a&gt; &lt;a href="https://careers.microsoft.com/JobDetails.aspx?ss=&amp;amp;pg=0&amp;amp;so=&amp;amp;rw=2&amp;amp;jid=40070&amp;amp;jlang=EN"&gt;team&lt;/a&gt;), I have openings on our development team here in North Carolina.&amp;#160; Please follow one of the links to apply online.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://careers.microsoft.com/JobDetails.aspx?ss=&amp;amp;pg=0&amp;amp;so=&amp;amp;rw=4&amp;amp;jid=39662&amp;amp;jlang=EN"&gt;Administration and Operations&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="https://careers.microsoft.com/JobDetails.aspx?ss=&amp;amp;pg=0&amp;amp;so=&amp;amp;rw=3&amp;amp;jid=39972&amp;amp;jlang=EN"&gt;Team Explorer Everywhere&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="https://careers.microsoft.com/JobDetails.aspx?ss=&amp;amp;pg=0&amp;amp;so=&amp;amp;rw=2&amp;amp;jid=39971&amp;amp;jlang=EN"&gt;Version Control&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;Job Category: Software Engineering: Development     &lt;br /&gt;Location: United States, NC, Durham      &lt;br /&gt;Job ID: 753545      &lt;br /&gt;Product: Visual Studio Team System      &lt;br /&gt;Division: Server &amp;amp; Tools Business&lt;/p&gt;    &lt;p&gt;Visual Studio Team Foundation Server (TFS) is leading the way in improving the success of software projects, and we want your help! TFS provides software development teams with project and bug management, version control, and build automation. We are now building our services in the cloud using Windows and SQL Azure platforms to make TFS available 24x7 over the internet.&lt;/p&gt;    &lt;p&gt;This is also an opportunity to live on the east coast in North Carolina (Raleigh/Durham) and work on cutting-edge product development for Microsoft!&lt;/p&gt;    &lt;p&gt;Are you passionate about building a great version control experience? Developers interact with version control more than any other part of the system, so you have the opportunity to have a big impact. The position will require you to have or gain extensive knowledge of one or more of these technologies: Visual Studio packages, WPF, WCF, and C#/.NET Framework. Version control in TFS makes use of a wide-range of technologies, so you’ll have the opportunity to learn new stuff and go deep to become an expert in one or more of these areas.&lt;/p&gt;    &lt;p&gt;We’re looking for a developer who seeks big challenges as part of a strong, agile team and has both great collaboration skills and an ability to also work independently to deliver well thought out solutions to tough problems. You must have 3 or more years of experience developing production software using C/C++, C#, or Java and a strong background in object-oriented design and algorithms. A BS in Computer Science, Computer Engineering, Electrical Engineering, or equivalent is required.&lt;/p&gt;    &lt;p&gt;If you enjoy building software with a broad range of technologies and being part of a great team that’s making software development better, join TFS!&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you are passionate about build or web access instead, you can still apply to one of the positions above, and we can discuss team fit as part of the interview process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10157949" width="1" height="1"&gt;</description></item><item><title>Making debugging easier: Source Indexing and Symbol Server</title><link>http://blogs.msdn.com/b/buckh/archive/2011/04/11/making-debugging-easier-source-indexing-and-symbol-server.aspx</link><pubDate>Mon, 11 Apr 2011 18:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10151679</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10151679</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/04/11/making-debugging-easier-source-indexing-and-symbol-server.aspx#comments</comments><description>&lt;p&gt;Have you ever tried to debug an issue in old binaries and you don’t remember which version of the source they correspond to?&amp;#160; Have you debugged without symbols because no one saved them?&amp;#160; Here’s how to make your life easier.&lt;/p&gt;  &lt;p&gt;One of the great features in Team Foundation Server 2010 Build is the ability to have your builds automatically indexed with source server and the symbols stored in symbol server.&amp;#160; &lt;a href="http://www.edsquared.com/default.aspx"&gt;Ed Blankenship&lt;/a&gt; has posted a great write up on how to configure and use this feature from the build to debugging in Visual Studio.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://www.edsquared.com/2011/02/12/Source+Server+And+Symbol+Server+Support+In+TFS+2010.aspx"&gt;Source Server and Symbol Server Support in TFS 2010&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;As &lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fblogs.msdn.com%2fb%2fjimlamb%2farchive%2f2009%2f06%2f15%2fsymbol-and-source-server-in-tfs-2010.aspx"&gt;Jim Lamb announced in June 2009&lt;/a&gt;, TFS 2010 introduces support for &lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fms680641(v%3dvs.85).aspx"&gt;Source Server&lt;/a&gt; and &lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fms680693(v%3dvs.85).aspx"&gt;Symbol Server&lt;/a&gt; as part of the default automated build process template. This is a really key feature addition but I have found that many developers ask about why it would be so important and why it would help them. Ultimately, we are starting to have more and more tools that need access to the symbol file information and the original source code that was used for compilation. For example, some of the tools that come to mind are:&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fsc65sadd.aspx"&gt;Visual Studio Debugging&lt;/a&gt; including the &lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fbt727f1t.aspx"&gt;Remote Debugger&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fdd264915.aspx"&gt;IntelliTrace&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fz9z62c29.aspx"&gt;Visual Studio Profiler&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://www.edsquared.com/ct.ashx?id=a4216b56-4831-4c3f-b85f-f12bd89b4c1f&amp;amp;url=http%3a%2f%2fwww.microsoft.com%2fwhdc%2fdevtools%2fdebugging%2fdefault.mspx"&gt;WinDBG&lt;/a&gt; &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;By setting up Source Server and Symbol Server support during your build process, you’ll be able to work with assemblies &amp;amp; executables that come from the build servers and still use tools that need information from them.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://www.edsquared.com/2011/02/12/Source+Server+And+Symbol+Server+Support+In+TFS+2010.aspx"&gt;more…&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;[UPDATE 4/12/2011]&lt;/strong&gt;&amp;#160; &lt;a href="http://www.ewaldhofman.nl/"&gt;Ewald Hofman&lt;/a&gt; pointed out that I missed &lt;a href="http://blogs.msdn.com/b/camerons/"&gt;Cameron’s&lt;/a&gt; excellent debugging series posts.&amp;#160; In Cameron’s second post, he points out how to work around an issue with using minidumps with VS 2010 SP1. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/camerons/archive/2011/04/01/debugging-series-symbol-server.aspx"&gt;Debugging Series: Symbol Server&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/camerons/archive/2011/04/06/debugging-series-symbols-server-and-your-symbols.aspx"&gt;Debugging Series: Symbols Server and Your Symbols&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Check it out!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10151679" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Build/">Team Build</category></item><item><title>OData service for TFS</title><link>http://blogs.msdn.com/b/buckh/archive/2011/04/10/odata-service-for-tfs.aspx</link><pubDate>Sun, 10 Apr 2011 19:43:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10151837</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10151837</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/04/10/odata-service-for-tfs.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/briankel/"&gt;Brian Keller&lt;/a&gt; has release a new OData service for TFS.&amp;#160; He does a great job explaining it, and he also includes a video demo.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;a href="http://blogs.msdn.com/b/briankel/archive/2011/04/07/odata-service-for-team-foundation-server-2010.aspx"&gt;OData Service for Team Foundation Server 2010&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;What the heck is an OData Service for Team Foundation Server 2010?       &lt;br /&gt;&lt;/b&gt;I’m glad you asked. The purpose of this project is to help developers work with data from Team Foundation Server on multiple types of devices (such as smartphones and tablets) and operating systems. OData provides a great solution for this goal, since the existing Team Foundation Server 2010 &lt;a href="http://msdn.microsoft.com/library/bb130146.aspx"&gt;object model&lt;/a&gt; only works for applications developed on the Windows platform. The Team Foundation Server 2010 application tier also exposes a number of web services, but these are not supported interfaces and interaction with these web services directly may have unintended side effects. OData, on the other hand, is accessible from any device and application stack which supports HTTP requests. As such, this OData service interacts with the client object model in the SDK (it does not manipulate any web services directly).&lt;/p&gt;    &lt;p&gt;&lt;b&gt;What is OData?&lt;/b&gt;&lt;strong&gt; &lt;/strong&gt;&lt;b&gt;       &lt;br /&gt;&lt;/b&gt;OData exposes a way to work with data over the web. If you’re new to OData, I suggest spending a few minutes at &lt;a href="http://www.odata.org/"&gt;http://www.odata.org/&lt;/a&gt; reading about this evolving standard. It uses interfaces similar to REST, so that you can programmatically consume and manipulate data from any device or application stack which supports HTTP requests. DPE has been working with several organizations (such as PayPal, Facebook, and Netflix) and product groups to enable OData where it makes sense to do so. Team Foundation Server was an obvious choice since it not only allows developers to extend TFS in new and interesting ways, but it also allows us to further showcase support for this evolving standard with the developer community at large.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/briankel/archive/2011/04/07/odata-service-for-team-foundation-server-2010.aspx"&gt;more…&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10151837" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>Professional Team Foundation Server 2010 is now out!</title><link>http://blogs.msdn.com/b/buckh/archive/2011/04/09/professional-team-foundation-server-2010-is-now-out.aspx</link><pubDate>Sat, 09 Apr 2011 19:50:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10151711</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10151711</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/04/09/professional-team-foundation-server-2010-is-now-out.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/0470943327/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=woodweb03-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0470943327"&gt;&lt;img title="Professional Team Foundation Server 2010" border="0" alt="Professional Team Foundation Server 2010" align="right" src="http://www.woodwardweb.com/Windows-Live-Writer/Professional-Team-Foundation-Server-2010_D86E/tfs2010_book_3.jpg" width="204" height="256" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the year since the release of TFS 2010, we’ve seen a run of great new books coming, all by authors who really know their subject matter extremely well.&amp;#160; At the beginning of the year, &lt;a href="http://www.sedodream.com/"&gt;Sayed Ibrahim Hashimi&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/b/willbar/"&gt;William Bartholomew&lt;/a&gt; published &lt;a href="http://www.amazon.com/Inside-Microsoft-Build-Engine-Foundation/dp/0735645248/ref=pd_sim_b_2"&gt;Using MSBuild and Team Foundation Build&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/buckh/archive/2011/02/13/the-book-to-buy-on-team-build-using-msbuild-and-team-foundation-build-second-edition.aspx"&gt;&lt;em&gt;the &lt;/em&gt;book on MSBuild and TFS Build&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Then &lt;a href="http://www.teamsystemrocks.com/"&gt;Mickey Gousset&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/briankel/"&gt;Brian Keller&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ajoyk/"&gt;Ajoy Krishnamoorthy&lt;/a&gt;, and &lt;a href="http://www.woodwardweb.com/"&gt;Martin Woodward&lt;/a&gt; brought us &lt;a href="http://www.amazon.com/Professional-Application-Lifecycle-Management-Programmer/dp/0470484268/ref=sr_1_2?s=books&amp;amp;ie=UTF8&amp;amp;qid=1302365696&amp;amp;sr=1-2"&gt;Professional Application Lifecycle Management&lt;/a&gt;.&amp;#160; My copy of that book came in handy when I wrote a post on using the &lt;a href="http://blogs.msdn.com/b/buckh/archive/2011/01/29/code-metrics-command-line-tool.aspx"&gt;code metrics power tool with TFS Build&lt;/a&gt;.&amp;#160; It covers the full range of the VS ALM 2010 product.&lt;/p&gt;  &lt;p&gt;Now &lt;a href="http://www.amazon.com/Professional-Team-Foundation-Server-2010/dp/0470943327/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1302365696&amp;amp;sr=1-1"&gt;Professional Team Foundation Server 2010&lt;/a&gt; written by &lt;a href="http://www.edsquared.com/"&gt;Ed Blankenship&lt;/a&gt;, Martin Woodward, &lt;a href="http://blogs.msdn.com/b/granth/"&gt;Grant Holliday&lt;/a&gt;, and Brian Keller is now out.&amp;#160; I got my copy the other day and highly recommend it.&amp;#160; Martin wrote a great blog &lt;a href="http://www.woodwardweb.com/vsts/tfs/professional_te_1.html"&gt;post&lt;/a&gt; on the book, and in it he describes the differences between Professional ALM and Professional TFS.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;People have asked us what’s the difference between the &lt;a href="http://www.amazon.com/gp/product/0470484268/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=woodweb03-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0470484268"&gt;ALM book&lt;/a&gt; and the Pro TFS book.&amp;#160; The ALM book was deliberately written as an overview to the huge amount of functionality available in the entire Visual Studio Application Lifecycle Management suite.&amp;#160; Though there are a couple of chapters, the Team Build one in particular, that get pretty technical – the Pro ALM book tries to keep things approachable by everyone.&lt;/p&gt;    &lt;p&gt;The Pro TFS 2010 book is a deep dive on TFS.&amp;#160; We tried to make it so that you can pick up the book having never used TFS before any by the end of it not only know how to use TFS but how to administer a complex TFS instance and even use it to study for the &lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-512"&gt;TFS Administration exam&lt;/a&gt;.&amp;#160; I’ve learnt something from every single chapter in the Pro TFS book, but I would also hope that someone new to TFS could pick up the book and learn just enough to get going then come back for more over time.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;They’ve included information on every major area of TFS and have included some coverage of the test features that integrate with TFS.&amp;#160; One of the things that makes the book great is that it includes some great information on features of the product you may not even know about.&amp;#160; For example, did you know you can use Active Directory to automatically configure version control proxies for your distributed teams (check out chapter 24)?&amp;#160; Want to understand your server’s health and diagnose performance issues (see chapter 21)?&lt;/p&gt;  &lt;p&gt;Jeff Levinson’s &lt;a href="http://www.amazon.com/Software-Testing-Visual-Microsoft-Development/dp/0321734483/ref=sr_1_6?s=books&amp;amp;ie=UTF8&amp;amp;qid=1302365696&amp;amp;sr=1-6"&gt;Software Testing with Visual Studio 2010&lt;/a&gt; covers the testing features of VS ALM 2010, which was a huge area of focus for us in the 2010 release.&amp;#160; In it he covers creating test cases, reporting, and lab management, which is a powerful and complex new feature in 2010.&lt;/p&gt;  &lt;p&gt;In May we’ll get &lt;a href="http://www.amazon.com/Professional-Scrum-Team-Foundation-Server/dp/0470943335/ref=sr_1_3?s=books&amp;amp;ie=UTF8&amp;amp;qid=1302365696&amp;amp;sr=1-3"&gt;Professional Scrum with TFS 2010&lt;/a&gt;, so stay tuned for more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10151711" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item><item><title>How to reject checkins with code analysis violations</title><link>http://blogs.msdn.com/b/buckh/archive/2011/04/09/how-to-reject-checkins-with-code-analysis-violations.aspx</link><pubDate>Sat, 09 Apr 2011 16:06:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10151681</guid><dc:creator>Buck Hodges</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/buckh/rsscomments.aspx?WeblogPostID=10151681</wfw:commentRss><comments>http://blogs.msdn.com/b/buckh/archive/2011/04/09/how-to-reject-checkins-with-code-analysis-violations.aspx#comments</comments><description>&lt;p&gt;Andrew Hall wrote a great post on the &lt;a href="http://blogs.msdn.com/b/codeanalysis/"&gt;Code Analysis Team Blog&lt;/a&gt; about how to use the code analysis checkin policy with gated checkin in Team Foundation 2010 Build to reject checkins that have code analysis warnings or errors.&amp;#160; He shows you how to configure the rule set and set up the gated build definition to enforce the code analysis rules you’ve chosen.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/codeanalysis/archive/2011/04/06/preventing-check-ins-to-tfs-that-contain-code-analysis-warnings.aspx"&gt;Preventing check-ins to TFS that contain code analysis warnings&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Recently we have received several questions regarding Visual Studio Code Analysis integration with Team Foundation Server’s check-in policy and build server, so I thought it would be helpful to clarify the behavior and expose some relatively hidden functionality.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/codeanalysis/archive/2011/04/06/preventing-check-ins-to-tfs-that-contain-code-analysis-warnings.aspx"&gt;more…&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10151681" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Foundation/">Team Foundation</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/Team+Build/">Team Build</category><category domain="http://blogs.msdn.com/b/buckh/archive/tags/TFS+2010/">TFS 2010</category></item></channel></rss>
