Where does Visual studio 2010 Checked-in items in Registry Editor? - tfs

I'm using TFS.
My problem changing the path "Debug>Options and Settings>Source Control>Environment" where is the Registry Editor.
example:
i change check box "Show deleted items in the Source Control Explorer" in change the
"HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\ShowDeletedItems data value change False in registry editor
but i change combo box" checked-in items -> Saving or Editing " the value. I am not found in registry editor. where is it in registry editor ?

All the values you are after, reside under "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\SourceControl".Those settings are generic for VS and apply regardless of the SCM used. So, it makes sense these don't reside under "..\TeamFoundation..".The following is a mapping of reg-value names against their representation in VS:GetFiles >> Get everything when a solution or project is openedCheckInFiles >> Check in everything when closing a solution or projectSilentCheckOut >> Display silent check out command in menus
KeepCheckedOut >> Keep items checked out when checking in
SaveUncheckedOut >> Checked-in items / Saving
CheckOutOnEdit >> Checked-in items / Editing
AllowInMemoryEditing >> Allow checked-in items to be editedThe items found in the dialog "Source Control"\"Visual Studio Team Foundation Server" obviously apply only when SCM is TFS.

Related

Adding new "tab" to a bug work item in TFS 2017

I am trying to add a new "tab" to bug item in TFS 2017. Looking at the "tabs" you see things like "Steps to Reproduce", System, etc.
I have found information on changing work item types but nothing about adding a new "tab" across the top where you see Steps to Repro, System, Test Cases, Tasks. The change I want to make may not be possible? Or it is possible I don't know the correct verbiage to use when asking google. The think I want to change may not be a tab control at all it maybe something else different.
Thanks
***************** Updated questions after posting *****************************
After playing around with Process Editor -> WIT -> Open WIT from server -> Bug
as suggested by Andy Li-MSFT I don't see a lot of control on the formatting on the tab. I was planning to add fields in a grid like pattern like a table as shown below. I am able to get the values in the drop down list for field1 and add the fields. However I have a couple follow up questions if you have time.
Setting either the control or column for the control to read-only the column will not render when adding a new bug. I have a little more control if I set AllowedValues and Frozen for the column however the value can still be changed. Is there a better way to set read-only?
There is not much control on the layout. I am OK adding a lot of fields but would like them to be displayed in a table like structure. Is there a way to control the look of the fields on the form?
Is there a way to add the fields in a grid? This would be ideal so I only have one header for each column.
The last-updated-by and last-updated-date. Is it possible to track on a row level who made a change? If not I would be OK just adding a last updated by and last updated date to the new tab. Row level updates would be nice.
<pre>
Field 1 Field 2 (Read-only) Field 3 Last Updated By Last updated Date
Status (completed, empty, N/A) "Some text here which describes something to do" "Optional comments" tfs user name date/time
Status (completed, empty, N/A) "Some text here which describes something to do" "Optional comments" tfs user name date/time
</pre>
You need to modify the WIT definition file (Bug work item type in your scenario).
You can try below ways to do that:
Export the WIT definition file with witadmin commands, add a new tab under <TabGroup> and add a new control for it, then save and import the file. See Import, export, and manage work item types for details.
e.g:
<Tab Label="Tab0501">
<Control FieldName="System.ChangedDate" Type="DateTimeControl" Label="Test0501:" LabelPosition="Left" />
</Tab>
You can also use the TFS Power Tools to export/import WIT definition files or directly modify the files from server:
Visual Studio 2015 : Microsoft Visual Studio Team Foundation Server
2015 Power Tools
Visual Studio 2017 : TFS Process Template Editor
Reference below screenshot to do that.
Another way is writing an extension to Extend the work item form, you can reference my answer in another thread to do that.

TFS 2012 Build Definition/Template - How to set Build Quality Automatically?

I thought this would be pretty straight forward, but it looks like the template has to be modified. Anyone have any idea what to do to add this piece to the default template?
I know how to edit the templates, I just don't know what I need to do to make this work.
This case already provided a solution for your requirement:
Copy the DefaultTemplate.xaml to DefaultTemplateCustom.xaml and open it
Click the Collapse All link in the top right corner
Open the toolbox and locate the Assign activity. It is located in the Primitives section
Drag the Assign activity to the end of the workflow, after the "Run MSBuild" activity
Go to the properties window. Set the "To" parameter to BuildDetail.Quality. Set "Value" to "xxx (Build Quality)"
Locate the InvokeMethod in the toolbox and drag it and drop it after the Assign activity
Set the "Target Object" to BuildDetail. Set "MethodName" to Save
Save the build definition xaml file and check it in, then build with the customized definition.
You can also consider to create a powershell script to set the build quality via TFS API and then invoke this powershell script in your build template. Refer to this link for details: PowerShell and TFS: The Basics and Beyond.
Here is a simple script to set the build quality:
$builduri = "vstfs:///Build/Build/1";
$collectionurl = "http://xxxx:8080/tfs/xxx/";
$tfs = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($collectionurl);
$buildservice = $tfs.GetService([Microsoft.TeamFoundation.Build.Client.IBuildServer]);
$build = $buildservice.GetBuild($builduri);
$build.Quality = "Released";
$build.Save()

How can I clean the Parameters field in the Run -> Parameters menu?

I'm using the CodeGear RAD Studio IDE.
In order to test my application with command line parameters I used a few times the "Parameters" field in the "Run -> Parameters" menu.
But every time I provide it with a new value, it could not be deleted from the "dropdown box".
I need to clean this field (erase all the values), since in some cases there is information on them that I don't want to share with people that occasionally could use my machine.
How can I clean this field?
The Delphi 2007 Parameters list is stored in the Windows registry in the HKEY_CURRENT_USER\Software\Borland\BDS\5.0\History Lists\hlRunParameters location
To clean that list remove the ItemN entries and set the value of the Count key to 0.

How can I find all of the labels for a particular TFS project sub-folder?

Assume there is a TFS project Project with the subfolders trunk and 1.0. trunk contains the latest version of the application code for this project and 1.0 contains the code for the same application for the released version of the same name.
There are labels for both sub-folders and all of the labels include files in only one of the sub-folders. [You could also assume that the labels are recursive on a specific (maximum) changeset for all of the files in the entire sub-folder too if that simplifies your answer.]
How can I create a list of labels for one of these sub-folders, using Visual Studio, the TFS tf.exe command line tool, or any other tool or code that is publicly (and freely) available.
Note – I've written T-SQL code that queries the TFS version control database directly to generate this info, but I'm curious whether there are 'better' ways to do so.
In Visual Studio, in the Source Control Explorer window, right-click the sub-folder for which you want to list the relevant labels and pick View History from the context menu. In the History window that should appear, there should be a sub-tab Labels (as highlighted below) that lists labels applied to that sub-folder (but not specific items in that sub-folder).
To find labels in Visual Studio
Open Source Control Explorer.
In Source Control Explorer, open the shortcut menu for the collection, team project, branch, folder, or file that you are looking for.
Select View History. You will see a new window with all the Changesets.
Select Labels in the tab menu as highlighted in the below image.
I needed to do this on the command line today so here is a batch file that hopefully does the same thing (we've only just started using TFS and have limited labels on folders to test the OP's requirements).
You'll need to edit the collection parameter to tf to whatever your setup is, and possibly provide the login details depending on how your authentication is done.
#ECHO OFF
SETLOCAL EnableDelayedExpansion
#REM Check required parameters
IF [%1]==[] GOTO :usage
tf labels /owner:* /format:detailed %2 /collection:http://server:8080/tfs/collection > labels.txt 2> nul
SET CURRENT_LABEL=
FOR /F "tokens=1,2,3" %%G IN (labels.txt) DO (
IF [%%G]==[Label] (
SET CURRENT_LABEL=%%I
) ELSE (
IF /I [%%H]==[%1] (
ECHO !CURRENT_LABEL!
)
)
)
DEL labels.txt
GOTO :eof
#REM Subroutines
:usage
echo tfs_labelsforfolder - Display all labels that are applied to a folder.
echo.
echo tfs_labelsforfolder ^<folder^> ^[label_filter^]
echo.
echo folder - The folder to show the labels for, e.g. $/Project/folder
echo label_filter - Search pattern to use in tf labels command.
echo.
GOTO :eof

TFS shortcut to compare a modified file with the latest version

Right now I have to pull up Pending Changes window, right-click on the file and select Compare->With Latest Version... Is there a faster way to look at my modifications?
Keyboard Shortcut for doing TFS Compare
In the Team Explorer window under Pending Changes:
shift + enter on file
will compare the files
shift + double click on file
will compare file in background
Create visual studio mapping for the commands:
Set the shortcut for compare folder under Source Control
Explorer, you should set the shortcut keys for File.TfsFolderDiff
command.
Set the shortcut for compare specific file under
Source Control Explorer, you should set the shortcut keys for
File.TfsCompare command
Note: To set the keyboard shortcuts, open "Tools > Options". In the dialog that opens, go to "Keyboard". Example:
Note: The folder compare shortcut is only valid from the "Source Control Explorer". It is the same as right clicking in the "Source Control Explorer" and selecting "Compare...".
References:
Keyboard shortcut for File Compare?
Comparison keyboard shortcuts for Pending Changes in TFS by Alex Meyer-Gleaves.
How to Double Click to Diff Pending Changes in TFS by Richard Banks
TFS Shortcut to do a diff on all modified files with latest version
You can switch the double-click behaviour in the pending changes window to do a compare with latest by changing a registry setting:
Path: HKCU\Software\Microsoft\VisualStudio\<ver>\
TeamFoundation\SourceControl\Behavior
Value: DoubleClickOnChange (DWORD)
0 == view as the primary command (default)
1 == compare as primary command
You can find more information here:
How to Double Click to Diff Pending Changes in TFS.
A comment on that post also shows the entry to set if you want to use a shortcut key to do the comparison instead.
You can add hotkey bindings for TFS context menu commands, which may be an approach that will work for what you need.
Go to Tools > Options > Keyboard. In the 'filter' field, type 'TFS' and it'll show a list of all TFS commands that you can bind hotkeys to. The Source Control comparison ones can be shortlisted with "CompareWith". I've bound hotkeys in this way to the pending changes window's context menu, which is a great timesaver versus working your way down that tortuous context menu, but there may be other options that suit your needs better.
Another alternative could be to set up an alias in Command Window and use it. To bring up the compare window:
Open Command Window (ctrl + alt + A)
Set alias for File.TfsCompare
alias diff File.TfsCompare
Next time you need to do the compare, type 'diff' and hit enter in the command window. 'diff' is an alias name, could be set to whatever of your choice. If you want to delete alias, use
alias aliasName /d

Resources