No commands available on context menu of Source Control Explorer - tfs

I don't know what I've done, but on my TFS source control explorer I have "No commands available" on the context menu! (Panic is setting in)
From the Team Explorer I can see that am a member of Team Foundation Administrators, and I'm a member of the team project administrators as well.
What would be causing TFS to give "no commands available" on the pop-up context menu?
Additional info:
I can get to the source control explorer and with additional commands from another machine, so perhaps it's something pooched on my setup (although it was working an hour ago!)

In Visual Studio, go to Tools > Options...
Click "Source Control" in the tree
Select "Visual Studio Team Foundation Server" as the current source control plug-in.
If this option is not available, ensure that you have Team Foundation Client installed.

You need to checkout (Mapping is not enough for Moving and Renaming - for that you MUST check-out) those files/folders to your local disk, before you get the context menu on right-click that you miss.
I had same problem and from the MSDN official page I was not too much wiser :)
Anyway, I wonder what is the good reason, for which you can not move files in TFS server repository without checking-out those items to my disk. In SVN this is no problem. (And there is even no path mapping in SVN - just CheckOut :)

Related

Visual Studio Team Services (cloud) - Server Workspace

We have several of our projects at my company in source control using Visual Studio Team Services (visualstudio.com). For the life of me I can't figure out how to get the workspace on my machine to flip to a Server workspace type. We don't want multiple checkouts and we want to get latest when we edit a file, and server workspaces (as I understand it) are the only way to accomplish this. Is it even possible to use server workspaces with the "cloud" version of TFS/Visual Studio Team Services?
Thanks!
Connect to your server with Visual Studio
Go to Team Explorer
Go to Settings
This part can be a little tricky so I attach a screen shot:
Under "Team Project Collection" go to Source Control
On the new dialog go to the second tab - Workspace Settings
So as you can see it is pretty obscure and I believe it is on purpose. By default the workspaces are of type "local" and these have their benefits. You may want to check out this article to make an informed decision: http://msdn.microsoft.com/en-us/library/bb892960.aspx

Change TFS Server Mapping

Running VS 2010, I want to now build on TFS 2010.
Originally I connected TFS server "tfs1". Now I want to map my local path to new TFS server "tfs2".
How to disconnect my old mapping with tfs1?
I got an error:
The path C:\test\xxxAdmin is already mapped in workspace aaa-PC[http://tfs1:8080/tfs/windowsapp]
Thanks.
In the source control explorer for your old server, you can drop down the "Workspaces" list, choose "Manage workspaces," and delete the workspace you no longer want to use.
Most of the time you can go to the directory in question ("C:\test\xxxAdmin") in a VS command window (Start->All Programs\Microsoft Visual Studio 2010\Visual Studio Tools\Visual Studio Command Prompt (2010)) and then enter "tf workspace". Unless things are a bit screwy this will bring up the GUI "Edit Workspace". Find the directory in the "Working Folders" list, select it, and click "Remove".
You should now be able to create the new mapping
Select Manage workspaces and delete the workspace that you don't need.
You can also use tool Tfs Workspace

TFS Power Tools 2010 Showing File Checked Out

Somehow TFS Power Tools thinks my file is checked out, it won't let me check-out because that option is greyed out.
When I look in windows explorer I see my file with the little pen icon overlay. When I right-click and go to "Team Foundation Server", I choose undo but then get the message "There are no changes to undo in the selection or any children of the selection". If I right-click and go to Check-In then I get the message "no pending changes".
When I open source control explorer in Visual Studio it shows no pending changes for the file.
Can anyone please advise any steps I can take to resolve?
Can it be that the file is checked out by you on another workspace? Go to VStudio & check "Team Members" under Team Explorer. Right-click on yourself & select "Show pending changes". This should show all your checked out items, across all workspaces/worstations. You can also undo it there.Eventually, in order to find out what is happening with your file go in VS to"File">"Source Control">"Find in Source Control">"Status"Select the path to your module & hit 'find'. This should reveal if any other person has this file checked out
Seems strange, lets check common scenarios:
File is actually not checked-out but shown as checked-out in explorer
=> Please try to checkout file through VS, if you can, there is definitely some problem in Power Tools integration to Source COntrol. Restart machine. If problem is same then it might be case TFS credentials are different from Login windows credentials, status don't update sometimes.
File has set property of single check out by Admin & checked- out by anyone else thus preventing you from either check-out or check-in also undo checkout is not possible for same reason.
Create new workspace or try on other machine with different workspace.
=> Some times workspace conflicts, multiple mapping of same directory through multiple workspace creates problems.
Power Tools installation is corrupted or incompatible with some other extension.
=> Many a times, frequent abrupt power-off or etc corrupts software, reinstall latest Power tools. If problem persists, check if some other extension for VS or windows shell is not interrupting functioning.
Hope that helps, if not, let me know with more details like installed extensions, power tools version/ update installed.

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.

Getting "Failed to create mapping" when adding a solution to TFS source control

I've created a new Team Project in TFS, but when I try to add my solution to it I get:
'Failed to create mapping
Cannot map server path, $/Finance/MyApp, because it is not rooted beneath a team project.'
I can't find anything on google or here that looks remotely like this problem.
I had this issue when using Microsoft's Team Foundation Service from Visual Studio 2012. I had just created the new team project via the TFS website. Although I could see my new project in the 'add solution' window, I got the error the OP reported.
I had to go into the "Team Explorer" window, then into "Connect to Team Projects" and tick the new project. Then I was able to add my solution to the team project.
Is Finance a team project for you?
If not, you can clear the mappings for the workspace or even just delete your workspace.
http://msdn.microsoft.com/en-us/library/54dkh0y3(v=VS.100).aspx
Had the same issue when upgrading project to TFS 2010 from 2008. The solution was to delete the vsssc file in the root of the project folder and re-add it
In my case I had to do Team Explorer and connect to the new project
then I had to close my solution and re-open and then the "add to source control" worked.
--Connect and check project in team explorer window
--Close solution
--Open solution
--retry adding solution to source control
I had this issue with Visual Studio Online's source control, Visual Studio would not recognize the team project even after connecting to team projects, refreshing, restarting Visual Studio. I had to use the "Open in Visual Studio" link from the project on the Visual Studio Online site and then open the solution from there.
Well, i didn't want to do anything so drastic, it turned out that one of my subfolders inside the solution i wanted to add to source control, was mapped inside a different workspace (on a different TFS server). So the solution was to connect to that other TFS server, find and delete the conflicting folder mapping inside that workspace, and try again.
I had the same problem using visual studio 2008 and TFS 2012. In my case, when I manually added the local folder to the project through the workspace mapping, the problem went away.
File -> Source Control -> WorkSpaces -> Edit
Then when I went to add the solution to source control it detected the mapping automatically.
In my case, I copied the folder from "My Documents" to c:\tfsroot where I had mapped the TFS Root. Then when I opened the solution and added it to TFS it worked.
I had the same problem. My solution in VS2017:
Open Team Explorer tab
Select Source Control Explorer
Right click on the top level folder for the project and select "Advanced/Remove Mapping"
Remove the Mapping
Right click on the top level folder for the project and select "Advanced/Map to Local Folder"
Browse to the top level folder with the source code (You may need to adjust the path you selected. It may append a folder name to the end)
Click "Map"
Answer "Yes" to Message Box "Newly mapped items will not be downloaded until you execute a get. Do you want to get $/YourFolderName now?"
That should do it!

Resources