tag:blogger.com,1999:blog-262292382024-03-08T15:42:12.339-08:00Team Foundation Server observations bucketeugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.comBlogger176125tag:blogger.com,1999:blog-26229238.post-67944202370770762512010-05-03T23:51:00.001-07:002010-05-03T23:51:28.870-07:00What do you need to build VC++ in 2010?<p>As you probably know, Visual C++ projects in VS 2010 use MSBuild to build. That works fine when you have Visual Studio installed, but can you build your C++ stuff without Visual Studio installed? One could build C#/VB projects with only .NET Framework installed, and prior to 2010, to build VC++ you only needed Windows SDK (that included headers, libraries, compilers and other goodies). So what is the story in 2010?</p> <p>It turns out the story is similar in 2010 - you will need to have Windows SDK (for C++ specific bits) and .NET Framework 4.0 for vcxproj files. The only fly in the ointment is that <a href="http://blogs.msdn.com/windowssdk/archive/2010/04/07/coming-soon-win-sdk-for-windows-7-and-net-4.aspx" target="_blank">Windows SDK is yet to be released</a> (with target date somewhere in June 2010), so for now to build your C++ projects you will need to have Visual Studio installed.</p> <p><a href="http://blogs.msdn.com/eugenez/archive/2010/05/04/what-do-you-need-to-build-vc-in-2010.aspx" target="_blank">Mirror from my MSDN blog</a></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-60058254184033904492010-05-03T23:37:00.001-07:002010-05-03T23:37:45.237-07:00MSBuild resources reference page<p>.NET 4.0 and MSBuild 4.0 are out there now, but resources are still ramping up. So as a quick time saver, I have created the biggest most complete no-nonsense 100% satisfaction guarantee <a href="http://blogs.msdn.com/eugenez/pages/msbuild-resources.aspx" target="_blank"><strong>MSBuild resources reference page</strong></a>. :) That will be updated as newer content comes online. Enjoy!</p> <p><a href="http://blogs.msdn.com/eugenez/archive/2010/05/04/msbuild-resources-reference-page.aspx" target="_blank">Mirror from my MSDN blog</a>.</p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-54993577662457739012010-04-18T21:47:00.001-07:002010-04-18T21:50:20.516-07:00StyleCop Check-in Policy updated (v 1.3)<p>I have updated TFS check-in policy for <a href="http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx" target="_blank">StyleCop 4.3.3.0</a> and also compiled a version for TFS 2010 (now that it has RTM’ed).</p> <p>The sources and MSIs (one for TFS 2008 and one for TFS 2010) are now available at <a href="http://code.msdn.microsoft.com/StyleCopPolicy" target="_blank"><strong>MSDN Code Gallery</strong></a>.</p> <p>Enjoy!</p> <p><a href="http://blogs.msdn.com/eugenez/archive/2010/04/19/stylecop-check-in-policy-updated.aspx" target="_blank"><strong>Mirror from my MSDN blog</strong></a></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com1tag:blogger.com,1999:blog-26229238.post-2385195644463084152010-04-17T00:13:00.001-07:002010-04-17T00:14:00.163-07:00TFS2010: Connecting using TFS 2008 object model<p>Can you connect to TFS 2010 server using 2008 client? Sure you can! There are couple of gotchas to be aware of, specifically you’d be better off installing an update for TFS 2008; if you do not the following message comes up:</p> <p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://www.attrice.info/images/blog/Tfs2008ForwardUpdate.png"> </p> <p><strong><a href="http://blogs.msdn.com/granth" target="_blank">Grant Holliday</a></strong> wrote very <a href="http://blogs.msdn.com/granth/archive/2009/12/07/tfs2010-older-clients-not-able-to-connect.aspx" target="_blank"><strong>detailed post</strong></a> on what needs to be installed and what to do if for some reason you cannot install the update.</p> <p>However, I wanted to mention this in context of custom tools that use object model. While connecting to TFS 2010 with Team Explorer 2008 will produce the message above (and will require extra steps such as update installation to get TE working), the message won’t appear for your custom tools. In fact, if the connection to TFS 2010 is defined in registry you will connect and may not know the difference from inside of your tool.</p> <p>Thus if you have custom tools using 2008 OM connecting to TFS 2010, it is your responsibility that the update gets installed correctly on machines with the tools. </p> <p><a href="http://blogs.msdn.com/eugenez/archive/2010/04/17/tfs2010-connecting-using-tfs-2008-object-model.aspx" target="_blank">Mirror from my MSDN blog</a></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-79241996051982068092010-04-15T23:03:00.001-07:002010-04-15T23:03:18.670-07:00TFS2010: Who am I? (getting logged in user info)<p>When you login to TFS using object model, sometimes it may be useful to get information about logged in user (such as domain, account, email etc.).</p> <p>In TFS 2008 object model, one would get the logged in user display name, domain name, account name and email as following:</p> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af"> 1</span> <span style="color: #2b91af">TeamFoundationServer</span> server = <span style="color: blue">new</span> <span style="color: #2b91af">TeamFoundationServer</span>(<span style="color: #a31515">"tfsserver"</span>, </p> <p style="margin: 0px"><span style="color: #2b91af"> 2</span> <span style="color: blue">new</span> System.Net.<span style="color: #2b91af">NetworkCredential</span>(<span style="color: #a31515">"domain_name\\user_name"</span>, <span style="color: #a31515">"pwd"</span>));</p> <p style="margin: 0px"><span style="color: #2b91af"> 3</span> server.EnsureAuthenticated();</p> <p style="margin: 0px"><span style="color: #2b91af"> 4</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 5</span> <span style="color: #2b91af">Console</span>.Write(server.AuthenticatedUserDisplayName);</p> <p style="margin: 0px"><span style="color: #2b91af"> 6</span> <span style="color: green">// returns user's display name </span></p> <p style="margin: 0px"><span style="color: #2b91af"> 7</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 8</span> <span style="color: #2b91af">Console</span>.Write(server.AuthenticatedUserName);</p> <p style="margin: 0px"><span style="color: #2b91af"> 9</span> <span style="color: green">// returns domain_name\user_name</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 10</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 11</span> <span style="color: green">// AuthenticatedUserIdentity is Microsoft.TeamFoundation.Server.Identity</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 12</span> <span style="color: #2b91af">Console</span>.Write(server.AuthenticatedUserIdentity.Domain + <span style="color: #a31515">"\\"</span> +</p> <p style="margin: 0px"><span style="color: #2b91af"> 13</span> server.AuthenticatedUserIdentity.AccountName);</p> <p style="margin: 0px"><span style="color: #2b91af"> 14</span> <span style="color: green">// returns domain_name\user_name</span><span style="color: #2b91af"> </span></p> <p style="margin: 0px"><span style="color: #2b91af"> 15</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 16</span> <span style="color: #2b91af">Console</span>.Write(server.AuthenticatedUserIdentity.MailAddress);<span style="color: #2b91af"> </span></p> <p style="margin: 0px"><span style="color: #2b91af"> 17</span> <span style="color: green">// returns user’s email<span style="color: #2b91af"> </span></span></p></div> <p>In TFS 2010 OM, <em>AuthenticatedUserDisplayName</em>, <em>AuthenticatedUserName</em> and <em>AuthenticatedUserIdentity</em> properties are all deprecated, and instead <em>AuthorizedIdentity</em> property is introduced on Team Project Collection class. The code below makes use of the new property to retrieve logged in user information:</p> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af"> 1</span> <span style="color: #2b91af">TfsTeamProjectCollection</span> collection = <span style="color: blue">new</span> <span style="color: #2b91af">TfsTeamProjectCollection</span>(</p> <p style="margin: 0px"><span style="color: #2b91af"> 2</span> <span style="color: blue">new</span> <span style="color: #2b91af">Uri(</span><span style="color: #a31515"><a href="http://tfsserver:8080/tfs/defaultcollection">http://tfsserver:8080/tfs/defaultcollection</a></span>, </p> <p style="margin: 0px"><span style="color: #2b91af"> 3</span> <span style="color: blue">new</span> System.Net.<span style="color: #2b91af">NetworkCredential</span>(<span style="color: #a31515">"domain_name\\user_name"</span>, <span style="color: #a31515">"pwd"</span>));</p> <p style="margin: 0px"><span style="color: #2b91af"> 4</span> collection.EnsureAuthenticated();</p> <p style="margin: 0px"><span style="color: #2b91af"> 5</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 6</span> <span style="color: green">// AuthorizedIdentity is Microsoft.TeamFoundation.Framework.Client.TeamFoundationIdentity</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 7</span> <span style="color: #2b91af">Console</span>.Write(collection.AuthorizedIdentity.DisplayName);</p> <p style="margin: 0px"><span style="color: #2b91af"> 8</span> <span style="color: green">// returns user's display name </span></p> <p style="margin: 0px"><span style="color: #2b91af"> 9</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 10</span> <span style="color: #2b91af">Console</span>.Write(collection.AuthorizedIdentity.GetAttribute(<span style="color: #a31515">"Domain"</span>, <span style="color: #a31515">"default"</span>));</p> <p style="margin: 0px"><span style="color: #2b91af"> 11</span> <span style="color: green">// returns domain_name</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 12</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 13</span> <span style="color: #2b91af">Console</span>.Write(collection.AuthorizedIdentity.GetAttribute(<span style="color: #a31515">"Account"</span>, <span style="color: #a31515">"default"</span>));</p> <p style="margin: 0px"><span style="color: #2b91af"> 14</span> <span style="color: green">// returns user_name</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 15</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 16</span> <span style="color: #2b91af">Console</span>.Write(collection.AuthorizedIdentity.GetAttribute(<span style="color: #a31515">"Mail"</span>, <span style="color: #a31515">"default"</span>));<span style="color: #2b91af"> </span></p> <p style="margin: 0px"><span style="color: #2b91af"> 17</span> <span style="color: green">// returns user’s email</span></p></div> <p><a href="http://blogs.msdn.com/eugenez/archive/2010/04/16/tfs2010-who-am-i-getting-logged-in-user-info.aspx" target="_blank"><strong>Mirror from my MSDN blog</strong></a></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-11152621553568371562010-04-13T23:45:00.001-07:002010-04-13T23:45:30.724-07:00TFS2010: Getting connected in new object model<p>When starting up with TFS 2010 object model, there are few gotchas to be aware of (especially if you did coding for TFS OM 2005/2008 in the past). See my <a href="http://blogs.msdn.com/eugenez/archive/2010/01/09/tfs2010-and-there-is-an-sdk-for-that.aspx" target="_blank"><strong>previous post</strong></a> for high-level details:</p> <p>In 2008 one would establish connection to TFS as follows</p> <div style="font-size: 8pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af"> 1</span> <span style="color: blue">string</span>[] servers = <span style="color: #2b91af">RegisteredServers</span>.GetServerNames();</p> <p style="margin: 0px"><span style="color: #2b91af"> 2</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 3</span> <span style="color: green">// select one of the servers (in real life combo box?)</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 4</span> <span style="color: blue">string</span> serverName = servers[0];</p> <p style="margin: 0px"><span style="color: #2b91af"> 5</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 6</span> <span style="color: #2b91af">TeamFoundationServer</span> server = <span style="color: blue">new</span> <span style="color: #2b91af">TeamFoundationServer</span>(serverName, </p> <p style="margin: 0px"><span style="color: #2b91af"> 7</span> <span style="color: blue">new</span> System.Net.<span style="color: #2b91af">NetworkCredential</span>(userName, password));</p> <p style="margin: 0px"><span style="color: #2b91af"> 8</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 9</span> server.EnsureAuthenticated();</p></div> <p>In Team Foundation Server 2010 the code becomes:</p> <div style="font-size: 8pt; background: white; color: black; font-family: courier new"> <p style="margin: 0px"><span style="color: #2b91af"> 1</span> <span style="color: #2b91af">RegisteredTfsCollection</span>[] projects = <span style="color: #2b91af">RegisteredTfsConnections</span>.GetProjectCollections();</p> <p style="margin: 0px"><span style="color: #2b91af"> 2</span> <span style="color: #2b91af">List<</span><span style="color: blue">string</span>> servers = <span style="color: blue">new</span> <span style="color: #2b91af">List<</span><span style="color: blue">string</span>>();</p> <p style="margin: 0px"><span style="color: #2b91af"> 3</span> <span style="color: blue">foreach</span> (<span style="color: #2b91af">RegisteredTfsCollection</span> collection <span style="color: blue">in</span> collections)</p> <p style="margin: 0px"><span style="color: #2b91af"> 4</span> {</p> <p style="margin: 0px"><span style="color: #2b91af"> 5</span> <span style="color: blue">if</span> (!collection.Offline)</p> <p style="margin: 0px"><span style="color: #2b91af"> 6</span> results.Add(collection.Uri.ToString());</p> <p style="margin: 0px"><span style="color: #2b91af"> 7</span> }</p> <p style="margin: 0px"><span style="color: #2b91af"> 8</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 9</span> <span style="color: green">// select one of the servers (in real life combo box?)</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 10</span> <span style="color: blue">string</span> serverName = servers[0];</p> <p style="margin: 0px"><span style="color: #2b91af"> 11</span></p> <p style="margin: 0px"><span style="color: #2b91af"> 12</span> <span style="color: #2b91af">TfsTeamProjectCollection</span> server = <span style="color: blue">new</span> <span style="color: #2b91af">TfsTeamProjectCollection</span>(<span style="color: blue">new</span> <span style="color: #2b91af">Uri</span>(tfsServerName), </p> <p style="margin: 0px"><span style="color: #2b91af"> 13</span> <span style="color: blue">new</span> System.Net.<span style="color: #2b91af">NetworkCredential</span>(userName, password));</p> <p style="margin: 0px"><span style="color: #2b91af"> 14</span> </p> <p style="margin: 0px"><span style="color: #2b91af"> 15</span> server.EnsureAuthenticated();</p></div> <p>Should be no big surprises considering the changes in 2010 – one server w\projects became multiple projects collections. One thing to be aware of is the change in the arguments you pass to constructor of <em>TfsTeamProjectCollection</em>; in 2005/2008 one was able to pass server name (i.e. “<em>tfserver</em>”) as retrieved by using <em>RegisteredServers</em> class. In 2010 that becomes impossible since the server may contain multiple collections; thus you have to pass full URI (e.g. “<em>http://tfsserver:8080/tfs/DefaultCollection</em>”).</p> <p><strong><a href="http://blogs.msdn.com/eugenez/archive/2010/04/14/tfs2010-getting-connected-in-new-object-model.aspx" target="_blank">Mirror from my MSDN blog</a></strong></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-42894605981854291832010-01-09T00:23:00.001-08:002010-01-09T00:25:06.338-08:00TFS2010: And the tools are there too!<p>In my previous post, I was talking about using making your custom tools ready for TFS 2010 with SDK. But what about other tools, say you? And not to worry, here you go (and I included not only TFS but VS tools as well):</p> <ul> <li><a href="http://visualstudiogallery.msdn.microsoft.com/en-us/0e69a28f-020c-488b-80b3-f4c89a20621d"><strong>Team Foundation Server Power Tools for 2010 Beta 2</strong></a> are available <li><a href="http://visualstudiogallery.msdn.microsoft.com/en-us/f959ea32-5ac3-424a-a709-5001a158ebe8"><strong>TFS MSSCCI provider for 2010 Beta 2</strong></a> is available <li><a href="http://blogs.msdn.com/sourceanalysis/archive/2010/01/04/stylecop-for-visual-studio-2010.aspx"><strong>StyleCop for VS 2010 Beta 2</strong></a> is available <li><a href="http://weblogs.asp.net/nunitaddin/archive/2009/10/27/testdriven-net-3-0-alpha-support-for-visual-studio-2010-beta-2.aspx"><strong>TestDriven.Net 3.0 Alpha for VS 2010 Beta 2</strong></a> is available <li><a href="http://www.attrice.info/blog/2010/01/03/team-foundation-sidekicks-2-4-release-2/"><strong>Team Foundation Sidekicks for 2010 Beta 2</strong></a> are available </li></ul> <p>Enjoy!</p> <p><a href="http://blogs.msdn.com/eugenez/archive/2010/01/09/tfs2010-and-the-tools-are-there-too.aspx"><strong>Mirror from my MSDN blog</strong></a></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-42457741068043245062010-01-08T23:58:00.001-08:002010-01-09T00:13:23.461-08:00TFS2010: And there is an SDK for that!<p>So may be now you have finally got your hands on Beta 2 of TFS 2010 (for example, using one of the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9eb65c97-29c9-4d05-ae45-73d22ad4b86e&displaylang=en">excellent VHDs</a> prepared by <a href="http://www.mcwtech.com/blogs/brianr/post/Happy-Holidays-and-look-what-Santae28099s-brought-2009-edition.aspx">Brian Randell</a>) and it is time to see how your custom applications written for 2008 fare (do not worry, you will be fine!). Here are few notes that should make your life easier.</p> <p>1. Starting with Visual Studio 2010, SDK does not include samples and documentation. TFS SDK is located on <a href="http://code.msdn.microsoft.com/TfsSdk"><strong>Code Gallery</strong></a>, separately from VS SDK documentation.</p> <p>2. The backward compatibility of the APIs in 2010 is very good; so if you had an application written against TFS 2008 OM the chances are it will compile and work. You will still have to change references to assemblies to 2010 versions. Additional things to keep in mind</p> <ul> <li>You might want to know what version of the server you are working against. <a href="http://blogs.msdn.com/taylaf/archive/2010/01/05/determining-the-tfs-server-version-using-client-apis.aspx"><strong>This helpful post</strong></a> from <a href="http://blogs.msdn.com/taylaf">Taylor Lafrinere</a> provides the necessary details <li>While 2010 Beta 2 APIs signatures are mostly identical to those in 2008, RC and RTM will have breaking changes that might require changes to your code. <a href="http://blogs.msdn.com/granth/archive/2009/12/07/tfs2010-object-model-api-changes-after-beta-2.aspx"><strong>This post</strong></a> from <a href="http://blogs.msdn.com/granth">Grant Holliday</a> summarizes the changes <li>There were some classes that were made internal, and some classes that were reshuffled to different DLLs. You will know about those when you custom application does not compile <li>If you have used reflection, you are on your own. The chances are that you will have to do some more reflection in order to make it work in 2010 :) </li></ul> <p>3. New functionality available in 2010 is mostly related to the new features introduced, viz.</p> <ul> <li>Project collections (see <a href="http://blogs.msdn.com/granth/archive/2009/12/07/tfs2010-object-model-api-changes-after-beta-2.aspx">same post</a> from Grant for the summary) <li>Changes to version control (branches etc. - Microsoft.TeamFoundation.VersionControl.Client namespace has it all; also see an <b>update</b> below) <li>Hierarchical work items (see <a href="http://www.ewaldhofman.nl/post/2009/12/10/TFS-SDK-2010-e28093-Part-4-Create-a-new-User-Story-with-the-implementation-(Tasks)-and-test-scenarios-(Test-Case).aspx"><strong>a primer</strong></a> on the API from <a href="http://www.ewaldhofman.nl">Ewald Hofman</a>) <li>Test related work items in MTLM (see <a href="http://www.ewaldhofman.nl/post/2009/12/10/TFS-SDK-2010-e28093-Part-5-e28093-Create-a-new-Test-Case-work-item.aspx">another primer</a><strong></strong> from <a href="http://www.ewaldhofman.nl">Ewald</a>) </li></ul> <p>So be adventurous and take Beta 2 for a ride! Oh, and most probably for a while you will have heterogeneous environment with 2008, 2010 or may be even 2005 clients etc. This post from WIT team blog will help in figuring out what will and will not work: <a href="http://blogs.msdn.com/teams_wit_tools/archive/2009/10/19/compatibility-matrix-for-2010-beta-2-team-foundation-server-to-team-explorer-2008-and-2005.aspx">TFS Server 2010 Beta 2 vs. 2005/2008 TFS client</a> </p> <p>And should you be in a tight corner (since currently existing documentation is somewhat meager) you might want to head to <a href="http://social.msdn.microsoft.com/Forums/en-US/tfsprerelease/threads"><strong>TFS 2010 Beta 2 MSDN forum</strong></a>.</p><p><a href="http://blogs.msdn.com/eugenez/archive/2010/01/09/tfs2010-and-there-is-an-sdk-for-that.aspx"><strong>Mirror from my MSDN blog</strong></a></p><P><STRONG>Update:</STRONG> There is a good summary on Version Control API changes (that I forgot to mention) at <A class="" href="/michalma" mce_href="/michalma">Michal Malecki</A> blog: <A class="" href="/michalma/archive/2009/06/15/version-control-api-changes-in-tfs-2010-part-i.aspx" mce_href="/michalma/archive/2009/06/15/version-control-api-changes-in-tfs-2010-part-i.aspx"><STRONG>part 1</STRONG></A> and <A class="" href="/michalma/archive/2009/06/16/version-control-api-changes-in-tfs-2010-part-ii.aspx" mce_href="/michalma/archive/2009/06/16/version-control-api-changes-in-tfs-2010-part-ii.aspx"><STRONG>part 2</STRONG></A></P>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-37467176129428191392009-11-12T23:25:00.001-08:002009-11-12T23:28:11.194-08:00TFS Destroy – friend or foe?<p>While everyone else is blogging about <a href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx"><strong>VS 2010 Beta 2</strong></a>, I thought it still may be worth publishing this post that talks about VS 2008 behavior (yes, the <em>old </em>release ;).</p> <p>One of the features missing in VS 2005 and added in VS 2008 was <a href="http://msdn.microsoft.com/en-us/library/bb386005.aspx"><strong>destroy command</strong></a>; people wanted to get rid of the source control artifacts for good and were unable to do so.</p> <p>Interestingly, once the command become available it did not become too popular. Come think of it, there are very few cases where one can afford permanently deleting data; after all, source code is most valuable asset any software company has.</p> <p>But should you decide on using destroy command, there are few important points to keep in mind:</p> <p>1. Before executing <em>destroy</em> command, you might consider deleting item first. Leaving the item in “quarantine” while deleted for a week or so makes sure nobody uses the item (for example, as part of automated build) will miss it once it is completely gone. And once you are ready to delete it, use <strong>/preview</strong> switch to double check what files you are going to permanently wiped out</p> <p>2. If you use destroy, destroy <em>all</em> versions of the item and do not fall for <strong>/keephistory</strong> option (with or without <strong>/stopat</strong> flag): </p> <div style="font-weight: bold; color: white; font-family: courier; background-color: black"><pre><p>tf destroy $/Project/FolderOldName;C123 /stopat:C156 /keephistory</p></pre></div><p>This option would destroy all (or some as in example above) versions of the item while retaining item’s history. It may be tempting to clean up database from old revisions leaving the history intact; the problem with this usage is that you will not be able to distinguish the revisions deleted when viewing the item’s history. That may lead to the following message when trying to view seemingly valid history:</p><p><img src="http://www.attrice.info/images/blog/destroy_keephistory.png"></p><p>3. When you execute destroy command, data is not deleted from DB immediately. There is <strong>TFSVersionControl Administration</strong> <strong>job</strong> running on TFS Data Tier at scheduled interval that takes care of actual DB purging. You can trigger the job run immediately by using <strong>/startcleanup </strong>option (or running on SQL Server manually). The job does not take care of cleaning up the warehouse, it will get updated at warehouse processing scheduled intervals.</p><p>On a personal note, my usage of destroy was limited to removing sample & test TFS projects content; I never was able to get enough justification to permanently delete source code, however unused it may be. But your mileage may differ – if you do decide to get into destruction business, there are couple of very useful resources on TFS <em>destroy</em> that are not immediately discoverable through simple search; <a href="http://msdn.microsoft.com/en-us/library/bb399141.aspx"><strong>summary MSDN article</strong></a> and screencast <a href="http://msdn.microsoft.com/en-us/teamsystem/bb975151.aspx" target="_blank"><strong>How Do I: Use the TF Destroy Command in Visual Studio Team System 2008? </strong></a>by Richard Hundhausen. </p><p><a href="http://blogs.msdn.com/eugenez/archive/2009/11/13/tfs-destroy-friend-or-foe.aspx"><strong>Mirror from my MSDN blog</strong></a></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-30643084305420471682009-11-06T22:18:00.001-08:002009-11-06T22:18:04.384-08:00StyleCop checkin policy updated for StyleCop 4.3.2.1<p>StyleCop check-in policy was updated for the <a href="http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx?ReleaseId=1425">latest build of StyleCop available (<strong>4.3.2.1</strong>)</a>. The only change in this drop is newer StyleCop reference assemblies. <p>Version 1.2.2 of the policy is available as <a href="http://www.attrice.info/downloads/StyleCopCheckinPolicy_1.2.2.msi"><strong>MSI installer</strong></a> (available <strong>AS IS</strong>). <p><strong>Related posts:</strong><br>- <a href="http://teamfoundation.blogspot.com/2009/07/updated-stylecop-checkin-policy-v121.html">Updated StyleCop Checkin Policy (v1.2.1</a>)<br>- <a href="http://teamfoundation.blogspot.com/2008/10/stylecop-43-checkin-policy-version-12.html">StyleCop 4.3 Checkin Policy version 1.2</a><br>- <a href="http://teamfoundation.blogspot.com/2008/09/stylecop-43-checkin-policy-available.html">StyleCop 4.3 Checkin Policy available</a><br>- <a href="http://teamfoundation.blogspot.com/2008/08/get-new-version-of-stylecop-while-it-is.html">Get New Version Of StyleCop</a><br>- <a href="http://teamfoundation.blogspot.com/2008/07/stylecop-confusion-cleared.html">StyleCop Confusion Cleared</a><br>- <a href="http://teamfoundation.blogspot.com/2008/05/source-analysis-for-c-checkin-policy.html">Source Analysis For C# Checkin Policy</a><br>- <a href="http://teamfoundation.blogspot.com/2008/06/source-analysis-for-c-custom-rules-and.html">Source Analysis For C#: Custom Rules And More</a><br>- <a href="http://teamfoundation.blogspot.com/2008/05/beautify-your-c-code-with-microsoft.html">Beautify Your Code With Microsoft Source Analysis</a></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-23309024102506627392009-08-17T00:07:00.001-07:002009-08-17T00:07:12.859-07:00Disposing of checkin policy<p>Recently while I was fixing up <a href="http://teamfoundation.blogspot.com/2009/07/updated-stylecop-checkin-policy-v121.html" target="_blank"><strong>StyleCop checkin policy</strong></a>, I came across one small not-so-obvious snippet of knowledge worthwhile to share. </p> <p>Any custom checkin policy inherits from <strong><a href="http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.policybase(VS.80).aspx" target="_blank">PolicyBase</a></strong>, which in turn implements <strong>IDisposable</strong>. Meaning – if you need to clean up after yourself in your custom policy, <strong>Dispose</strong> method is the place for that.</p> <p>So in StyleCop policy, I do a lot of Visual Studio related stuff and thus I thought I’d dispose of VS extensibility objects in Dispose method.</p> <p>And here where non-obvious stuff starts. The policy is loaded in either of those cases:</p> <ul> <li>Project Source Control configuration (through menu Team->Team Project Settings->Source Control)</li> <li>Right-clicking in Solution Explorer and invoking “Check In…” menu</li> <li>Invoking “View Pending Changes” toolwindow </li></ul> <p>While the first case is not very interesting (no pending changes will be evaluated in configuration), two other cases are important. </p> <p>In case of “Check In …”, “Check In” modal window is displayed (the policy is loaded), and when window is closed, custom policy class is unloaded and Dispose called. However, in case of “View Pending Changes” toolwindow the policy is loaded once when window is first created, and Dispose will be called only when Visual Studio is closed or TFS server connection is closed. That means you probably should not hold on any expensive resources until Dispose.</p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-90924730576712366292009-08-12T00:51:00.001-07:002009-08-12T00:51:18.860-07:00New check-in policy for VSS fans: keywords expanded<p>One of the much-talked-about missing features of TFS is the keyword expansion feature. You know, the ability to place the template in the beginning of every single file and then have every revision tracked in the body of the file (in addition to tracking in source control history, that is).</p> <p>Personally, I am not a huge fan of the feature – mostly because the usefulness of the feature limited by the following factors</p> <ol> <li>The comments to check in still have to be detailed (if the comments are crappy, you get a lot of garbage in the file that adds nothing) <li>If the file gets branched a lot, the revision history tend to get muddy and not to reflect the branching history very adequately <li>If the code churn is great, you might get 100 lines of code adorned with 400 lines of revisions history (yes, I actually seen this) </li></ol> <p>So I am of the opinion that all of the above is the function of source control and if your source control is not good enough for tracking history of changes – that ain’t good source control :) However, for some folks ability to have history of changes contained in the same file outweighs the disadvantages. And these folks were pretty vocal, so vocal that <a href="http://blogs.msdn.com/buckh" target="_blank">Buck Hodges</a> stopped one stop short of writing actual solution and provided the <a href="http://blogs.msdn.com/buckh/archive/2007/07/07/keyword-expansion-in-tfs.aspx" target="_blank">verbal recipe</a> for writing one, using check-in policy as a workaround (since keywords expansion is not making it into official product).</p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p>And voila! Two years after this post was published, there appears <a href="http://blog.kalmbach-software.de/2009/07/24/tfs-automatically-insert-check-in-comments-into-source-code/" target="_blank"><strong>TFS keyword expansion checkin</strong></a> policy, written by <a href="http://blog.kalmbach-software.de/" target="_blank"><strong>Jochen Kalmbach</strong></a>. Jochen also published the policy on <a href="http://www.codeplex.com" target="_blank">CodePlex</a> site, under the name of <a href="http://logsubstpol.codeplex.com/" target="_blank"><strong>LogSubstPol</strong></a>.</p> <p>I did a short test drive of the policy, and it does work as advertised, in three simple steps:</p> <ol> <li><strong>Install</strong> the policy (currently using batch script) <li><strong>Add</strong> the policy to your Team project and <strong>configure</strong> the format of the keywords string <li><strong>Add keyword ($log$ etc.) monikers</strong> to the file modified prior to check in </li></ol> <p>Once all of that done (and steps 1 & 2 are once per project, step 3 once per file step), as you check in you will see the revision history being updated and checked in as part of the file.</p> <p>While the policy is awesome, there are few things to be aware of. </p> <ul> <li>As the policy requires you to supply the comment, it effectively replaces “Changeset Comments Policy”, so if you have it defined for Team project you might want to remove it <li>Configuration dialog for the policy is somewhat complex, so read the documentation first (<a href="http://logsubstpol.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=31345#DownloadId=78619" target="_blank">supplied PDF</a> is real good) <li>If you evaluate the policy but decide not to check in, due to limitations of the checkin policy mechanism the keywords in the file will get expanded anyway <li>As the files are updated by the policy, VS will display the message “The file has been modified outside of the source editor” (as policy touches it right before check in). That again may be limitation of the checkin policy mechanism for keyword expansion (but perhaps can be mitigated with some creative VSX tweaking) </li></ul> <p>But regardless of these small thingies, the policy is mighty useful and it fills the big gap for those accustomed to keyword expansion. Big kudos to <a href="http://blog.kalmbach-software.de/" target="_blank"><strong>Jochen</strong></a> for creating the policy!</p> <p><a href="http://blogs.msdn.com/eugenez/archive/2009/08/12/new-check-in-policy-for-vss-fans-keywords-expanded.aspx" target="_blank">Mirror from MSDN blog</a></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-21376239648180826912009-07-25T00:29:00.001-07:002009-07-25T00:29:44.672-07:00Updated StyleCop Checkin Policy (v1.2.1)<p>After countless nugdes I have updated StyleCop check-in policy for <a href="http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx?ReleaseId=1425" target="_blank">newest build of StyleCop available (<strong>4.3.1.3</strong>)</a>. While at it, I was able to incorporate a few bug fixes and add improvements.</p> <p>Version 1.2.1 of the policy is available as <a href="http://www.attrice.info/downloads/StyleCopCheckinPolicy_1.2.1.msi" target="_blank"><strong>MSI installer</strong></a> or as <a href="http://www.attrice.info/downloads/StyleCopCheckinPolicy_1.2.1.zip" target="_blank"><strong>zipped source code</strong></a> (available <strong>AS IS</strong>).</p> <p>Bugs fixed are:</p> <ul> <li>Solution containing projects with same Name is not evaluated correctly (keying schema is now by Project VS object instead of Name) <li>Same file appearing in different projects causes policy exception <li>C# web site projects are now supported</li></ul> <p>For the last two items, huge thanks to <a href="http://clem-it.blogspot.com/" target="_blank"><strong>Clement Bouillier</strong></a> for bringing them to my attention.</p> <p>Additionally, I have added pretty neat feature (in my opinion) to improve the navigation for the errors found by the policy. When policy is evaluated, now any violation found is added both to <strong>Checkin</strong> dialog and to Visual Studio <strong>Error List</strong> pane. Thus you can review the violations in the form similar to non-policy StyleCop violations. Additionally, clicking on policy violation either in Checkin window or Error List pane now will bring up the file and the line the violation is found in.</p> <p>Policy violations are cleared from Error List pane when the policy is re-evaluated or on project build.</p> <p>If you encounter any issue with the new drop, please make sure to leave a comment (and I promise to handle the issues promptly this time).</p> <p>And while at StyleCop topick, I’d like to point to an excellent project driven by <a href="http://blogs.conchango.com/howardvanrooijen/" target="_blank">Howard Van Rooijen</a> – <a href="http://stylecopforresharper.codeplex.com/" target="_blank"><strong>StyleCop integration with ReSharper</strong></a>. If you use both, make sure you get the latest drop from Codeplex.</p> <p><strong>Related posts:</strong><br>- <a href="http://teamfoundation.blogspot.com/2008/10/stylecop-43-checkin-policy-version-12.html" target="_blank">StyleCop 4.3 Checkin Policy version 1.2</a><br>- <a href="http://teamfoundation.blogspot.com/2008/09/stylecop-43-checkin-policy-available.html" target="_blank">StyleCop 4.3 Checkin Policy available</a><br>- <a href="http://teamfoundation.blogspot.com/2008/08/get-new-version-of-stylecop-while-it-is.html" target="_blank">Get New Version Of StyleCop</a><br>- <a href="http://teamfoundation.blogspot.com/2008/07/stylecop-confusion-cleared.html" target="_blank">StyleCop Confusion Cleared</a><br>- <a href="http://teamfoundation.blogspot.com/2008/05/source-analysis-for-c-checkin-policy.html" target="_blank">Source Analysis For C# Checkin Policy</a><br>- <a href="http://teamfoundation.blogspot.com/2008/06/source-analysis-for-c-custom-rules-and.html" target="_blank">Source Analysis For C#: Custom Rules And More</a><br>- <a href="http://teamfoundation.blogspot.com/2008/05/beautify-your-c-code-with-microsoft.html" target="_blank">Beautify Your Code With Microsoft Source Analysis</a></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com2tag:blogger.com,1999:blog-26229238.post-39679157257444119062009-05-09T23:20:00.001-07:002009-05-09T23:22:43.423-07:00Work Item customization tidbits: custom controls (part 14 of X)<p>In <a href="http://blogs.msdn.com/eugenez/archive/2009/04/12/work-item-customization-tidbits-part-12-of-x.aspx">one of my previous posts</a> I mentioned that I consider custom controls in WI one of the most complex types of customization to implement. Since I got asked related question let me expand on the topic.</p> <p>Custom work item controls provide a way to implement truly specialized behavior for WI, by writing managed class conforming to well-known interface. Sometimes it may be very tempting to write the logic in C# instead of learning intricacies of WIT XML syntax (and sometimes there is no alternative).</p> <p>Why is this type of customization so complex? Because you have to code, integrate, test & deploy additional component, and that in a way different from other WIT customizations in XML. And not only that - consider the following important drawbacks custom control has:</p> <ul> <li>Additional version of the control needs to be implemented if you want to support the same logic in Web UI as in Visual Studio environment <li>Custom control is not supported when editing WI in Excel (or MS Project) <li>Custom control assembly needs to be deployed on every client machine (or on Web server if the custom control targets Web UI) </li></ul> <p>All of the above means that custom WIT control should be implemented only when you have absolutely no other answer to outstanding business requirement.</p> <p>For further information there is <a href="http://ognjenbajic.com/blog/2007/09/custom-work-item-controls.html">extensive summary article</a> on the topic by Ognjen Bajic. Another <a href="http://msmvps.com/blogs/vstsblog/archive/2007/08/29/creating-a-separate-work-item-form-layout-for-web-access.aspx">interesting article by Neno Loje</a> provides additional details on customizing Work Item types depending on the client (WinForms or Web), which is very relevant for custom controls.</p> <p><strong>Related posts: </strong><br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2009/05/work-item-customization-tidbits-limits.html">limits of complexity (part 13)</a> <br>- Work Item Customization: <a href="http://blogs.msdn.com/eugenez/archive/2009/04/12/work-item-customization-tidbits-part-12-of-x.aspx" mce_href="http://teamfoundation.blogspot.com/2009/04/work-item-customization-tidbits-part-12.html">estimate the effort (part 12)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits_23.html" mce_href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits_23.html">customization and global lists (part 11)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits.html" mce_href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits.html">customization process (part 10)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits-tools.html" mce_href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits-tools.html">customization tools (part 9)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-special.html" mce_href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-special.html">special fields (part 8)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-fields.html" mce_href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-fields.html">fields maintenance (part 7)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-global.html" mce_href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-global.html">global lists (part 6)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-system.html" mce_href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-system.html">system fields (part 5)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-user.html" mce_href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-user.html">user interface (part 4)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-state.html" mce_href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-state.html">state transitions (part 3)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits.html" mce_href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits.html">conditional field behavior (part 2)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/05/work-item-customization-tidbits-part-1.html" mce_href="http://teamfoundation.blogspot.com/2008/05/work-item-customization-tidbits-part-1.html">fields definition (part 1)</a></p> <p><a href="http://blogs.msdn.com/eugenez/archive/2009/05/10/work-item-customization-tidbits-custom-controls-part-14-of-x.aspx">Mirror from MSDN blog</a></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-85279474091724730542009-05-06T23:19:00.001-07:002009-05-06T23:22:46.984-07:00Work Item customization tidbits: limits of complexity (part 13 of X)<p>Today I’d like to talk about WIT customization recommendations that will mostly become applicable as your custom Work Item types increase in complexity.</p> <p><strong>Keep the number of custom fields limited (per TFS server)</strong></p> <p>One can have a maximum of 1024 fields defined per Team Foundation Server (as every field is represented by a column in SQL Server table, the limitation is that of maximum number of columns per table in SQL Server). That means that if you <a href="http://teamfoundation.blogspot.com/2008/05/work-item-customization-tidbits-part-1.html">define new fields</a> (FIELD with the distinct <em>refname</em> attribute) per WIT, you can easily hit this limit after creating a few complex Work Item types. Once the limit is reached, you have to deal with <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-fields.html">fields maintenance</a> chores (you must delete some of the fields, and to delete them the fields must not be used in any WIT) – not a lot of fun when what you actually tried to achieve was to create new template.</p> <p>How do you prevent this problem from occurring? Reuse is the key here – remember that even though it may look like you define a new field per Work Item type, fields are (precious) server resource; and even if the same field is used in WI you can specify different behavior for the same field in a different WIT.</p> <p><strong>Keep the number of rules limited (per Work Item Type)</strong></p> <p>While you can create multiple rules in WIT, be aware that rules not only affect maintenance complexity (you have to make it work ;), but also affect the performance. So your users may experience less than stellar performance when they create or modify work items. And there is an additional consideration which I will expand upon in the next section, which is called</p> <p><strong>Keep the number of WI types small (per Team project)</strong></p> <p>While there is no hard limit on the number of WIT you can create in one Team project, there is technology limitation (SQL Server again!) on how much complexity one may have per project, with numeric complexity index in this case being defined as <em>[Number of rules in WIT] x [Number of WIT in project]. </em>When you have too many WIT (or few of very complex ones) you may hit a limitation of maximum size of columns in SQL Server statement (65,535). It turns out all rules you define in WIT in Team project are eventually represented as part of real complex SQL statement used for WI validation when changing its data (read more techy details in <a href="http://social.msdn.microsoft.com/Forums/en-US/tfsworkitemtracking/thread/6d74ee4a-7349-44ff-82ca-1e08b1e90c6f">this forum post</a> by <a href="http://blogs.msdn.com/amitgh">Amit Ghosh</a>)</p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p><strong>Keep the number of reportable fields small (per TFS server)</strong></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p>If you are not planning on including the fields into SQL Reporting reports, do not mark fields reportable just for the heck of it, since the reportable fields will propagate into TFS data warehouse and that would add extra in terms of performance and space on your TFS data layer.</p> <p>By the way, to really understand how reporting in TFS works (and how it fits in a big picture) read <a href="http://weblogs.asp.net/vblasberg/archive/2008/06/04/tfs-reporting-architecture-notes.aspx">this excellent post</a> from Vince Blasberg.</p><p>In conclusion, I’d like to highlight once more the importance of having <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits.html">test environment</a> whereto you deploy the potential WIT changes prior to production rollout. Consider the situation where you have just deployed new WIT to a Team project, and as a result the users cannot update any WI in the project. Not a happy place to be, is it?</p> <p><strong>Related posts: </strong><br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2009/04/work-item-customization-tidbits-part-12.html">estimate the effort (part 12)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits_23.html">customization and global lists (part 11)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits.html">customization process (part 10)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits-tools.html">customization tools (part 9)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-special.html">special fields (part 8)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-fields.html">fields maintenance (part 7)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-global.html">global lists (part 6)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-system.html">system fields (part 5)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-user.html">user interface (part 4)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-state.html">state transitions (part 3)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits.html">conditional field behavior (part 2)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/05/work-item-customization-tidbits-part-1.html">fields definition (part 1)</a></p> <p><strong><a href="http://blogs.msdn.com/eugenez/archive/2009/05/07/work-item-customization-tidbits-limits-of-complexity-part-13-of-x.aspx">Mirror on MSDN blog</a></strong></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-79282902338873673012009-05-01T22:17:00.001-07:002009-05-01T22:17:53.232-07:00MSBuild UsingTask gotchas<p>One significant drawback of MSBuild <em><a href="http://msdn.microsoft.com/en-us/library/t41tzex2.aspx"><strong>UsingTask</strong></a></em> element is that you must specify exactly the task name you are importing. That is if the assembly you are importing contains 200 tasks, you will have to import them explicitly one by one. And since you probably do not want to do that in every project you author, usually these 200 tasks will be defined in separate project file that can be imported whenever the tasks are needed.</p> <p>While there is no workaround for specifying the task name, there is another, somewhat easier way to make sure that the tasks are available to your projects without explicitly importing tasks project file. </p> <p>Let’s suppose that you have created MSBuild project file that contains <em>UsingTask</em> statements for all custom tasks you want to have available in your projects. Then if you rename this project file to have <em>.tasks </em>extension and place it in .NET framework folder (e.g. <em>C:\WINDOWS\Microsoft.NET\Framework\v3.5</em> folder for .NET 3.5), the tasks defined there will be available in any project using that version of MSBuild <em><strong>without</strong></em> explicit import statement.</p> <p>This is the mechanism used to make tasks shipped with MSBuild by default available to all projects (look into <em>Microsoft.Common.tasks</em> file to see these tasks defined there). No magick required!</p> <p>By the way, looking into Microsoft.Common.tasks file imparts two additional pieces of wisdom (to quote):</p> <p>“<em>NOTE: Listing a <UsingTask> tag in a *.tasks file like this one rather than in a project or targets file can give a significant <strong>performance advantage</strong> in a large build, because every time a <UsingTask> tag is encountered, it will cause the task to be rediscovered next time the task is used.</em>”</p> <p>Another useful comment relates to the way the tasks are defined in <em>UsingTask</em> – you can either specify fully-qualified task name (including namespaces) or a short one; however, (again, quote from Microsoft.Common.tasks file):</p> <p>“<em>NOTE: Using the fully qualified class name in a <UsingTask> tag is faster than using a partially qualified name.</em>”</p> <p>In addition to performance win, you will also be able to disambiguate the task used. For example, both <a href="http://www.codeplex.com/sdctasks"><strong>SDC tasks</strong></a> and <a href="http://msbuildtasks.tigris.org/"><strong>MSBuild Community tasks</strong></a> packages define a bunch of tasks that differ only by name. In such cases you will have to be explicit both in <em>UsingTask</em> statement and when using the imported task:</p> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"><pre style="margin: 0px"><span style="color: blue"><!--</span><span style="color: green"> Import SDC Sleep task </span><span style="color: blue">--></span></pre><pre style="margin: 0px"><span style="color: blue"><</span><span style="color: #a31515">UsingTask</span><span style="color: blue"> </span><span style="color: red">AssemblyFile</span><span style="color: blue">=</span>"<span style="color: blue">Microsoft.Sdc.Tasks.dll</span>"<span style="color: blue"> </span></pre><pre style="margin: 0px"><span style="color: blue"> </span><span style="color: red">TaskName</span><span style="color: blue">=</span>"<span style="color: blue">Microsoft.Sdc.Tasks.Sleep</span>"<span style="color: blue">/></span></pre><pre style="margin: 0px"><span style="color: blue"><!--</span><span style="color: green"> Import MSBuild Community Sleep task </span><span style="color: blue">--></span></pre><pre style="margin: 0px"><span style="color: blue"><</span><span style="color: #a31515">UsingTask</span><span style="color: blue"> </span><span style="color: red">AssemblyFile</span><span style="color: blue">=</span>"<span style="color: blue">MSBuild.Community.Tasks.dll</span>"<span style="color: blue"> </span></pre><pre style="margin: 0px"><span style="color: blue"> </span><span style="color: red">TaskName</span><span style="color: blue">=</span>"<span style="color: blue">MSBuild.Community.Tasks.Sleep</span>"<span style="color: blue"> /></span></pre><pre style="margin: 0px"><span style="color: blue"><!--</span><span style="color: green"> Use SDC Sleep task, full name to disambiguate </span><span style="color: blue">--></span></pre><pre style="margin: 0px"><span style="color: blue"><</span><span style="color: #a31515">Target</span><span style="color: blue"> </span><span style="color: red">Name</span><span style="color: blue">=</span>"<span style="color: blue">Sleep</span>"<span style="color: blue">></span></pre><pre style="margin: 0px"><span style="color: blue"> <</span><span style="color: #a31515">Microsoft.Sdc.Tasks.Sleep</span><span style="color: blue"> </span><span style="color: red">SleepTimeout</span><span style="color: blue">=</span>"<span style="color: blue">1</span>"<span style="color: blue">/></span></pre><pre style="margin: 0px"><span style="color: blue"></</span><span style="color: #a31515">Target</span><span style="color: blue">></span></pre></div><br /><p><em><a href="http://blogs.msdn.com/eugenez/archive/2009/05/02/msbuild-usingtask-gotchas.aspx">Mirror from MSDN blog</a></em></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com1tag:blogger.com,1999:blog-26229238.post-62308778995719621112009-04-24T22:12:00.001-07:002009-04-24T22:14:08.911-07:00Branching off renamed trunk<p>Recently I got asked a small but unobvious branching question. Suppose you have a folder named <strong>FolderName</strong>, and for some reason you have renamed it to <strong>NewFolderName</strong>. All is well, but now you decided you want to create a branch from that folder, and to branch from the version prior to renaming.</p> <p>Due to the reasons detailed in <a href="http://teamfoundation.blogspot.com/2007/06/move-caveats-i-like-to-move-it-move-it.html"><strong>my older post</strong></a>, you will not be able to use branching UI for the operation. The only way to achieve that is to use <em>tf</em> command-line client <a href="http://msdn.microsoft.com/en-us/library/d73s8b27(VS.80).aspx"><strong>branch</strong></a> command where you will explicitly specify version you branch from and the folder name at that revision </p> <div style="font-weight: bold; color: white; font-family: courier; background-color: black"><pre><p>tf branch /Project/FolderName /Project/Branch /version:C123</p></pre></div><p>Typical mistake people make is to use current item name, <em>NewFolderName </em>instead of the name that existed in the past(i.e. <em>FolderName </em>at the time of changeset 123).</p><p><a href="http://blogs.msdn.com/eugenez/archive/2009/04/25/branching-off-renamed-trunk.aspx"><strong>Mirrored from MSDN blog</strong></a></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-9155825755698626602009-04-11T23:23:00.001-07:002009-05-06T22:58:02.873-07:00Work Item customization tidbits: estimating the effort (part 12 of X)<p style="font-size: 10px">My apologies for a long silence on the subject of the series (due to several <a href="http://teamfoundation.blogspot.com/2009/03/moving-on.html">recent events</a>) but hopefully now am back on the track and I have a long back log :)</p> <p>In my <a href="#posts"><strong>previous posts</strong></a> I have discussed various bits that are important know before taking on Work Item types customization. Today I’d like to talk more about approaching the whole process.</p> <p>I would like to advocate a conservative approach, since in most organizations (at least in my experience) there are limited resources dedicated to customization, users support and maintenance of Work Item types. </p> <p>The easiest way to jump-start the customization process is to use one of the existing templates; I’d recommend stock templates coming with TFS (MSF or CMMI); however, nowadays there are other decent templates available (for example, <a href="http://www.scrumforteamsystem.com/en/default.aspx">Conchango Scrum</a> is well known and widely used). At the very least, that provides you with minimum work item logic implemented in professional manner.</p> <p>To understand the customization effort required, it is helpful to review the following: </p> <p>1. Detail new data fields to be added to those existing in Work Item type; note if existing fields rules need to be modified</p> <p>2. Identify the work item state lifecycle desired and how it compares with the existing one for Work Item type (mostly paying attention to the flow rather than to the states names). </p> <p>3. For your new custom fields, see if there is any special logic to be implemented viz. </p> <ul> <li>Whether field rules are to be scoped by user/group <li>Whether field rules are to be scoped for different states <li>Whether field needs to be associated with static/dynamic list of values </li></ul> <p>Once you create mapping table of the desired vs. existing fields, these data may be used to estimate the complexity of the development & maintenance. I have tried to compile (somewhat biased) complexity list of elementary field customization task (ordered by the simplest to the most demanding):</p> <p>i. <strong>New data field</strong>. Simplest customization possible both from the point of implementation and subsequent maintenance. May require additional effort if the field is to be reported on (since the integration into reports will be required)</p> <p>ii. <strong>Data field with lists of values (<a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-global.html">local or global lists</a>)</strong>. For static (i.e. rarely updated) lists of values (such as priorities), both the implementation and maintenance are fairly simple. However, if the lists content is dynamic (such as customers), make sure you plan for maintenance and, more importantly, do not make any assumption as to list content in fields’ rules.</p> <p>iii. <strong>Data field with <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits.html">static rules logic</a> (no dependency on state/user)</strong>. Since rules implemented may be pretty complex, the scenario is as complex as you made it from the point of implementation complexity. And depending on how well you test the implementation, maintenance may range from nightmare to none.</p> <p>vi. <strong>Data field with rules logic dependent on <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-state.html">state transitions</a></strong>. When rules are defined include dependency states lifecycle, that generally means that you need to put extra effort into testing (for large states chart the effort may be very significant) and require regression testing when the state lifecycle is modified.</p> <p>v. <strong>Data field with logic dependent on user/group</strong>. When rules are scoped to specific groups (rarely to users in corporate environment), the complexity of environment may have a bearing on WIT. Namely, in Active Directory environment with multiple levels of inclusion between groups it might not be easy to diagnose why your rules function incorrectly (either from the point of being too loose or too restrictive). Extra maintenance may well be expected.</p> <p>vi. <strong>Data field with custom controls.</strong> When your data field in addition to rules expressed in WI Type definition has logic defined in custom control assembly, you have just added extra dimension on implementation, testing and maintenance. That becomes even more complex task if the custom control should work for Web interface </p> <p>Once you identified the work to be executed, you will be able to plan effort required for implementation, testing, deployment and maintenance.</p> <p>In conclusion, I’d like to highlight two very important principles which when followed will prevent a plethora of issues: a) never deploy to production before deploying to <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits.html"><strong>test environment</strong></a> and b) plan and execute the whole WI Types customization process as if it was an ordinary software development effort. <a name="posts"> </a> </p> <p><strong>Related posts: </strong><br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits_23.html">customization and global lists (part 11)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits.html">customization process (part 10)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/09/work-item-customization-tidbits-tools.html">customization tools (part 9)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-special.html">special fields (part 8)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-fields.html">fields maintenance (part 7)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/07/work-item-customization-tidbits-global.html">global lists (part 6)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-system.html">system fields (part 5)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-user.html">user interface (part 4)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits-state.html">state transitions (part 3)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/06/work-item-customization-tidbits.html">conditional field behavior (part 2)</a> <br>- Work Item Customization: <a href="http://teamfoundation.blogspot.com/2008/05/work-item-customization-tidbits-part-1.html">fields definition (part 1)</a><br><br><a href="http://blogs.msdn.com/eugenez/archive/2009/04/12/work-item-customization-tidbits-part-12-of-x.aspx" target="_blank">Mirror from MSDN blog</a></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-9311870937809250752009-04-01T20:17:00.001-07:002009-04-01T20:17:13.711-07:00TFS Administrator chores – space offender strikes again!<p></p> <p>In <a href="http://teamfoundation.blogspot.com/2009/03/tfs-administrator-chores-dealing-with.html" target="_blank">my previous post</a> I talked about management of large files in TFS version control database. Today I’d like to talk about what you can do to optimize space management in work item tracking database. </p> <p>As you know, it is possible to add file attachments to Work Item, with the maximum attachment size of 2Mb (by default); but most people who use attachments with WI change that limit to something larger (<a href="http://msdn.microsoft.com/en-us/library/ms400780.aspx" target="_blank">this MSDN article</a> details how to change the maximum attachment size), since default frequently does not suffice for video captures and such.</p> <p>Which naturally brings us to the question – if the maximum size set, say, to 32 Mb, how could one prevent misuse of the attachment feature?</p> <p>There is nothing in Team Explorer UI to help you with figuring out the size of the added attachment; and nothing to prevent a user from adding however many large attachments (if they are not greater than maximum size). That leaves you with user education as a form of prevention; and to report the usage it is possible to run raw SQL on the relational database (all of the below queries are strictly AS IS etc.):</p> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"><pre style="margin: 0px"><span style="color: green">-- Query WIT database</span></pre><pre style="margin: 0px"><span style="color: blue">USE </span>TfsWorkItemTracking;</pre><pre style="margin: 0px"><span style="color: blue">SELECT </span></pre><pre style="margin: 0px"> <span style="color: green">-- parent work item </span></pre><pre style="margin: 0px"> ID <span style="color: blue">AS </span>WorkItemID, </pre><pre style="margin: 0px"> <span style="color: green">-- name of the attachment file</span></pre><pre style="margin: 0px"> OriginalName <span style="color: blue">AS </span>AttachementName, </pre><pre style="margin: 0px"> <span style="color: green">-- attachment comment </span></pre><pre style="margin: 0px"> Comment, </pre><pre style="margin: 0px"> <span style="color: green">-- file size</span></pre><pre style="margin: 0px"> [Length] <span style="color: blue">AS </span>[Size], </pre><pre style="margin: 0px"> <span style="color: green">-- whether attachment was deleted</span></pre><pre style="margin: 0px"> <span style="color: blue">CASE WHEN </span>RemovedDate = <span style="color: #a31515">'01/01/9999' </span><span style="color: blue">THEN </span>0 </pre><pre style="margin: 0px"> <span style="color: blue">ELSE </span>1 <span style="color: blue">END AS </span>Deleted </pre><pre style="margin: 0px"><span style="color: blue">FROM </span>WorkItemFiles </pre><pre style="margin: 0px"> <span style="color: blue">WHERE </span></pre><pre style="margin: 0px"> <span style="color: green">-- File attachments only</span></pre><pre style="margin: 0px"> FldID = 50</pre><pre style="margin: 0px"> <span style="color: green">-- return only large files</span></pre><pre style="margin: 0px"> <span style="color: blue">AND </span>[Length] > @LargeFile </pre></div><br /><p>The query will give you the list of WI with large attachments, so you could figure out whether this feature is used in a sensible way.</p><br /><p>If you look at the query closely, you’ll notice that the attachment in the database can be removed from WI and still exist in the database. What does that mean, say you? Whereas with version control one can delete item (where the item still will be in DB) and then destroy it (where item will be purged from DB), there is no such feature with Work Item attachments.</p><br /><p>It turns out when you delete attachment from Work Item, the actual content is never deleted from database unless you do it manually. There is even helpful but incredibly well-hidden and vague article in MSDN on the subject, titled “<a href="http://msdn.microsoft.com/en-us/library/ms400706.aspx" target="_blank"><strong>How to: Delete Orphaned Files Permanently</strong></a>”.</p><br /><p>That means even if you have managed to delete large attachments from WI, your job to recover the space is still half-done, and you need to actually delete the attachment content from the database.</p><br /><p>The query below will enumerate all orphaned (deleted from Work Items, but still in DB) attachments, whereas subsequent query can be used to actually purge the deleted items from the database.</p><br /><div style="font-size: 10pt; background: white; color: black; font-family: courier new"><pre style="margin: 0px"><span style="color: green">-- Query for all orphaned attachments</span></pre><pre style="margin: 0px"><span style="color: blue">SELECT </span>WorkItems.ID <span style="color: blue">AS </span>WorkItemID, </pre><pre style="margin: 0px"> WorkItems.OriginalName <span style="color: blue">AS </span>AttachementName,</pre><pre style="margin: 0px"> WorkItems.Comment </pre><pre style="margin: 0px"><span style="color: blue">FROM </span>TfsWorkItemTrackingAttachments.dbo.Attachments Attachements, </pre><pre style="margin: 0px"> TfsWorkItemTracking.dbo.WorkItemFiles WorkItems</pre><pre style="margin: 0px"> <span style="color: blue">WHERE </span>Attachements.FileGuid = WorkItems.FilePath </pre><pre style="margin: 0px"> <span style="color: blue">AND </span>WorkItems.RemovedDate <> <span style="color: #a31515">'01/01/9999'</span></pre><pre style="margin: 0px"> <span style="color: blue">AND </span>WorkItems.FldID = 50</pre></div><br><br /><div style="font-size: 10pt; background: white; color: black; font-family: courier new"><pre style="margin: 0px"><span style="color: green">-- When absolutely sure - delete the orphans</span></pre><pre style="margin: 0px"><span style="color: blue">DELETE </span></pre><pre style="margin: 0px"> <span style="color: blue">FROM </span>TfsWorkItemTrackingAttachments.dbo.Attachments</pre><pre style="margin: 0px"><span style="color: green">-- join to WIT tables to identify orphans</span></pre><pre style="margin: 0px"><span style="color: blue">WHERE </span>FileGuid <span style="color: blue">IN </span>(<span style="color: blue">SELECT </span>FilePath </pre><pre style="margin: 0px"> <span style="color: blue">FROM </span>TfsWorkItemTracking.dbo.WorkItemFiles</pre><pre style="margin: 0px"> <span style="color: blue">WHERE </span>RemovedDate <> <span style="color: #a31515">'01/01/9999'</span></pre><pre style="margin: 0px"> <span style="color: blue">AND </span>FldID = 50)</pre></div><br /><p>Purging orphans seems to me a good candidate for the recurring job (not sure why it is not part of core TFS setup).</p><br /><p></p><br /><p><a href="http://blogs.msdn.com/eugenez/archive/2009/04/02/tfs-administrator-chores-space-offender-strikes-again.aspx">Mirrored from MSDN blog</a></p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com1tag:blogger.com,1999:blog-26229238.post-91680274578833088652009-03-28T22:15:00.001-07:002009-03-31T19:50:09.514-07:00TFS Administrator chores – dealing with the space offender<p></p> <p>These are the days of cheap storage - but even the cheap storage may run out. And running Team Foundation Server storing artifacts in its (multiple) databases may use up your space rack faster than you might have expected (and if you want to know what to expect, refer to <a href="http://blogs.msdn.com/buckh/archive/2006/02/22/tfs_size_estimation.aspx" target="_blank"><strong>this classical post</strong></a> by Buck Hodges on database size calculations).</p> <p>If that happens, the most probable culprit is version control database (TfsVersionControl) – in other words, all these files that people check in into version control. The size of the file matters because TFS stores difference only for each new revision of “small” files but for the “large” files every new revision gets full-blown copy (by default TFS considers the file to be large if it is over 16 Mb - read more on that topic in my <a href="http://teamfoundation.blogspot.com/2007/06/maximum-size-of-file-under-source.html" target="_blank"><strong>previous post</strong></a>).</p> <p>There are several ways of making sure that your users do not fill up your version control with memory dumps, images of installation CDs and such. Mind you – I am not saying that large files do not belong to version control; I am saying that the addition of large files should be a) conscious step and b) “revisionless” (i.e. with no versioning). </p> <p>Myself, I have been always ambivalent about storing large binary thingies in source control – on one hand, you get all content in one place (which is mighty convenient for builds etc.), on the other hand, many users will probably check in the content that does not belong in source control. So here is my hit list of measures to deal with large files in version control</p> <ul> <li><strong>Educate your user</strong> – make sure your average user understands that DVD ISO added to version control ends up being transmitted and stored in the database; perhaps what the user is looking for is file server, not version control <li><strong>Make user aware of his actions</strong> – it is possible to write check-in policy that would alert the user at the time of check-in, that the files being checked in are large and perhaps should not be in version control. And then, even if the user decides to override the policy you may run report on policy overrides <li><strong>Monitor your storage</strong> – if high level prevention and low level prevention fail, you can query the database to identify the offending files. The query below (with usual caveats – it is AS IS etc.) will give you a list of large files in the database (it will not take into account the summary size of all versions, only the latest version): </li></ul> <div style="font-size: 10pt; background: white; color: black; font-family: courier new"><pre style="margin: 0px"><span style="color: blue">DECLARE </span>@LargeFile <span style="color: blue">int</span>;</pre><pre style="margin: 0px"><span style="color: green">-- return files larger than 16 Mb</span></pre><pre style="margin: 0px"><span style="color: blue">SET </span>@LargeFile = 16 * 1024 * 1024; </pre><pre style="margin: 0px"> </pre><pre style="margin: 0px"><span style="color: blue">USE </span>TfsVersionControl; –– <span style="color: green">use source control DB </span></pre><pre style="margin: 0px"><span style="color: blue">SELECT </span><span style="color: green">-- item path </span></pre><pre style="margin: 0px"> Versions.ParentPath + Versions.ChildItem <span style="color: blue">AS </span>ItemPath,</pre><pre style="margin: 0px"> <span style="color: green">-- size of latest version in DB </span></pre><pre style="margin: 0px"> Files.CompressedLength <span style="color: blue">AS </span>DatabaseSize, </pre><pre style="margin: 0px"> <span style="color: green">-- size of original file</span></pre><pre style="margin: 0px"> Files.FileLength <span style="color: blue">AS </span>[Size], </pre><pre style="margin: 0px"> <span style="color: green">-- whether item deleted</span></pre><pre style="margin: 0px"> <span style="color: blue">CASE WHEN </span>Versions.DeletionId = 0 <span style="color: blue">THEN </span>0 </pre><pre style="margin: 0px"> <span style="color: blue">ELSE </span>1 <span style="color: blue">END AS </span>Deleted </pre><pre style="margin: 0px"><span style="color: blue">FROM </span>tbl_File Files, tbl_Version Versions</pre><pre style="margin: 0px"><span style="color: blue">WHERE </span><span style="color: green">-- get item latest version </span></pre><pre style="margin: 0px"> Versions.VersionTo = 2147483647 </pre><pre style="margin: 0px"> <span style="color: green">-- join to table with sizes</span></pre><pre style="margin: 0px"> <span style="color: blue">AND </span>Versions.FileId = Files.FileId </pre><pre style="margin: 0px"> <span style="color: green">-- return only large files</span></pre><pre style="margin: 0px"> <span style="color: blue">AND </span>Files.CompressedLength > @LargeFile </pre><pre style="margin: 0px"><span style="color: blue">ORDER BY </span>ItemPath;</pre></div><br /><p>I would be happy to hear your <strike>horror</strike> stories of the application of the above query; mine was nothing more than a bunch of ISO images checked in :)</p><br /><p><em>Thanks for reviewing the query go to </em><a href="http://blogs.msdn.com/chandrur/" target="_blank"><em>Chandru Ramakrishnan</em></a></p><br /><p><a href="http://blogs.msdn.com/eugenez/archive/2009/03/29/tfs-administrator-chores-dealing-with-the-space-offender.aspx" target="_blank">Mirrored from MSDN blog</a></p>eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-31008800911671231922009-03-28T22:12:00.001-07:002009-03-28T22:12:59.127-07:00Moving on<p>As you might now, from November ‘08 I am working at Microsoft, and as every MS employee I am now entitled to Community Server powered blog at <a href="http://blogs.msdn.com" target="_blank"><strong>blogs.msdn.com</strong></a> (mine is <a href="http://blogs.msdn.com/eugenez"><strong>http://blogs.msdn.com/eugenez</strong></a>).</p> <p>Though <a href="http://www.blogger.com" target="_blank">Blogger</a> is a convenient platform, Community Server is ways better, and thus I will be making MSDN my new [blog] home. So update your reader with <a href="http://blogs.msdn.com/eugenez/rss.xml" target="_blank"><strong>the new feed</strong></a>! But if you don’t – do not worry, I will be mirroring TFS related posts here.</p> <p>See you around!</p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-56111723616366655012009-03-28T22:06:00.001-07:002009-03-28T22:06:52.693-07:00Something good to read<p>This is a short post to let you know that there is one new blog of note that you should add to your RSS reader. Welcome (back) Richard Berg, blogging about TFS, PowerShell and more at <a href="http://www.richardberg.net/blog" target="_blank"><strong>http://www.richardberg.net/blog</strong></a>. Until recently, Richard <a href="http://blogs.msdn.com/richardb/" target="_blank">used to work at Microsoft</a>, and if you ever asked a question at MSDN TFS Version Control forum, you probably had it answered by Richard. </p> <p>His new blog already has a whole lot of information about TFS PowerShell cmdlets, so stay tuned for more!</p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-36964590666075272452009-02-10T23:43:00.001-08:002009-02-10T23:43:59.532-08:00TFS Code Review Tools digest<p>If you are interested in getting most out of your TFS toolset, an <a href="http://jb-brown.blogspot.com/2009/01/team-system-code-review-presentation.html" target="_blank">extensive summary presentation on Code Review tools in TFS domain</a> is available from <a href="http://jb-brown.blogspot.com" target="_blank">JB Brown</a>. I had a pleasure of watching the presentation in person, and it covers most alternatives available.</p> <p>For those who do not know, JB Brown is the original author and main contributor for <a href="http://www.codeplex.com/TeamReview" target="_blank">TeamReview project</a>. TeamReview allows performing collaborative code reviews using less than traditional approach (see a <a href="http://dotnet.org.za/willy/archive/2008/08/26/a-quick-look-at-teamreview.aspx" target="_blank">good intro post</a> on how it works by Willy-Peter Schaub ), where you can actually replay the steps performed in code review (and it stores the code review comments using TFS work items).</p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com0tag:blogger.com,1999:blog-26229238.post-69383981405468744172009-02-10T00:00:00.001-08:002009-02-10T00:00:47.076-08:00Is TFS FDA compliant? Is anything?<p>I received an interesting comment to my previous post on <a href="http://teamfoundation.blogspot.com/2009/01/word-on-securing-intellectual-property.html" target="_blank">securing intellectual property</a>, the question being whether TFS meets the requirement of FDA compliance. </p> <p>Let’s think about it for a second. What kind of software is FDA concerned with? Software used in or with medical devices, which obviously does not include TFS or say, Visual Studio compiler.</p> <p>But FDA does recognize the importance of tools used <em>in process</em> of development of medical software. As part of FDA software validation process (as described in <a href="http://www.fda.gov/cdrh/comp/guidance/938.html#_Toc517237945" target="_blank">General Principles of Software Validation</a> document), the tools of trade needs to be validated as well:</p> <p><em>Software tools are frequently used to design, build, and test the software that goes into an automated medical device. Many other commercial software applications, such as word processors, spreadsheets, databases, and flowcharting software are used to implement the quality system. All of these applications are subject to the requirement for software validation, but the validation approach used for each application can vary widely.</em></p> <p>So you will say – you still have to do that validation whatever it might be (and if you have any past experience with medical software, you are probably not too excited about the prospect). Not exactly – because one has to draw a line somewhere. </p> <p>Do you have to validate OS you use for development? C++ compiler you are using? That surely would be too much work, and FDA recognizes that, defining that the degree of validation for off-the-shelf software applications used in quality process depends – depends on risk posed by the specific software usage, role of the software in the process, vendor supplied information etc. (for more details, have a look at “<a href="http://www.fda.gov/cdrh/comp/guidance/938.html#_Toc517237968" target="_blank">Validation of off-the-shelf software and automated equipment</a>”)</p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p>While I do not mean that your regulatory guys do not earn their bread and butter, the whole standard thing seems to be a little bit overrated. FDA is not that much of a boogeyman – for example, one of the principles of software validation document mentioned above is “least burdensome approach”. Meaning that the quality of the software is not necessarily measured by the weight of the documents you produce :).</p> <p>And getting back to initial question – does TFS meet FDA compliance criteria? Yes it does, but specifics differ depending on TFS place in software development process and on how your regulatory read FDA documentation (with the latter usually being responsible for most grief; that’s why I recommend reading FDA guidelines yourself – to get magic out of the process and ask the educated questions).</p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p>And if anything, FDA documents are probably making much more sense than some unregulated documents I came across.</p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com1tag:blogger.com,1999:blog-26229238.post-76488517071645895512009-01-20T23:52:00.001-08:002009-01-20T23:52:25.147-08:00Word on securing intellectual property<p>Do you care about <em>your</em> intellectual property? I am sure that the answer is yes. Now how about related question – are you doing anything to make sure that <em>your</em> intellectual property stays <em>yours</em>?</p> <p>Even if you answered yes to the last question, it is not easy to cover all aspects of the problem. Some of more detailed questions you might want to answer:</p> <ul> <li>Can you establish that certain code is yours in the face of possible legal action? <li>Can you establish the fact that reasonable precautions were undertaken to secure the source code? <li>How do you make sure that your proprietary code is not leaking into public domain?</li></ul> <p>* - If you have additional compliance to worry about (such as FDA), additional questions may need to be answered. </p> <p>There are some small things you have to do proactively to make sure you are covered from the legal perspective. While I am not an expert in law, I do have couple of them to offer for your consideration:</p> <ul> <li>Start adding copyright notices in your source code (such tools as <a href="http://code.msdn.microsoft.com/sourceanalysis" target="_blank"><strong>StyleCop</strong></a> can help you with enforcing this practice) <li>While term “reasonable precautions” has a lot of legal nuances, at the very least that means that source code never leaves the premises (think about the situation where the developer uses source code at client’s site as a shortcut to fixing the problem) <li>If you have sensitive information as part of your source code repository (such as proprietary algorithms), you may have to be more restrictive; that is to make sure that the access to such information is granted only on “need-to-know” basis</li></ul> <p>If you happen to have any hard earned advice on the matter, please share it in the comment.</p> eugenezhttp://www.blogger.com/profile/09637949643994709456noreply@blogger.com2