TFS 2012 Source Control Explorer only shows my check outs - visual-studio-2012

When I open the Source Control Explorer in VS2012 I can only see what files I have checked out. If my co-worker checks out a file I cannot see a red check mark, it does not say "edit" under the Pending Changes column, there is no name listed under the User column. There is no indication that the file is checked out at all.
Same thing in reverse. He cannot see which files I have checked out. So far we experimented with only 2 Team Projects. One was a Web Site project the other a Web Services (asmx) project.
I found this Visual Studio 2012 not integrating properly with TFS explorer
When I go to File|Source Control|Advanced I do not see a "Change Source Control" option.
Suggestions?

How embarrassing...we just figured it out.
The Team Project allows multiple check-outs, so it makes sense that we were both able to check out the file(s), the issue was that we couldn't see which files the other had checked out.
Part of my issue was I had "Team Project 1" open in my Team Explorer, but a solution from "Team Project 2" open in Visual Studio. So I think that's why I couldn't see the "Change Source Control" option. As soon as I changed the Team Project in Team Explorer I was able to see the "Change Source Control" option (File|Source Control|Advanced|Change Source Control).
Once I opened the "Change Source Control" screen I saw that my solution and project were unbound. I bound them. Then I went to my co-worker's machine, his were also unbound. I bound them. We are able to see each other's check-outs in Source Control Explorer now.

Related

TFS Home is gone

Using TFS I'm used to this view in the "Team Explorer - Home"
But now, when pressing the "Home" button, nothing appears:
I haven't found any settings which collapses this view. Any suggestions?
You need to be connected to a Team Project. In the first screenshot you're connected to Fabrikam Data Project, but the second screenshot it doesn't look like you have an actual project selected. If you click the Title ("Home") and go to Select Team Projects you can pick the Team Project + TFS Server you want to connect to. Then when you come back to Home you should see all the options.
That looks like 2 different versions of Visual Studio. Make sure you're on the most up-to-date version (2013.4)

Visual Studio 2012 - Adding files via Solution Explorer not showing in Pending Changes

I have a VS 2012 solution with multiple projects in it.
When I create a new solution folder or new a folder under projects and add files via the "Solution Explorer" it just modifies the sln or csproj file. The newly added files do not show up in "Pending Changes".
I am having to add the files explicitly again via "Source Control Explorer" -> "Add Items to Folder" to have it actually [add] before check-in.
What would I need to change to have the files added via "Solution Explorer" itself?
Try creating a brand new solution, and then add it to source control. Does the issue still happen for new projects in that solution? Is it the same behaviour for your colleagues?
If so then it sounds to me like you have some strange checkin policy screwing it up.
See the answers in this question for ideas.
Failing all of those, maybe a reinstall of TFS on the server is required, or if it's only affecting you, reinstall VS.

How do I bring up an earlier version of my project and/or solution in TFS?

I know this is a simple question. But I do not think it is easy to find this answer online. For anyone who has used TFS (Team Foundation Server) on a Microsoft Visual Studio this must be the first thing they learn. But I have poked around with Visual Studio and TFS and I do not find the solution intuitive. Here is the question:
How do I bring up an earlier version of my project and/or solution in TFS?
If you go to the Source Control window and right click on the folder at the root of your project you should see "Get Specific" or "Source Control | Get Specific". If you select this you will be presented with a dialog box that will ask you which version you want to get. This can be bases on Date, Lables, or changesets.

Importing an existing source file in Visual Studio 2012

I want to add the source-code of a tutorial into an existing project, and I want the file to be copied to the project folder from the temporary file on the desktop I downloaded it to. Context clicking on the "Source Files" Folder in the Solution Explorer leads me the Add->Existing Item... menu, and I can then add the source file. However, it is NOT copied into the project folder, but stays in its original location. The project just knows about it, displays it in the Solution Explorer, and considers it part of the project.
This help page on MSDN tells me that in Visual Studio 2010, default behaviour used to consist in copying the file into the project folder, and that one could choose to Add a link instead of physically importing the file into the project directory by choosing "Add Link". However, now I always only get a link, and real physical import into the project folder seems impossible.
I could go through the File Explorer to physically import, but the Solution Explorer doesn't update the new files on the fly, and I would like to do this from within VS.
Is there a way? Is this a bug in VS 2012?
Copy in the files using Explorer, then in the solution explorer tick the Show All files option in the button bar of the solution explorer (you might need to select a Project first).
You can now right-click any files not part of the projects and choose Include in Project.
Or use the Add Existing File option.
The reason files are not added automatically to your solution when pasted into the folder using Explorer is because you might not want to have them added.
A neat little trick is to use the "Open In explorer" option:
(though it might be added by the Productivity Power Tools).
Plus, you can Drag&Drop files directly from explorer to the Visual Studio (when they're both running in the same elevation level if you have User Account Control enabled). To fix the UAC issues, you can either run Explorer as administrator too or install the VSCommands extension.
And you can Copy&Paste a file or set of files into the solution explorer by right-clicking a project or project folder and picking Paste on the context menu.

Missing: Add solution to source control

I have successfully installed and connected to my Team Foundation 2012 server. But I am unable to add my solution to it, Im missing it when I right click on the solution, see image below.
If I try to create a new solution, I can add it to my source control.
Long time ago, I had the code on a Team Foundation server 2010, but when the trial ended I had to stop using that source control. Not sure if that has something to do with this tho.
This happen when the project had already a previous binding. Just do:
File->Source Control->Advanced->Change Source Control
You should see your project with Invalid Binding.
Do Unbind of the project, now you'll see again the "Add Project To Source Control"
File -> Source Control -> Advanced -> Workspaces...
There I had to Edit my workspace and define a local local folder and a soruce control folder.
Right click on solution and click on Go online, then I was able to Add solution to Source control.
I had the same problem.
After creating a project in TFS server and connecting to it by using Team Explorer in visual studio, I followed below steps:
I closed VS and opened the .sln file in notepad and deleted below section.
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
I opened .sln file in VS, selected 'Visual Studio Team Foundation Server' in Tools --> Options --> Source Control page.when I right clicked on solution file 'Add to Source Control' was there.
I got the same problem.
I found I got two projects in my solution, one was under source control, the other one was not. What worked for me was to undo the project which was already under source control. After I undo all changes, I finally found the "source control" option when I right clicked the solution.
My File menu -> Add to source control option was missing in VS 2013. After opening the Team explorer tab (beside thesolution explorer tab), It appeared again.
Also make sure you have selected the correct plugin: Tools -> Options -> Source control -> plugin-selection -> select Git
if your Datatable header responsive issue then use it
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e){
$($.fn.dataTable.tables(true)).DataTable()
.columns.adjust()
.responsive.recalc();
});

Resources