tag:blogger.com,1999:blog-167548762024-03-13T03:06:01.122+02:00Not So Smart Buildertoolsmith is the software equivalent of a tool-and-die specialist; one who specialises in making the tools with which other programmers create applications.
[Jargon File]Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.comBlogger57125tag:blogger.com,1999:blog-16754876.post-16983206154404252072009-12-20T10:26:00.002+02:002009-12-20T10:29:56.660+02:00There was a problem importing the global list: TF26204: The account you entered is not recognized.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHC_hJ-wt9eIBH7hF7foqu0ukJK1kTippLAELrWfETTHdElT9O_bbdShLS84P6wJCtPfR3DmqiNqJuTo5t9cJ3DyV0DxmCMyzNVtnhCw3wTlBtuxfd5ecNng-e7ORaFwUU_iHI/s1600-h/TF26204.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 157px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHC_hJ-wt9eIBH7hF7foqu0ukJK1kTippLAELrWfETTHdElT9O_bbdShLS84P6wJCtPfR3DmqiNqJuTo5t9cJ3DyV0DxmCMyzNVtnhCw3wTlBtuxfd5ecNng-e7ORaFwUU_iHI/s400/TF26204.PNG" alt="" id="BLOGGER_PHOTO_ID_5417232666451784978" border="0" /></a><br />If you got the error "There was a problem importing the global list: TF26204: The account<br />you entered is not recognized." while trying to import a global list file then probably one of the items in the lists contain backslash and TFS considers this value as a user name... I got this while entering the value 800\40. Funny!Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-81565344539841546142009-12-06T07:23:00.003+02:002009-12-06T07:30:17.698+02:00Deleting work item in TFS 2010After the release of TFS 2010 power tools I have noticed that the command <strong>destroywi</strong> that is used for deleting work items was removed. Searching the Visual Studio installation directory I found a new command line utility called <strong>witadmin.exe</strong>. This new tool hosts all the known work item management commands like import, export... To delete work items you use the same command as in the power tools with the work items id as a parameter:<br />Example: <strong>witadmin destroywi 10</strong>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com2tag:blogger.com,1999:blog-16754876.post-38880943287557163482009-11-05T08:04:00.001+02:002009-11-05T08:06:05.809+02:00TFS 2010 Beta 2 - Back in businessJust installed TFS 2010 beta 2. Good to be back.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com1tag:blogger.com,1999:blog-16754876.post-63601012817505361512009-08-10T07:18:00.013+03:002009-08-10T08:27:11.209+03:00Convert a Physical Machine to a Virtual MachineYou probably know Norton Ghost as a great tool to backup your machine state so you could restore it if needed from a backup. Norton actually saves an exact image of your HDD and enables you to restore it even to another physical machine.<br />What if you want to backup your machine and open it using VMWare without having to restore it to another physical machine?<br />VMWare support opening a Norton Ghost image so you could use this to restore a machine. VMWare also supports converting a physical machine to a virtual machine and enables you to backup and duplicate a machine in few simple steps.<br /><br />What do you need?<br /><br /><a href="http://www.vmware.com/products/converter/">VMWare vCenter Converter Standalone</a> - A free tool that will convert your physical machine.<br /><a href="http://www.vmware.com/products/ws/">VMWare Workstation</a>/<a href="http://www.vmware.com/products/player/">VMWare Player</a> - to open the machine. VMWare Player is a free tool.<br /><br />How to do it?<br /><br />Install VMWare vCenter Converter Standalone. Select "Local installation" in the "Setup Type" form.<br /><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 301px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368189213704683154" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi472Ji7A5M2Y5TLS8lNG4AejNppVOntevR5IQOsOqZNfaGjBNpFwvdiwvt92nuT_a0xIc1ancAiqdDod6ZuC65WhCGrm7QxYmjaQqpYjzE4wTbPCiZUBVeK3W9lTOXl3Xrx8uB/s400/VMWare_vCenter_Converter_Installation.png" /><br />Run the tool.<br /><br />Press the "Convert Machine" button. A wizard will be opened. In the "Specify Source" tab select "This local machine" in the "Specify the powered-on machine" radio group.<br />Press the "Next" button.<br /><br /><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 332px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368189428770950754" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzXPsXnIAVw0yQFuAO5p4qelJEMQuinhfbjLuOlXWL-g4Pr3eZwTDYUfc-ldMqbSCx27UAiwwf67Kb7MjGILy525N5idSaWRYO6NWs1JGyms0CxkLkP-XAH3sVc69G8qTeOCBX/s400/VMWare_vCenter_Converter_Wiz1.png" /><br />In the "Specify Destination" select "VMWare Workstation or other VMWare virtual machine" in the "Select destination type" combo box. After that specify the VMWare product, give the machine a name and choose a location to save it.<br />Press the "Next" button.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbsrsCF4am6oZ7_csvZfbumlKXtdyVnwkJoMIeErjQmTmKm6a3QwL7vundr6iOR0lK2XgjxwByV1QB_rK0pI0YUdeThjLL_1Z_wnaNq1OvU-j3M7Zp_p0YKI4C3XFtY2qGbTWl/s1600-h/VMWare_vCenter_Converter_Wiz2.png"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 399px; DISPLAY: block; HEIGHT: 310px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368200944435386258" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbsrsCF4am6oZ7_csvZfbumlKXtdyVnwkJoMIeErjQmTmKm6a3QwL7vundr6iOR0lK2XgjxwByV1QB_rK0pI0YUdeThjLL_1Z_wnaNq1OvU-j3M7Zp_p0YKI4C3XFtY2qGbTWl/s400/VMWare_vCenter_Converter_Wiz2.png" /></a> In the "View/Edit Options" tab you can review and fix warnings regarding the conversion, edit the machine settings and define which HDD to convert.<br />Press the "Next Button".<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI3U7EP85LdqSmEfMMgbJoLBdjk_UFPkIKya-2y2YvrHuddfsx3rFXweam58g2PWQJuShYO42UgxNd5t-SwgpDcF9eDT-TwkCcrVuvi8YVoXi2b0bDRJtfwH87crkLghL5SGDg/s1600-h/VMWare_vCenter_Converter_Wiz3.png"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 310px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368201549759680354" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI3U7EP85LdqSmEfMMgbJoLBdjk_UFPkIKya-2y2YvrHuddfsx3rFXweam58g2PWQJuShYO42UgxNd5t-SwgpDcF9eDT-TwkCcrVuvi8YVoXi2b0bDRJtfwH87crkLghL5SGDg/s400/VMWare_vCenter_Converter_Wiz3.png" /></a><br />In the "Ready to Complete" tab review you settings. When completed press the "Finish" button.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsS9ZFP45GBmuausSSfhO9VkYeIa4Fv2zTJw_255dR1fI-PZYGbPCB4bq9e0hIlVyN_5mLHgD89exUOo49K1_Rc0TPWjAW89U_Q_atXHAtbTYx5DuFcn_gppnsbQxsLG4tQsNd/s1600-h/VMWare_vCenter_Converter_Wiz4.png"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 310px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368201691896211170" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsS9ZFP45GBmuausSSfhO9VkYeIa4Fv2zTJw_255dR1fI-PZYGbPCB4bq9e0hIlVyN_5mLHgD89exUOo49K1_Rc0TPWjAW89U_Q_atXHAtbTYx5DuFcn_gppnsbQxsLG4tQsNd/s400/VMWare_vCenter_Converter_Wiz4.png" /></a><br />The wizard will be closed. In the main window a task will be added to the list and the conversion will start. You can track the status in this window.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguvuW-yvg6OdLjfUzrXWi-DTGlRPvX1AiAk33ivTSOylt3lmbrNi8_9NIQNSNFiCK7gdX_YIvSmaS0HkI9tdPP7nuYOOXtyarkR3H7sB9g5SEqch9YVpYEX7pOk6S5ZiZDGpjH/s1600-h/VMWare_vCenter_Converter_Wiz5.png"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 329px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368188367730221810" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguvuW-yvg6OdLjfUzrXWi-DTGlRPvX1AiAk33ivTSOylt3lmbrNi8_9NIQNSNFiCK7gdX_YIvSmaS0HkI9tdPP7nuYOOXtyarkR3H7sB9g5SEqch9YVpYEX7pOk6S5ZiZDGpjH/s400/VMWare_vCenter_Converter_Wiz5.png" /></a>After the conversion is finished you can open the machine using VMWare Workstation or Player. Please notice that to actually continue working with the machine you will probably have to re-activate it.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-85699221656339151212008-07-02T08:22:00.003+03:002008-07-02T08:38:51.040+03:00Shelveset as a BackupLong time since I posted. Been busy (implementing TFS), long vacation and a new work place.<br />In the last implementation I did I have noticed that in some cases users work in a network drive that is always backed up by IT. This is a good solution for backing up your workspace without checking in your pending changes (like we used to do when we worked with SourceSafe...) or performing a shelve for backup purpose. I thought it would be nice to share the idea of automatic backup shelves with those of you that work locally without any automatic backup. When you shelve your pending changes the shelve is saved in PendingChange table. The pending changes will be removed from the table when you delete or replace the shelveset. So to perform an automatic backup of your workspace that does not overload your TFS database you can add a schedule task that will run the following command:<br /><span style="font-weight: bold;">tf shelve {workspace name} /replace /noprompt</span><br />Remeber to set the current folder to the workspace local path before executing the command.<br />Enjoy.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com4tag:blogger.com,1999:blog-16754876.post-73265823917100958422007-12-27T08:28:00.000+02:002007-12-27T08:36:52.479+02:00VersionControlPath - Class to Manipulate Version Control Items PathI was navigating through TFS assemblies and I found out a static class that I wasn't aware of: <strong>Microsoft.TeamFoundation.VersionControl.Common.VersionControlPath</strong>. This class contains functions that help manipulating version control items path. It is like the <strong>System.IO.Path</strong> class. Here are some of the methods in the class:<br /><ul><li>GetFileName</li><li>GetExtension</li><li>GetFolderDepth</li><li>Combine</li><li>GetFolderName</li><li>ValidatePath</li></ul><p>Very useful.</p>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-17212785317866792292007-12-24T07:05:00.001+02:002007-12-24T07:09:03.683+02:00No matching items found in {0} at the specified version<span xmlns=""><p>I recently got this error while trying to create a branch from that its parent was renamed.<br /></p><p>Here's an example of what happened:<br /></p><ol><li>A branch was created at: $/Project/Folder1/Branch1.<br /></li><li>Some work has been done on Branch1 so its history contained several change sets.<br /></li><li>Folder1 was renamed to Folder2 ($/Project/Folder2/Branch1).<br /></li><li>A branch operation failed while trying to create one from a change set before the rename operation with the error: "No matching items found in $/Project/Folder2/Branch1" (A branch operation on a change set created later than the rename operation will succeed).<br /></li></ol><p>I thought that the rename operation has broken the branch history. Looking at the branch dialog I saw that the source branch text box is read only and I thought to myself what would have happen if I had changed the source from $/Project/Folder2/Branch1 to $/Project/Folder1/Branch1. It was time for some coding…<br /></p><p><span style="color:#0070c0;">private</span> <span style="color:#0070c0;">void</span> PerformBranch(<span style="color:#0070c0;">string</span> server, <span style="color:#0070c0;">string</span> workspaceName, <span style="color:#0070c0;">string</span> userName, <span style="color:#0070c0;">string</span> changesetId, <span style="color:#0070c0;">string</span> sourceBranch, <span style="color:#0070c0;">string</span> targetBranch) </p><p>{<br /><span style="color:#548dd4;">TeamFoundationServer</span> tfs = <span style="color:#0070c0;">new</span> <span style="color:#548dd4;">TeamFoundationServer</span>(server);<br /><span style="color:#548dd4;">VersionControlServer</span> vcs = tfs.GetService(<span style="color:#0070c0;">typeof</span>(<span style="color:#548dd4;">VersionControlServer</span>)) <span style="color:#0070c0;">as</span> <span style="color:#548dd4;">VersionControlServer</span>;<br /><span style="color:#548dd4;">Workspace</span> workspace = vcs.GetWorkspace(server, userName);<br /><span style="color:#548dd4;">VersionSpec</span> versionSpec = <span style="color:#548dd4;">VersionSpec</span>.ParseSingleSpec(changesetId, userName);<br />workspace.PendBranch(sourceBranch, targetBranch, versionSpec);<br />}<br /></p><p>This method has fixed the problem and after running it with the old branch path (source = $/Project/Folder1/Branch1), pending changes were waiting for check in.</p></span>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com1tag:blogger.com,1999:blog-16754876.post-17834477249936547962007-12-06T20:19:00.000+02:002007-12-09T14:26:50.215+02:00TF20015: The field 'xxx' contains a value that is not in the list of supported values.While trying to save a work item in TFS you might be facing a problem doing it when the error TF20015 is raised. This error is raised when you are trying to enter values that are not part of the allowed values of the field. The strange thing is that it can happen although the value was already saved before to the work item and the field is disabled. As a result you cannot change the value and therefor cannot save the work item. So why does it happen? I faced this problem in two cases:<br /><br /><ol><br /><li>The user in one of the fields (which is implementing the valid user value list as the allowed values for the field) was renamed or deleted.</li><br /><li>The work item schema was changed in a way that made some of the existing work items have illegal values. For example, if you made one of the fields mandatory trough all of the work flow and you have some work items with a null value in the field.</li></ol><br /><p>So, how can you fix it?</p><br /><p>There are 2 ways to do it:</p><br /><ol><br /><li>Changing the work item schema temporarily so the field won't be disabled and then you can change the value.</li><br /><li>Write some code the change the field value:</li></ol><p>Here's a code sample on how to update work item field values:</p><p><br />public void UpdateWorkItem(string serverUri, int id, string fieldName, string fieldValue)<br />{<br /> TeamFoundationServer tfs = new TeamFoundationServer(serverUri);<br /> tfs.EnsureAuthenticated();<br /> WorkItemStore wis = tfs.GetService(typeof(WorkItemStore)) as WorkItemStore;<br /> WorkItem workItem = wis.GetWorkItem(id);<br /> workItem.Open();<br /> workItem.Fields[fieldName].Value = fieldValue;<br /> workItem.Save();<br />}</p><br /><p></p>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com2tag:blogger.com,1999:blog-16754876.post-53221877990984993622007-12-03T08:39:00.001+02:002007-12-03T15:52:55.302+02:00Set Work Item Type field allowed values when another field value changes<span xmlns=""><p><span style="font-family:Georgia;font-size:12;">I was asked once by a friend if there's a way to filter the allowed values of a field when another field value changes. Well, the solution is not exactly as we think about filtering but more like a switch/case mechanism. </span><br /></p><p><span style="font-family:Georgia;font-size:12;">Let's take for example 2 fields that implement OS Platform & Version selection: </span><br /></p><p><span style="font-family:Georgia;font-size:12;">Windows --> XP, 2003 Server, Vista<br /></span></p><p><span style="font-family:Georgia;font-size:12;">Linux --> Ubuntu, Red Hat, Suse<br /></span></p><p><span style="font-family:Georgia;font-size:12;">Mac --> OS X 10.0, OS X 10.5 </span><br /></p><p><span style="font-family:Georgia;font-size:12;">To implement this in the work item type definition file we need to define 2 fields. The xml should look like this: </span><br /></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">FIELD</span><span style="color:blue;"><br /></span><span style="color:red;">type</span><span style="color:blue;">=</span>"<span style="color:blue;">String</span>"<span style="color:blue;"><br /></span><span style="color:red;">name</span><span style="color:blue;">=</span>"<span style="color:blue;">OS Platform</span>"<span style="color:blue;"><br /></span><span style="color:red;">refname</span><span style="color:blue;">=</span>"<span style="color:blue;">MyFields.OSPlatform</span>"<span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Windows</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Linux</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Mac</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">FIELD</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">FIELD</span><span style="color:blue;"><br /></span><span style="color:red;">type</span><span style="color:blue;">=</span>"<span style="color:blue;">String</span>"<span style="color:blue;"><br /></span><span style="color:red;">name</span><span style="color:blue;">=</span>"<span style="color:blue;">OS Version</span>"<span style="color:blue;"><br /></span><span style="color:red;">refname</span><span style="color:blue;">=</span>"<span style="color:blue;">MyFields.OSVersion</span>"<span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">WHEN</span><span style="color:blue;"><br /></span><span style="color:red;">field</span><span style="color:blue;">=</span>"<span style="color:blue;">MyFields.OSPlatform</span>"<span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Windows</span>"<span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">XP</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">2003 Server</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Vista</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">WHEN</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">WHEN</span><span style="color:blue;"><br /></span><span style="color:red;">field</span><span style="color:blue;">=</span>"<span style="color:blue;">MyFields.OSPlatform</span>"<span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Linux</span>"<span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Ubuntu</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Red Hat</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Suse</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">WHEN</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">WHEN</span><span style="color:blue;"><br /></span><span style="color:red;">field</span><span style="color:blue;">=</span>"<span style="color:blue;">MyFields.OSPlatform</span>"<span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">Mac</span>"<span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">OS X 10.0</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"><</span><span style="color:#a31515;">LISTITEM</span><span style="color:blue;"><br /></span><span style="color:red;">value</span><span style="color:blue;">=</span>"<span style="color:blue;">OS X 10.5</span>"<span style="color:blue;"> /><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">ALLOWEDVALUES</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">WHEN</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;"></</span><span style="color:#a31515;">FIELD</span><span style="color:blue;">><br /></span></span></p><p><span style="font-family:Georgia;font-size:12;">The version field contains WHEN rule for each platform. The result is a field that changes in real time when the parent field value changes.<br /></span></p><p><span style="font-family:Georgia;font-size:12;">You don't have to write the xml in order to achieve this. You can use the "Process Template Editor" which is part of the Team Foundation Server power tools to easily add fields and rules to you work item.</span></p></span>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-77526303735054660122007-11-29T07:30:00.000+02:002007-11-29T07:37:44.049+02:00TFSQueryExplorerI have a new project in <a href="http://www.codeplex.com/">CodePlex</a> named <a href="http://www.codeplex.com/TFSQueryExplorer">TFSQueryExplorer</a>. It is a Visual Studio addin that looks like the Team Explorer tool window but it is dedicated to the management of queries and work items. There are a lot of cool features like manage queries in tags/folders, quick search, integration with the work item templates power tool and so on. The project is an example for using Visual Studio SDK and Team System API. I hope that you'll find it useful.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-44324754557471057582007-10-21T15:47:00.000+02:002007-10-21T15:53:06.664+02:00Could not load file or assembly 'Microsoft.Data.ConnectionUI' or one of its dependencies - Visual Studio 2005 SDKI have noticed that after installing Visual Studio 2005 SDK one of my web projects has stopped running in Visual Studio raising an exception that says: "<strong>Could not load file or assembly 'Microsoft.Data.ConnectionUI' or one of its dependencies</strong>". After some investigation I have found that the file exists also under the common assemblies directory of the SDK (<strong>C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Common\Assemblies</strong>) and somehow although I do not use the assembly it is copied as a reference. The solution for that was deleting the file from the SDK common assemblies folder (since it is already contained in the framework). After the first deletion I made I had to delete another assembly from that folder and the project was running again.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-75901769051866785222007-10-10T07:55:00.000+02:002007-10-10T08:03:58.432+02:00Keyboard Language On Login Screen Not Set To Default<blockquote>When installing windows with default language not set to english and changing it after installation you will notice that on the login screen the language is set to the language selected during installation. To change it english you need to edit the registry key <strong>HKEY_USERS\.DEFAULT\Keyboard Layout\Preload</strong>. In this key you will find probably 2 values named <strong>1</strong> and <strong>2</strong>. You need to switch between the values so that the value named <strong>1</strong> will be set to <strong>00000409</strong> which is english. It happens to me when I get a new computer that is from a specific vendor and the OS is already installed.</blockquote>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com2tag:blogger.com,1999:blog-16754876.post-35613432383954270102007-09-15T15:28:00.001+03:002007-09-15T15:28:42.239+03:00Team Build 2008 API<span xmlns=''><p>I have installed Team Foundation Server 2008 Beta 2 on my staging environment this week. The installation process was smooth and except for some small issues I could start testing the release after a simple installation process.<br /></p><p>Naturally, the first thing I have checked was the Team Build new features. I will not expand in the words regarding the new features because there are already some posts describing it (<a href='http://blogs.msdn.com/buckh/archive/2007/08/14/tfs-2008-a-basic-guide-to-team-build-2008.aspx'>http://blogs.msdn.com/buckh/archive/2007/08/14/tfs-2008-a-basic-guide-to-team-build-2008.aspx</a>). Anyway, some of the new features ease the management of the builds from the UI (Delete, Open Drop Folder…) and were available in Team Foundation Server 2005 using 3rdParty tools (<a href='http://www.codeplex.com/TFSBuildManager'>TFSBuildManager</a>). What I like the most is the Drop Management feature that completes the Continuous Integration feature. By using the retention policy of a build definition (Build Type is now Build Definition) you can define what and how to save builds. Builds can also be marked as save forever which can be useful when you want to mark a build that was released to a customer. <br /></p><p>The second thing that I have checked was the new Team Build object model in this version. Since I'm a heavy consumer of the Team Build API I was curious to find out how it looks. For the record, <a href='http://www.codeplex.com/TFSBuildManager'>TFSBuildManager</a> works on Team Foundation Server 2008 (some of the interfaces became obsolete so I would probably have to work on a new version). <br /></p><p>The first thing I have noticed is that the <strong>BuildStore</strong> interface became obsolete and it is replaced with the <strong>IBuildServer</strong> interface. So, in order to create an instance of the interface we need to do the following:<br /></p><p><strong>TeamFoundationServer</strong> tfs = new <strong>TeamFoundationServer</strong>("ServerName");<br /></p><p>tfs.EnsureAuthenticated();<br /></p><p><strong>IBuildServer</strong> bs = (<strong>IBuildServer</strong>)tfs.GetService(typeof(<strong>IBuildServer</strong>));<br /></p><p>In Team Foundation Server 2005 there was no interface to manage Build Type. If you wanted to query the server build types you needed to use the Version Control API to get the list of branches under the $/ProjectName/TeamBuildTypes branch. In 2008 the term Build Type is replaced with Build Definition. There is also a new interface to manage it named <strong>IBuildDefinition</strong>. Here's an example of how to get the list of build definitions for a project:<br /></p><p><strong>IBuildDefinition</strong>[] buildDefinitions = bs.QueryBuildDefinitions("ProjectName");<br /></p><p>Another interface that became obsolete is the <strong>BuildData</strong> interface. Instead of using this interface we now have a new one named <strong>IBuildDetail</strong>. The following example shows the replacement for the method <strong>GetListOfBuilds</strong> that was available in 2005:<br /></p><p><strong>IBuildDetail</strong>[] buildDetails = bs.QueryBuilds("ProjectName");<br /></p><p>The <strong>IBuildDetail</strong> interface is wider than the <strong>BuildData </strong>interface and it's in parallel to the big changes made to Team Build in 2008. Some of the new members we can use are:<br /></p><ul style='margin-left: 40pt'><li>SourceGetVersion – A string that represents the version control source version for the build.<br /></li><li>KeepForever – A Boolean value that marks a build as one that won't be deleted while applying the retention policy.<br /></li><li>LabelName – A string value that represents the version control label of the build.<br /></li><li>CompilationStatus, TestStatus – A <strong>BuildPhaseStatus</strong> value that represent the phase status (Failed, Succeeded, Unknown).<br /></li></ul><p>One of the big changes in Team Build 2008 is the build agents. In 2005 build machines were related to a specific build type. In 2008, with the builds queue feature, you don't have to relate a build server to a specific build definition. Build servers are now treated as agents and can serve all build definitions. For each Build Definition you specify a default build agent. The build agent is represented through the <strong>IBuildAgent</strong> interface that was already available in 2005 but only for executing a build.<br /></p><p>To get the list of build agents we need to do the following:<br /></p><p><strong>IBuildAgent</strong>[] buildAgents = bs. QueryBuildAgents("ProjectName");<br /></p><p>To create a new build agent:<br /></p><p><strong>IBuildAgent</strong> buildAgent = bs. CreateBuildAgent("ProjectName");<br /></p><p>buildAgent.MachineName = "BuildMachineName";<br /></p><p>buildAgent.Name = "BuildAgentName";<br /></p><p>buildAgent.BuildDirectory = @"C:\BuildDirectory";<br /></p><p>buildAgent.Port = 9191;<br /></p><p>buildAgent.Save();<br /></p><p>There are some more properties to set for creating a new build agent but these are the required ones.<br /></p><p>Starting a build is a little different too. Since we do not start a build but queue a build we need to use the <strong>QueueBuild</strong> method in the <strong>IBuildServer</strong> interface.<br /></p><p>IBuildDefinition buildDefinition = bs. GetBuildDefinition("ProjectName", "BuildDefinitionName");<br /></p><p>bs.QueueBuild(buildDefinition);<br /></p><p>One thing I found missing in the current release API was the ability to edit build definition using the <strong>IProjectFile</strong> interface. The IProjectFile interface wraps the MSBuild project file but it is only available when creating a new build definition.<br /></p><p>There is a lot more in the new Team Build API. I have tried to cover the basics in this post.<br /></p><p>I hope I'll have some time soon to write the support for Team Build 2008 in TFSBuildManager. I already got some cool ideas using the new API.<br /></p></span>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com3tag:blogger.com,1999:blog-16754876.post-22330722822538076692007-09-06T21:06:00.000+03:002007-09-06T21:16:48.336+03:00Filename Collision - Another item with the same name exists on the server.At one of our merges we encountered an error saying that there is a file collision and we could not complete the process. The error is raised when you are performing the check in after the merge. The merge itself passes with no error. It seem that it happens when 2 files/folders with the same name and location are added to both branches. While performing the merge the source branch treats the new item as a branch action to the destination branch which results in adding the file in the check in process. The merge process does not check if the file already exists and when you perform the check in you get the error and the only option to resolve it is to delete the local file (the file from the merge action). The problem is that we wanted the file from the merge source branch. To fix this we needed to delete the file in the destination branch (after performing undo pending changes for the merge) and than perform the merge again.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com3tag:blogger.com,1999:blog-16754876.post-64954066780661041312007-09-05T19:19:00.000+03:002007-09-05T19:30:02.578+03:00Terminals Achievements<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS_fDhS2XzWX5G2pGtluqSG_YqMoI5lIciS6Wn8D8lXNgcrsFt4Omfqhac0fA1xlaGvyTyZ2yQUNGG5EfIaOgPMncmQAjKQDxCtPIOLP19ieLFzyucLpNvPNOpif_EhyjzygAm/s1600-h/GoogleTerminals.Png"><img id="BLOGGER_PHOTO_ID_5106758083637144002" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS_fDhS2XzWX5G2pGtluqSG_YqMoI5lIciS6Wn8D8lXNgcrsFt4Omfqhac0fA1xlaGvyTyZ2yQUNGG5EfIaOgPMncmQAjKQDxCtPIOLP19ieLFzyucLpNvPNOpif_EhyjzygAm/s400/GoogleTerminals.Png" border="0" /></a><br /><div>We are celebrating 2 major events in <a href="http://www.codeplex.com/Terminals">Terminals</a> life. The first one is that latest release was downloaded 10,000 times. The second one and the sweetest is that the project page is the first result in Google's search for the word Terminals (Out of 37,000,00 pages!!!). This is a result of the posts written regarding the utility and the people that are using it. Thank you all.</div><br /><div>We are working on a new version with lots of features and we added some guys to help us with the development. Hope we can deliver it soon. Enjoy.</div><br /><div></div>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com1tag:blogger.com,1999:blog-16754876.post-59032961911555599292007-08-28T11:39:00.000+03:002007-08-29T08:28:46.757+03:00Moving Team Foundation Server from a single-server deployment to a dual-server deploymentIt's been a while since I've posted something. Shame on me!<br /><br />The last weeked was dedicated to moving our Team Foundation Server from a single server deployment to a dual server deployment. I have already gone throught the process of moving a server from one hardware configuration to another so I was quite sure that this would work.<br /><br />Our previous configuration was a virtual server on an IBM blade with 2GB memory serving about 50 users. We have decided to split the deployment and add a database server which is the number one consumer of resources.<br /><br />I've started the process around 21:00 and finished at 02:30. The most problematic part was that for some reason I could not uninstall SQL Server and Visual Studio from the application sevrer (the new deployment requieres uninstall of current Team Foundation Server installation and installing as an application server). I had to use the windwos installer cleanup utility to remove them from windows installer database and then I reinstalled them to their previous state. After that again unistall and installing the Team Foundation Server application tier. You can imagine it took me sometime...<br /><br />Some remarks regarding the document (<a href="http://msdn2.microsoft.com/en-us/library/ms404854(VS.80).aspx">How to: Move from a Single-Server to a Dual-Server Deployment</a>):<br /><br /><ul><li>In the section named <strong>To modify the Web.Config file to reflect the original Team Foundation data-tier server name:</strong> In 1.a there is a mistake when refering to the new data-tier server when locating the web.config file of the services. It should be the application-tier server.</li><br /><li>In the section named <strong>To restore and verify Report Server on the new Team Foundation Server</strong>: In 17 you are suppose to execute SetupWarehouse.exe but it won't happen since the TFSAppPull is still down. SetupWarehouse.exe uses the web service to initilize the process of rebuilding the Team System OLAP cube. You need to execute it after you are restarting the services in the section named <strong>To restart services and verify operation</strong>.</li></ul><p>Another problem I encountered was related to the databases restore. I must say that it was my mistake since I did not follow the process and restored the databases by detaching the new ones and attaching the old ones. The issue was that the 2 databases using full text search catalog (<strong>TfsWorkItemTracking</strong> and <strong>STS_Content_TFS</strong>) were attached with the wrong reference to the full text catalog. As a result the catalog could not be rebuilt and backups failed. In addition while searching work items using the Steps to Reproduce field (which is indexed in the catalog) an error raised specifing the query failed and there is a problem on the server.</p><p>I did some search using the errors I saw in the event viewer and in database logs and understood that the catalog needs to be rebuilt. When executing the rebuild using the management studio I got no error but the process ran for about 24 hours. I'm not a DBA but this seemed strange so I stopped it and continue searching using this keywords: "<strong>Full-Text Search is not enabled for the current database</strong>", "<strong>Property FullTextIndexSize is not available for FullTextCatalog</strong>" and with the names of the catalogs: <strong>ix_STS_Content_TFS</strong> and <strong>TeamFoundationServer10FullTextCatalog</strong>. I did not find much (except for this incomplete posts). Anyway, I understood that I have to drop and recreate the catalogs. After doing this the catalogs were rebuild and everything worked.</p><p>Here are the steps I took to recreate the catalogs.</p><p><strong><span style="color:#ff0000;">Please notice that this part is done by the Team Foundation Server installation and I did this only because the catalogs were corrupted. If you are not familiar with this stuff I suggest you consult with a Team System advisor or try to reinstall the server. Any way don't forget to backup the database. Since in this case you have problem doing it because the corrupted catalogs disturb the backup I suggest you copy the data files (mdf and logs) to another location (after you stop the system...) or find a way to disable backing up the catalogs (I read about it some where).</span></strong></p><p>Open <strong>Microsoft SQL Server Management Studio</strong> and connect to the Team Foundation Server database.</p><p>For recreating the <strong>ix</strong>_<strong>STS_Content_TFS</strong> catalog do the following: </p><ul><li>In the object explorer expand: <strong>Databases</strong> --> <strong>STS_Content_TFS</strong> --> <strong>Storage</strong> and right click the <strong>ix_STS_Content_TFS</strong> catalog. Select <strong>Delete</strong> from the menu and press <strong>OK</strong> button in the <strong>Delete Object</strong> window. This will drop the corrupted catalog (if your catalog is corrupted you will see error when trying to open it's properties window). </li></ul><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp2tWa9pbVihivK2YjGU7wZ3ImFEApJdYGJBBDUCc7FCMg_pG45w1KfjGncWZOn7B6iTdrf2opWZqh4ZKSD2kyiofU0gbTMRzVubyoYcUEBbDAxiQDDGIX0s6Z77YLqqnyT6e_/s1600-h/Delete.png"><img id="BLOGGER_PHOTO_ID_5103964443634297122" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp2tWa9pbVihivK2YjGU7wZ3ImFEApJdYGJBBDUCc7FCMg_pG45w1KfjGncWZOn7B6iTdrf2opWZqh4ZKSD2kyiofU0gbTMRzVubyoYcUEBbDAxiQDDGIX0s6Z77YLqqnyT6e_/s400/Delete.png" border="0" /><br /><ul><li></a></li></ul>Right click the <strong>Full Text Catalogs</strong> item and select <strong>New Full-Text Catalog...</strong> from the menu. In the <strong>New Full-Text Catalog - STS_Content_TFS</strong> enter the name of the catalog: <strong>ix_STS_Catalog_TFS, </strong>select a location for the files, select <strong>Primary</strong> in the <strong>Filegroup</strong> combo box and in the <strong>Owner</strong> text box select <strong>dbo</strong>. Press the <strong>OK</strong> button.<br /><li><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2gh-iY9Uyvd6dm5Zd0OBo2MThg_oh8Rw-gd-W0IhYA2mro3ZJBBDrca1Lg2X9vEMwycXeyqL3nv9Uvfi9XlOcLbNz1Aya67HWL-ERA43O4Q3T4N4ZMu7bRwDC_i_IVpb1RoPF/s1600-h/New.png"><img id="BLOGGER_PHOTO_ID_5103968459428718898" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2gh-iY9Uyvd6dm5Zd0OBo2MThg_oh8Rw-gd-W0IhYA2mro3ZJBBDrca1Lg2X9vEMwycXeyqL3nv9Uvfi9XlOcLbNz1Aya67HWL-ERA43O4Q3T4N4ZMu7bRwDC_i_IVpb1RoPF/s400/New.png" border="0" /></li></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2gh-iY9Uyvd6dm5Zd0OBo2MThg_oh8Rw-gd-W0IhYA2mro3ZJBBDrca1Lg2X9vEMwycXeyqL3nv9Uvfi9XlOcLbNz1Aya67HWL-ERA43O4Q3T4N4ZMu7bRwDC_i_IVpb1RoPF/s1600-h/New.png"><li></a></li>Double click the newly created catalog in the <strong>Object Explorer</strong> tree. In the <strong>Full-Text Catalog Properties - ix_STS_Content_TFS</strong> select the <strong>Tables/Views</strong> from the left list view. Add the tables: <strong>dbo.Docs</strong>, <strong>dbo.Lists</strong>, <strong>dbo.UserData </strong>and <strong>dbo.UserInfo</strong> to the <strong>Table/View objects assigned to the catalog</strong> and start setting the <strong>Eligible colums</strong> for the tables. <li>For <strong>dbo.Docs</strong> select the <strong>Content</strong> and <strong>LeafName</strong>. For both of them select the language <strong>English</strong> in the <strong>Language for Word Breaker</strong> setting column. For <strong>Content</strong> select <strong>Extension</strong> in the <strong>Data Type</strong> Column.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYQAj88n0Auhr_XRiqXiW5cDKiy1mqf7X1wKEQ-SZaHuiXu4UA0YLORsFKSMRcgHdMT6g6TtfiSWUgUtOGZNxtprIv2C2SdBN08MzLXUx0SRcV35agf7BXNOQsKVlv-b8i6uoQ/s1600-h/Docs.png"><img id="BLOGGER_PHOTO_ID_5103976667111221570" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYQAj88n0Auhr_XRiqXiW5cDKiy1mqf7X1wKEQ-SZaHuiXu4UA0YLORsFKSMRcgHdMT6g6TtfiSWUgUtOGZNxtprIv2C2SdBN08MzLXUx0SRcV35agf7BXNOQsKVlv-b8i6uoQ/s400/Docs.png" border="0" /></a></li><li>For the <strong>dbo.Lists</strong> table select the <strong>tp_Description</strong> and <strong>tp_Title columns</strong>. For both of them select the language <strong>English</strong> in the <strong>Language for Word Breaker</strong> setting column.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-R5HPPG4xQs8NcHA6UqMtU53jwkTId2KDRjzCVdhmVXSbJRElx8TuIeF8x4pLfh_DJDu-Lo6APBYmsD78lFavN0_4JGAtGaTuBcR192scCEe-EV8o34tG34DJPU01ZgrOKdpj/s1600-h/Lists1.png"><img id="BLOGGER_PHOTO_ID_5103976946284095826" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-R5HPPG4xQs8NcHA6UqMtU53jwkTId2KDRjzCVdhmVXSbJRElx8TuIeF8x4pLfh_DJDu-Lo6APBYmsD78lFavN0_4JGAtGaTuBcR192scCEe-EV8o34tG34DJPU01ZgrOKdpj/s400/Lists1.png" border="0" /></a></li><p><img id="BLOGGER_PHOTO_ID_5103977010708605282" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizXvxdWUgFhekedndlwiqy5adgblfK9DL2Yg2hSpAXTCtJUZztg9HpeeOHxzk_IPxEPvVOJ6W-_ak_CJ4sk79UoiFX4HgKV03Jeqbn-n0bmZpSphadFrHiqXCMILJvEDxEdCIt/s400/Lists2.png" border="0" /></p><ul><li>For the <strong>dbo.UserData</strong> table select all the columns except for <strong>tp_Ordering</strong>.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMfCCLIMIqcmZmSR4_X_hHjVMF0O2HyDTwYCbBOF5oDJmqIb0-wRJe5o2d5vSUvxIYdHFl8fSi0MmLzFM9PAgWWMwi-W6bHjIRpO1hKEvdMjiDR18I7GQDA5mk0SKAME6Qq3R/s1600-h/UserData.png"><img id="BLOGGER_PHOTO_ID_5103977109492853106" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCMfCCLIMIqcmZmSR4_X_hHjVMF0O2HyDTwYCbBOF5oDJmqIb0-wRJe5o2d5vSUvxIYdHFl8fSi0MmLzFM9PAgWWMwi-W6bHjIRpO1hKEvdMjiDR18I7GQDA5mk0SKAME6Qq3R/s400/UserData.png" border="0" /></a></li><li>For the <strong>dbo.UserInfo</strong> table select the <strong>tp_Email</strong>, <strong>tp_Login</strong> and <strong>tp_Title</strong> columns. For all of them select <strong>English</strong> in the <strong>Language for Word Breaker</strong> setting column.<br /><img id="BLOGGER_PHOTO_ID_5103977169622395266" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEcKLoSaHm_fOQ4hnbM7u9Y9fwQnlu2ZmgPW8MOFT88dVi9V8FIb-7npFjlSRIgrGwQoE0gWOC2PxvsNZ7DFxV1FiTe2hrACWuhwxVmLstnaRQF62e-J8HZDZOApguxvZqixnY/s400/UserInfo.png" border="0" /></li><li>Press the <strong>OK</strong> button. The catalog should be processed for some time. </li></ul><p>For recreating the <strong>TeamFoundationServer10FullTextCatalog</strong> catalog do the following: </p><ul><li>In the object explorer expand: <strong>Databases</strong> --> Tfs<strong>WorkItemTracking</strong> --> <strong>Storage</strong> and right click the <strong>TeamFoundationServer10FullTextCatalog</strong> catalog. Select <strong>Delete</strong> from the menu and press <strong>OK</strong> button in the <strong>Delete Object</strong> window. This will drop the corrupted catalog.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVMu299OajUBfervD4Bj1_M0L77rfl9mT3SM8FMAVuZ7Uof066FJcSewuGsZoMzxkozTJqFAQGgJIFjnMLa9M7neJHAp4vxk3IEBZ9aJD-bbAe5iD-vjUKX6h4auxC9LE2PIfL/s1600-h/Delete1.png"><img id="BLOGGER_PHOTO_ID_5103983040842688914" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVMu299OajUBfervD4Bj1_M0L77rfl9mT3SM8FMAVuZ7Uof066FJcSewuGsZoMzxkozTJqFAQGgJIFjnMLa9M7neJHAp4vxk3IEBZ9aJD-bbAe5iD-vjUKX6h4auxC9LE2PIfL/s400/Delete1.png" border="0" /></a></li><br /><li>Right click the <strong>Full Text Catalogs</strong> item and select <strong>New Full-Text Catalog...</strong> from the menu. In the <strong>New Full-Text Catalog - TfsWorkItemTracking</strong> enter the name of the catalog: <strong>TeamFoundationServer10FullTextCatalog</strong>, select a location for the files, select Primary in the Filegroup combo box and in the Owner text box select dbo. Check the <strong>Set as default catalog</strong> check box. Press the <strong>OK</strong> button.<br /><img id="BLOGGER_PHOTO_ID_5103984694405097890" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYmVxN706H7o6_8W5R9xeRSBe2Xcl8ivUnPPHSabzYqrMhAROFUUO3sn95bX51MreH1p9ae1wAvzMby_IHarFf7fW50042iPSuWPpk_sNv0PHgXxn3HnHUFZMUIjylm18E3_ot/s400/New1.png" border="0" /></li><li>Double click the newly created catalog in the <strong>Object Explorer</strong> tree. In the <strong>Full-Text Catalog Properties - TeamFoundationServer10FullTextCatalog</strong> select the <strong>Tables/Views</strong> from the left list view. Add the tables: <strong>dbo.WorkItemLongTexts</strong> to the <strong>Table/View</strong> objects assigned to the catalog. In the <strong>Eligible columns</strong> select the <strong>Words</strong> column and press the <strong>OK</strong> button. The catalog should be processed for some time and the window will be closed.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4dNUIPHtQdxxcdVvP2B3vSsd5SHwvBUaMSHiXQxZAHUe1pUydf1CTALRVEAl5jRcgZNoFpgYWyovqMd7tBWtDdB_2wT057_HgvnakBPdkhJWrRPWUy4gIz1OeMbQIFHUxIv9C/s1600-h/WorkItemLongTexts.png"><img id="BLOGGER_PHOTO_ID_5103984745944705458" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4dNUIPHtQdxxcdVvP2B3vSsd5SHwvBUaMSHiXQxZAHUe1pUydf1CTALRVEAl5jRcgZNoFpgYWyovqMd7tBWtDdB_2wT057_HgvnakBPdkhJWrRPWUy4gIz1OeMbQIFHUxIv9C/s400/WorkItemLongTexts.png" border="0" /></a></li></ul><p>That's it. The catalogs were created and you should be able to process them. </p>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-70491246846610307752007-07-17T07:45:00.000+03:002007-07-17T08:26:06.191+03:00How to Expose the Work Item Editor ControlI've used this while writing the Cropper TFS Work Item plugin. I needed a way to edit or create a new work item. The <strong>WorkItemFormControl</strong> located under the <strong>Microsoft.TeamFoundation.WorkItemTracking.Controls</strong> namespace is the same control used by Visual Studio work item plugin and also by the process template editor (which was the way I found how to use it).<br /><br />Here's an example for creating a new work item with the control.<br /><br />First we need to connect to a Team Foundation Server and obtain the WorkItemStore service:<br /><br /><strong>TeamFoundationServer</strong> tfs = new <strong>TeamFoundationServer</strong>(serverName);<br />tfs.EnsureAuthenticated();<br /><strong>WorkItemStore</strong> wis = tfs.GetService(typeof(<strong>WorkItemStore</strong>)) as <strong>WorkItemStore</strong>;<br /><br />After doing so we can now create the WorkItemFormControl:<br /><br /><strong>WorkItemFormControl</strong> wifc = new <strong>WorkItemFormControl</strong>();<br /><br />The WorkItemFormControl has a string property named FormDefinition. We need to set this property with an XML defining the work item type that we want to use. To do so we use the WorkItemStore service:<br /><br /><strong>WorkItemType</strong> wit = wis.Projects[teamProjectName].WorkItemTypes["Bug"];<br /><br />This will return the the Bug work item type.<br /><br />After doing so we can use the WorkItemType to set the FormDefinition property:<br /><br /><strong>XmlDocument</strong> xmlDocument = wit.Export(false);<br />wifc.FormDefinition = xmlDocument.InnerXml;<br /><br />Now we can use the WorkItemFormControl with a newly created work item or an existing one:<br /><br /><strong>WorkItem</strong> wi = new <strong>WorkItem</strong>("Bug"); or <strong>WorkItem </strong>wi = wis.GetWorkItem(bugId);<br />wifc.Item = wi;<br /><br />To show the control embed it to a form or a panel on a form.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com4tag:blogger.com,1999:blog-16754876.post-26295264842179536952007-06-06T15:07:00.001+03:002007-06-06T15:09:48.718+03:00CropperTFSPluginI have uploaded the plugin to CodePlex. Here's the link to the project: <a href="http://www.codeplex.com/CropperTFSPlugin">http://www.codeplex.com/CropperTFSPlugin</a>.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com1tag:blogger.com,1999:blog-16754876.post-89263162100015543162007-05-30T11:07:00.001+03:002007-06-06T15:10:10.691+03:00Cropper TFS Work Item PluginIt's been a while since I wrote here. Anyway, I hope this post will compensate for it. I read this week a post about <a href="http://blogs.msdn.com/bharry/archive/2007/05/24/snagit-integration-with-tfs.aspx">SnagIt! integration with TFS</a>. Since I use <a href="http://www.codeplex.com/cropper">Cropper </a>I've decided to write a plugin for TFS.<br />The plugin enables you to capture images directly to a new TFS work item attachments field. You can also add an attachment to an existing work item. You can download it from <a href="http://www.epocalipse.com/dudu/CropperTFSWorkItemPlugin.zip">here</a>. Read the read me file for installation guide and how to use it.<br />The plugin uses the <strong>WorkItemFormControl</strong> to edit the work item. I will explain in future posts on how to use it.<br />I'm planning to add the sources to <a href="http://www.codeplex.com/cropperplugins">Cropper Plugins </a>project in <a href="http://www.codeplex.com/cropper">CodePlex</a>.<br />The plugin is in it's early stages. I would be happy to hear your comments.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com19tag:blogger.com,1999:blog-16754876.post-86231041901503041982007-04-17T09:20:00.001+03:002007-04-17T09:22:29.242+03:00How to Get Build Result Details using TFS API - Part 3<span xmlns=""><p><span style="font-family:Georgia;">The <a href="http://notsosmartbuilder.blogspot.com/2007/04/how-to-get-build-result-details-using.html">previous post</a> in this series was about the build steps section of the build report. In this post we will see how to retrieve the associated changesets section details.<br /><br />Using the BuildStore object we have created in this <a href="http://notsosmartbuilder.blogspot.com/2007/03/how-to-get-build-result-details-using.html">post</a> we can get a list of ChangeSetData objects that contain the needed information (an example on how to get the buildUri parameter value available in this <a href="http://notsosmartbuilder.blogspot.com/2007/03/how-to-get-build-result-details-using.html">post</a> also):<br /></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:#2b91af;">ChangeSetData</span>[] changesets = buildStore.GetChangeSetsForBuild(buildUri);<br /></span></p><p><br /> </p><p><span style="font-family:Courier New;font-size:10;"><span style="color:blue;">foreach</span> (<span style="color:#2b91af;">ChangeSetData</span> changeset <span style="color:blue;">in</span> buildReport.Changesets)<br /></span></p><p><span style="font-family:Courier New;font-size:10;">{<br /></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:#2b91af;">MessageBox</span>.Show(changeset.ChangeSetId.ToString());<br /></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:#2b91af;">MessageBox</span>.Show(changeset.ChangeSetUri);<br /></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:#2b91af;">MessageBox</span>.Show(changeset.CheckedInBy);<br /></span></p><p><span style="font-family:Courier New;font-size:10;"><span style="color:#2b91af;">MessageBox</span>.Show(changeset.Comment);<br /></span></p><p><span style="font-family:Courier New;font-size:10;">}<br /></span></p><p><span style="font-family:Courier New;font-size:10;"><br /></span> </p></span>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com3tag:blogger.com,1999:blog-16754876.post-2531250929825396602007-04-12T11:51:00.001+03:002007-04-12T11:59:03.747+03:00Extracting Images from Work Items Attachments<p>In this example I will show how to use the WorkItemStore interface. This example will execute a stored query on the work items database and will extract the attachments from the work items returned from the query. This is a good training for working with the WorkItemStore interface.</p><p></p><p>private void ExtractWorkItemsAttachments(string teamFoundationServer, string teamProject, string storedQuery,</p><p>string saveTo)</p><p><span style="color:#0000ff;"></span>{<br /> //Logon to the server and create the needed objects<br /> TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(teamFoundationServer);<br /> tfs.EnsureAuthenticated();<br /> WorkItemStore store = (WorkItemStore)tfs.GetService(typeof(WorkItemStore));<br /> Project tfsProject = store.Projects[teamProject];<br /> StoredQueryCollection sqc = tfsProject.StoredQueries;<br /> string querystring;<br /> //Search for the query<br /> foreach (StoredQuery query in sqc)<br /> {<br /> if (query.Name == storedQuery)<br /> {<br /> //Execute the query<br /> querystring = query.QueryText;<br /> querystring = querystring.Replace("@project", "'" + tfsProject.Name + "'");<br /> WorkItemCollection workItems = store.Query(querystring);<br /> //Extract the attachments<br /> foreach (WorkItem workItem in workItems)<br /> {<br /> if (workItem.Attachments.Count > 0)<br /> {<br /> foreach (Attachment attachment in workItem.Attachments)<br /> {<br /> //Using WebClient to download the attachment<br /> WebClient webClient = new WebClient();<br /> webClient.Credentials = CredentialCache.DefaultCredentials;<br /> string fileName = Path.Combine(saveTo, attachment.Name);<br /> webClient.DownloadFile(attachment.Uri.AbsoluteUri, fileName);<br /> }<br /> }<br /> }<br /> }<br /> }<br />}</p>Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com2tag:blogger.com,1999:blog-16754876.post-26749659924139573072007-04-10T06:51:00.000+03:002007-04-10T07:13:26.291+03:00How to Get Build Result Details using TFS API - Part 2The <a href="http://notsosmartbuilder.blogspot.com/2007/03/how-to-get-build-result-details-using.html">previous post</a> in this series was about the summary section of the build report. In this post we will see how to retrieve the build steps section details.<br />Using the BuildStore object we have created in the <a href="http://notsosmartbuilder.blogspot.com/2007/03/how-to-get-build-result-details-using.html">previous post</a> we can get a list of BuildStepData objects that contain the needed information (an example on how to get the buildUri parameter value available in the <a href="http://notsosmartbuilder.blogspot.com/2007/03/how-to-get-build-result-details-using.html">previous post</a> also):<br /><br /><span style="color:#339999;">BuildStepData</span>[] buildSteps = buildStore.GetBuildSteps(buildUri);<br /><br />Now we can go through all the objects in the collection and retrieve details for each one of them.<br /><br />foreach (<span style="color:#339999;">BuildStepData</span> in buildSteps)<br />{<br /><span style="color:#339999;">MessageBox</span>.Show(buildStep.BuildStepMessage);<br /><span style="color:#339999;">MessageBox</span>.Show(buildStep.BuildStepName);<br /><span style="color:#339999;">MessageBox</span>.Show(buildStep.FinishTime.ToString());<br /><span style="color:#339999;">MessageBox</span>.Show(buildStep.Status.ToString());<br />}Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-31241525933111679282007-03-29T14:06:00.000+02:002007-03-29T14:09:38.944+02:00How to Dock the Vista Toolbars to the Edge of the ScreenI found a way to dock Vista toolbars to the edge of the screen since drag and drop does not work anymore:<br />1) Create a new folder on the desktop<br />2) Drag it to on of the edges so it would become a toolbar<br />3) Right click the toolbar and select the toolbar that you want to show<br />4) Now you can define the toolbar behaviour (Auto Hide, Alway on Top)Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com4tag:blogger.com,1999:blog-16754876.post-25024063867857676832007-03-14T06:40:00.000+02:002007-03-14T07:20:12.412+02:00How to Get Build Result Details using TFS API - Part 1In this series of posts I would explain how to use TFS API in order to retrieve build result details as they appear in the build report.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpo_1qzfwvP1b6q-afTQ6ry9u0_YWP1jwQyMA4jsO_uT7ES8EAAN7MYnGySjSn0CVn_Ij0xpvXSMVVkZ5sfUrzA1jxSCwDRPikCBX2ZKEuZ23qWVRsHi_WKvMNUMPmFoJSzPoX/s1600-h/BuildReport.PNG"><img id="BLOGGER_PHOTO_ID_5041640332785454050" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpo_1qzfwvP1b6q-afTQ6ry9u0_YWP1jwQyMA4jsO_uT7ES8EAAN7MYnGySjSn0CVn_Ij0xpvXSMVVkZ5sfUrzA1jxSCwDRPikCBX2ZKEuZ23qWVRsHi_WKvMNUMPmFoJSzPoX/s400/BuildReport.PNG" border="0" /></a><br /><br />In order to retrieve result details for a build we need to create a BuildStore object. There is an example on how to create a BuildStore object on a previous post: <a href="http://notsosmartbuilder.blogspot.com/2006/12/get-build-changes-changesetdata.html">Get Build Changes</a>. The example take into consideration that you have already created the BuildStore object and it is named buildStore.<br /><br />In this post we will see how to retrive the details under the summary section of the build report. First, we need to get the BuildData object for the build. Here's how to get the BuildData object:<br /><br /><span style="color:#339999;">BuildData</span> buildData = buildStore.GetBuildDetails(buildStore.GetBuildUri(teamProject, buildNumber));<br /><br />Now that we've got the BuildData object we can retrieve the build details that appear in the summary section of the report:<br /><br />buildData.BuildNumber<br />buildData.RequestedBy<br />buildData.TeamProject<br />buildData.BuildType<br />buildData.BuildMachine<br />buildData.StartTime<br />buildData.FinishTime<br />buildData.LastChangedBy<br />buildData.LastChangedOn<br />buildData.BuildQuality<br />buildData.LogLocation<br /><br />On the next post for this series I will explain how to retrieve the details for the "Build Steps" section of the report.Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com0tag:blogger.com,1999:blog-16754876.post-73189251870587874702007-02-25T07:09:00.000+02:002007-02-25T07:19:16.780+02:00Start a Team Build Using BuildProgressFormI found out another way for starting a build using the BuildProgressForm. The BuildProgressForm is the same one used by Visual Studio Team Build intergration for starting a build.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcKGwaQLlFkCS7yjVYm7pvzy8EtqQqp0TxgIn2C8HT2_j4eON1WP3fsrwmdUiyGpn1FmKwZ7LPV5ybDaW-4z9o68bBBLw4IORKgC30Keh6pZnbrcKS6czya6O3eKjfm9XF_-Fb/s1600-h/StartingBuild.JPG"><img id="BLOGGER_PHOTO_ID_5035335865818866594" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcKGwaQLlFkCS7yjVYm7pvzy8EtqQqp0TxgIn2C8HT2_j4eON1WP3fsrwmdUiyGpn1FmKwZ7LPV5ybDaW-4z9o68bBBLw4IORKgC30Keh6pZnbrcKS6czya6O3eKjfm9XF_-Fb/s400/StartingBuild.JPG" border="0" /></a><br /><br /><br />This method is very useful for my tool <a href="http://www.codeplex.com/TFSBuildManager">TFSBuildManger</a>.<br />Here's an example of how to do so:<br /><br /><span style="color:#339999;">BuildParameters</span> buildParameters = <span style="color:#3333ff;">new</span> <span style="color:#339999;">BuildParameters</span>();<br />buildParameters.TeamFoundationServer = teamFoundationServer; buildParameters.TeamProject = teamProject;<br />buildParameters.BuildType = buildType;<br />buildParameters.BuildMachine = buildmachine;<br />buildParameters.BuildDirectory = buildDirectory;<br /><span style="color:#339999;">BuildProgressForm</span> frmBuildProgress = <span style="color:#3333ff;">new</span> <span style="color:#339999;">BuildProgressForm</span>(buildParameters, teamFoundationServer);<br />frmBuildProgress.ShowDialog();Dudu Shmayahttp://www.blogger.com/profile/17205013318951347855noreply@blogger.com1