How to open TFS Power Tools - Alerts Explorer - tfs

I have TFS 2010 and Visual Studio 2010 Ultimate and the April TFS 2010 Power Tools installed. I am a Project Collection Administrator on my TFS Server (so permissions should not be an issue).
I want to open the alerts explorer, but when I right click on a project tab it is not there:
Just in case I tried upgrading to the March version of the TFS 2010 Power Tools. There was no change.
Opening the "Project Alerts" just gets me the normal Alerts dialog. I need to make a new alert.
Any ideas how I can get the missing menu item back?
Edit: I tried manually adding the menu item to the context menu. But I cannot find Alerts Explorer in any of the command lists.

It seems Alerts Explorer is no longer available in Team Project menu.
To create an Alert, you can open Alerts Explorer in following ways:
From the Team menu in Visual Studio, click Alerts Explorer.
From the Team Explorer window, right-click the server\team project collection and then click Alerts Explorer.
For Work Items, you can Right Click a Work Item and choose 'Alert on change..'.
For Source Control, Right Click Source Control Items and choose 'Alert on Change..'.

We had to install the Team Foundation Server Power Tools from December 2011 at http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f

Related

VS2012: How do I browse the TFS repository?

How do I browse the TFS repository in VS2012?
I've been through all the Team Explorer window options and can't find the one that open the window to browse all the folders/projects in the TFS repository.
(1) To browse the version control folders, select Menu View, Other Windows and then Source Control Explorer.
(2) To browse all team projects and teams within the connected Team Project Collection, select Projects and My Teams in Team Explorer.
(3) To include deleted folders and files for version control using Source Control Explorer, select Tools, Source Control, and ensure the Show deleted items in Source Control Explorer checkbox is selected under the Visual Studio Team Foundation Server node.
From the Team Explorer, select the "Home" button in the toolbar (or choose "Home" from the context menu), then choose "Source Control Explorer".
I know where it is, but I can't remember the exact menu options. :(
But you connect to a TFS box, then you choose the projects (TFS projects not code projects) you are interested in. Given you have access, they'll then appear as top level items in the team explorer window.
I think it's Connect / Open From Source Control?? option under source control in the File menu.

How do you prevent two persons from editing the same file?

In TFS 2010, How do you prevent two persons from editing the same file?
You want to remove the multiple checkout option.
You will need permissions on the Team Project to change it – if you are unsure, speak to your TFS Administrator.
To get to the option itself, first go into Visual Studio, to the Team Explorer and then right click on the project you want to change the option for. Then select Team Project Settings, then select Source Control.
In the dialog that appears, untick “Enable multiple check-out” and hit ok.
(quoted from http://www.neillans.co.uk/?p=492)
If you want to do it on a specific file/check-out, when you choose to Check Out a file the dialog allows you to select from a handful of lock types that can prevent other developers from checking out or in that file while you have it checked out.
In Visual Studio 2015 and 2017 follow the steps:
1. Open Team Explorer if VS and go to Settings
Open Team Project Source Control Settings and uncheck Enable multiple check-out

Migrate Local projects to TFS

I have about 14 projects (different solution files) that are sitting on local dev box. Just got connected with TFS 2010. How do I move these projects to TFS 2010 (without getting vss involved)?
If you have Visual Studio 2005 or Visual Studio 2008 installed, then the first thing you need to do is install Team Explorer 2005 or 2008 from the TFS 2005 or TFS 2008 media. You'll then need to install the TFS 2010 forward compatibility GDR (2005, 2008) For the forward compatibility information, see this post.
If you have Visual Studio 2010 installed, then Team Explorer is installed already.
You then go to View, Team Explorer. Right click on the little "+" button to connect to a server and enter your details.
The you can either add your files by right clicking on the solution in solution explorer and sayying Add to Source Control or by going to the Source Control Explorer and pressing Add then selecting your files.
Very easy: You just add them to TFS. Right click on the files and choose "Add" from the menu and afterwards check-in. Then they are in the TFS. Of course that doesn't include automatic deployment via TFSBUILD etc.
I found the answer on these links.
http://msdn.microsoft.com/en-us/library/ms181280(VS.80).aspx

How can I open a single changeset in TFS from within Visual Studio

Someone emailed me a TFS changeset ID and now I am trying to open this single changeset. Is there an easy was to do this from within Visual Studio (VS 2008 if it matters)?
In Visual Studio a keyboard shortcut can be used for pulling up a specific Changeset or Work Item.
Go to Changeset
In Visual Studio open the Source Control Explorer window and while it has context press Ctrl + G. Enter the number in the Go To Changeset dialog and press OK.
I know this works in VS 2010, 2012 and 2013, but recall this working as far back as at least Visual Studio 2008.
Go to Work Item
Pressing Ctrl + G when the Team Explorer Work Items window has context brings up the Go To Work Item dialog:
In Visual Studio 2012 and 2013 the TEAM menu contains an option Go to Work Item which also brings up this dialog.
Last Word
Visual Studio is a very contextual program and what happens when a specific keyboard command is used is oftentimes influenced by what window has context. To be clear pressing Ctrl + G when an editor window is open will present the Go To Line dialog.
As with many keyboard commands in Visual Studio your mileage will vary.
In the Source Control Explorer (View -> Other Windows -> Source Control Explorer):
Right click on the folder you want to grab
Click Get Specific Version
Change the dropdown from "Latest Version" to "Changeset"
Find your changeset on via the browse (...) button.
Change to search to changeset number
Just select the result and hit ok.
Alternatively, if you want to see what changes were in that changeset...
Go to the same Source Control Explorer
Click the History button (looks like a clock)
Scroll down the changeset list that appears, double click the one you want.
This will list the files changed in that changeset as well as notes the developer put.
or, from a VS command prompt type "tf changeset 1234" (make sure that your root folder is inside of your workspace or you will have to explicitly define the team project etc.)
You don't need to remember Ctrl + G shortcut, just do as below.
Open the source Control Explorer -> Right Click -> Find in Source Control -> Changeset
Then a dialog box will appear where u can specify your changeset number hit find. And it will appear in results section at the bottom, then you could go into all its details.
In the NugGet console, you can use the TFS Powershell Snapin from the TFS PowerTools.
Add-PsSnapin Microsoft.TeamFoundation.Powershell
Get-TfsChangeset <ChangesetNumber>
Another option is to open Tools > External Tools and add a new external tool that calls TF.exe changeset and prompts for arguments where you can give the changeset number.
In VS2012 you have the option to search in changesets.
if you want to search changeset...
Go to Source Control Explorer Click the Find Changeset(looks like some papers tied together) button. it is near to history button (looks like a clock)
you can search by changes checkedin by a user,containing file,and date range
try to add as much filter as possible, otherwise it will take sometime to load.

How to undo another user's checkout in TFS via the GUI?

As the resident TFS admin, on occasion I am asked to undo a checkout (usually a lock) that a user has on a certain file. This can be done via the command line using the TF.exe utility's Undo command (see http://msdn.microsoft.com/en-us/library/c72skhw4.aspx), but that's kind of a pain.
Is there a way to undo another user's checkout via the GUI?
Out of the box, no, but there are at least a couple of options via add-ons.
TFS Power Tools
TFS Power Tools (Visual Studio 2010)
TFS Power Tools (Visual Studio 2012)
TFS Power Tools (Visual Studio 2013)
TFS Power Tools (Visual Studio 2015)
Once installed:
Open Source Control Explorer
Right-click the item on which checkout is to be undone (or a parent folder of multiple files to be undone)
Select Find in Source Control and then Status
In the Find in Source Control dialog, leave the Status checkbox marked
Optionally, enter a value for the Wildcard textbox
Optionally, enter a username in the "Display files checked out to:" textbox and select that radio button
Click Find
This will result in a list of files
Select the items to undo
Right-click and select Undo
Click Yes when prompted with "Undo all selected changes?"
Team Foundation Sidekicks
Another option is to use the Team Foundation Sidekicks application, which can be obtained here: http://www.attrice.info/cm/tfs/
It has a Status sidekick that allows you to query for checked out work items. Once a work item is selected, there are "Undo pending change" and "Undo lock" buttons that can be used.
Rights
Keep in mind that you will need the appropriate rights. The permissions are called "Undo other users' changes" and "Unlock other users' changes". These permissions can be viewed by:
Right-clicking the desired project, folder, or file in Source Control Explorer
Select Properties
Select the Security tab
Select the appropriate user or group in the Users and Groups section at the top
View the "Permissions for [user/group]:" section at the bottom
I just had this problem myself and found an easier way to clean up old workspaces.
1) In visual studio, open source control explorer.
2) From the 'Workspace' dropdown select 'Workspaces...'
3) A dialog will appear showing the workspaces on your current PC. Select 'Show remote workspaces'
4) You will now also see workspaces from your previous PC (as long as they are from the same user account). Select the old workspace(s) and click 'Remove'. This should delete the old workspace from from TFS along with any persisting checkouts.
I'm sure Arne has found a solution but I hope this helps others who google the issue.
Command line
tf undo /workspace: OtherUserWorkspace;OtherUser $/TeamProject/MyFile.cs /s:http://YourTFSServer:8080
https://msdn.microsoft.com/en-us/library/cc470668.aspx
if you use the tfs power tools undo procedure above you need to do a get or get latest to update your screen. Otherwise it looks like undo has not worked.
The operation completed successfully. Because the workspace Workspace;domain\userID is not on this computer, you must perform a separate get operation in that workspace to update it with the changes that have been made on the server.

Resources