VS2012 return to a normal TFS checkin window? - tfs

VS2012 seems to remove the popup window for TFS check-ins that was in VS2010. It now seems to take over the team explorer tab in my sidebar, and buries the important things - like which files I've changed. Is there any way to return to a normal popup window for check-ins in VS2012?

For me, the best solution is based on iSid's answer: to add an external tool that pops up the old dialog.
You can do this from Visual Studio: TOOLS -> External Tools… -> Add, with the following values:
Title: Checkin (or any name that should be displayed in the menu)
Command: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe (this is the default VS install location on Windows x64)
Arguments: checkin
Initial directory: $(SolutionDir)
Here is a screenshot:
You can invoke from TOOLS -> Checkin (or even assign a keyboard shortcut to Tools.ExternalCommand* as described here) and enjoy the old goodies with a new style:
Note that this won't work if a solution is not opened, because of the $(SolutionDir) variable. To workaround this, you can hard-code the path to your workspace instead.
Additionally, tf.exe can be invoked with 'shelve' argument, which will show the old-style shelving dialog.

Use tf checkin command from Visual Studio command prompt and you will get the same old checkin window.

While the Pending Changes window is merged within the Team Explorer, the Solution Explorer allows filtering by what is pending to be checked in. In addition Open Files filter could also be applied. When the Pending Changes filter is applied, all or some of the files could be selected and right clicked and then there is an option to do the check in. That command takes directly to the Team Explorer in Pending Changes view. See below...

Another method is to use the Productivity Power Tools. This extension adds Windows shell integration so you can perform most of your TFS commands directly from within Windows without even having Visual Studio open. The Power Tools uses the old style windows when used from within Windows shell.

I think the easiest solution is just docking the Team Explorer tab as tabbed document (using the right-click menu). That way it will be equivalent to the popup dialog.

Related

tf.exe Equivalent to Deleting Added Files

In Visual Studio 2015 connected to a team project on TFS 2015, I can go to Team Viewer -> Pending Changes and I can see a list of files in my (local) workspace which are "adds" but have not yet been promoted to source control. These are listed in a hyperlink such as Detected: 121 add(s), 0 delete(s). When I click on this link a window is opened listing all of the added files where I can select all -> right click -> delete
How can this be done with tf.exe?
No such option in Tf Command-Line Utility Commands. The items you mentioned are Candidate Changes. If you add or remove a file outside Visual Studio, Visual Studio can detect the changes that you make and treat them as Candidate Changes. tf.exe can only detect the add/remove files inside Visual Studio.
You may try to use TFS API to achieve what you want, here is a blog should help you:
https://roadtoalm.com/2013/06/13/using-local-workspaces-promote-excluded-changes-with-tfs-2012-api/

Microsoft Team Explorer & TFS: How to open ps1 with ISE?

Currently I am experimenting with Microsoft Team Explorer and TFS server. I have several PowerShell scripts checked in.
Is there a way to control which editor Visual Studio launches when double clicking on a checked out file? I would like to start ISE. Thanks in advance.
I figured it out myself, here are the steps:
Go to Tools => External Tools
Add new item pointing to C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe
Ensure the arguments field contains $(ItemPath)
Go to Tools => Options => Keboard (ensure show all settings is checked)
Assign a keyboard shortcut to Tools.ExternalCommand1
Now you are able to directly open your script with ISE if its checked out and opened in Visual Studio's internal editor.

TFS source control without Visual Studio?

Is it possible to use TFS source control without Visual Studio? I have to put some files in some source control, those files are stored in a folder in some server, that is something developed in Oracle forms. I just need to add those files in some source control and I'd like to use TFS for that. Any tips or tools could we use for this?
TFS is likely to be overkill for a few files in a single folder, but if the TFS infrastructure is already in place then it will work.
You will need Team Explorer (or, on non-Windows) Team Explorer Everywhere installed to give you the client tools. But you can perform all source code operations with the tf.exe command line (or equivalent from Team Explorer Everywhere).
Team Foundation Server Power Tools has Windows Shell Extensions that provides integration
with Windows Explorer and the common file dialogs. With this integration, you can perform many source control operations without having to run Visual Studio or a Team Foundation command-line tool.
see this answer but you will need to make sure you have tfs server running as well to connect to. Would it not be simpler to use git/mercurial/svn...{any other free source control system}?
I am one of the lovers of TFS, but I think in your case if you don't need to use Team Explorer or Team Explorer Everywhere (which will need command line used) for none windows I suggest to use SVN sub version (VisualSVN Server) it's open source and it has integrated OS shell (TortoiseSVN ) right click menu which will be easy than using command line
Vlad: That is true, but this important: I have used the "Shell Extensions" for a while only to realize that it does create problems. First of all, the "Shell Extensions" does not report errors during a check-in; it only unexpectedly stops, and the window closes.
Also, the reason I am looking for an external "Source Control Explorer" is that if you delete any file from Window Explorer that was under Source Control by TFS, the Check-In procedure will fail saying that there is a file missing. The correct way to safely delete a file is to do it through "Source Control Explorer"; the check-in then works. Usually not a problem, unless, like me, you have a Java project and have no integration between NetBeans & TFS.

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.

Edit-Merge-Checkin with TFS

Does TFS support an Edit/Merge/Checkin model? It looks like we have to explicitly check out files with the source code explorer to get the readonly bit switched off. I'm use to files being write enabled, and just having to do a merge before checkin. Is that model supported?
Yes. It does.
Right click on the TFS project and select Team Project Settings > Source Control ... From there you can enable multiple check out.
That said, you still have to use the source control explorer to check out the file; unless you are using Visual Studio to edit it at which point, VS will automatically check out the file.
If you need to use it outside of the source control explorer, you can download the TFS Power tools which adds context menus to the regular file explorer for check in / out / etc.
Yes it does, but it is not as confortable as with SVN, you still have to use the source control explorer to check out the file, that will change with TFS 11 and Local workspaces

Resources