How to open project to edit using Team Foundation Server - visual-studio

I just started using the new free Team Foundation Server (http://tfs.visualstudio.com/) I have a project which is checked in and I can see all the source in the source viewer on the website.
I am connected to my project within Visual Studio. But, there is absolutely nothing appearing in my solution explorer and I don't seem to be able to figure out how to load all of the source so that I can work on my project.
Any suggestions? I have no idea how to use this and I have read all the tutorials on the website, but they don't show me how to actually open my project.
Again, I am connected to the project but nothing is showing up in "Solution Explorer".

In Team Explorer navigate to your project and double click on the solution.
Or, go to File... Source Control... Advanced... Open from Source Control.
You need to have your Workspace mapped for any option to work.
To map the workspace, select the workspaces option from the Workspace drill down in the Source Control Explorer. From there select your workspace you want to map and edit it. All you simply have to do from there is select the local folder.

Related

Import project to Visual Studio online

I am working on a Xamarin.Forms project in Visual Studio and have recently got another laptop. I would like to be able to edit the project when using my work laptop so I searched online and found Visual Studio Online.
The problem is I don't know how to import my current project into the Visual Studio online to get it on the other laptop. I have tried watching tutorials but all others explain how to create a new project and couldn't find any tutorials online that explain it easily.
The first step is to sign up for Visual Studio Team Services and create a new project:
Make sure you select Team Foundation Version Control during this step.
Once the project is created, you can head over to Visual Studio and make sure you're connected to TFS (Team Foundation Server).
Open the Team Explorer panel if it isn't already open (you can find it in View->Team Explorer) and click "Connect"
Once you do that, a window will open that will allow you to sign into your Microsoft account that you used to create the TFS server. Once signed in, you can select your project and click "Connect"
Your project should open in the Team Explorer panel where you should then click "Configure Workspace"
Click "Advanced Options" and then change the Local Folder to point to the folder that contains the solution you want in source control.
Click okay and say no when it asks you if you want to get latest from source control.
You can now go to the "Pending Changes" page in the Team Explorer and click on "Detected XX add(s)" and then click "Promote" in the resulting dialog.
The final step is to add a comment and check in everything!
Your code is now in source control!
From here you can proceed like normal in setting up TFS on your new computer and getting your code from TFS!

TFS 2013 view files and folders in TWA

I'm using Team Foundation Server 2013 which is connected to VS 2013. In the source control explorer, I've mapped folders to projects and it displays all the necessary files in VS so should I be able to view the associated files in TWA under the code tab when I navigate to the correct project? When I say files, I just mean the file name and folders not the actual source code or have I configured it wrong?
Check your Access Level in TWA. If you're defaulting to a Stakeholder then you wouldn't be able to see source code.
Go into the admin page for TWA, click Control Panel in the top left and select the Access Levels tab or navigate to:
http://yourserver:8080/tfs/_admin/_licences
Stakeholder may be the default so add yourself to Basic or Advanced (or set as default) and try again.
Along with setting my access level to advanced, I also checked "add to source control" on new projects and added it to existing projects and finally checked them in.

Using VS2013 and VS2010 with TFS2010

We currently have TFS 2010 and mostly work with VS2010. We're gradually starting to use VS2013 with the Express version.
How come when I open the Source Control Explorer in VS2013, everything shows as "Not Mapped" even though it IS mapped? When I try to map something, it gives me "The path X is already mapped in workspace Y"
I can't open anything from the Source Control Explorer since it prompts to map, but I manually open the project from the local folder, and see the little lock and + symbols in the solution explorer. I can even do check-ins and undos.
Check that source control explorer is connected to the same workspace as VS2010 by looking at the workspace drop down at the top of SCE. If your VS2010 workspace is a server workspace, and you created a new local workspace in VS2013 you'll see two workspace names showing.
Also, when you open an existing solution in Visual Studio, if that solution is in a workspace different than the one source control explorer is currently showing, SCE doesn't switch over automatically. You have to do it manually, again via that workspace drop down.

Some projects not showing TFS Menus

I have 8 projects in my solution. 3 of them are not showing any TFS menus when I right click on the project or any of the files from Solution Explorer. They are in TFS though, if I go through the Source Control Explorer I can manually check them out/in. Also those 3 projects do not have associated .vspscc which the other 5 projects do. Something must have got messed up but I am not sure what. How can I fix this so that I get those TFS options back in Solution Explorer. Having to manually check out/in is not practical.
edit: I've tried wiping my local copy and bringing the solution down from source control again. I've also removed those projects from the solution and re-added them which did not work.
It sounds like 3 of your projects have lost their source control bindings. You should be able to restore them easily. Just go to the Change Source Control dialog, which will allow you to set the source control bindings for all the projects in your solution:
File > Source Control > Change Source Control...
Then you'll need to enter your TFS server name and the server path for the projects that have lost their bindings.
Edward got me pointed in the right direction, for me it was an issue of TFS having gone offline.
Resolution: I selected the Solution level in Solution explorer, then went into File>Source Control> and selected the Go Online menu option, which restored all of my right click TFS menu options.

How to add TFS bindings to a Visual Studio 2010 project?

There's a question already discussing how to add project/solution bindings to TFS, however it seems to only apply to Visual Studio 2008 (I am unable to find the "Change Source Control" dialog in VS2010).
I have a solution and source code on my local machine already in TFS, however it does not have TFS bindings (the thing that produces the padlock icon in the Visual Studio Solution Explorer and allows automatic checkout).
How can I add bindings to an existing TFS project using Visual Studio 2010?
In VS2010 check Tools>Options>Source Control and see if set to TFS. If not that might be why you don't see File->Source Control->Change Source Control.
I ran into this problem and, for me, the issue was that my solution was offline with respect to TFS. Upon trying to change source control, I received a message stating that it is already associated with source control but is offline. I placed the solution on-line, per my recollection, using the File->Source Control->Go Online menu option and this seemed to fix the problem.
Go to the source control explorer under Team Explorer, where you can see your repository. Right click on the top folder that maps to the folder on your local machine. There's an option called "Map to local folder". Map this to the folder on your local machine. This will set up all the bindings for TFS for your project.
I had the same problem and the following steps solved it for me in VS 2008.
Unfortunately, I didn't record the exact steps and don't want to add a new project to our TFS to try again, so the steps are from memory.
Go to File Menu -> Source Control -> Open from source control
Select solution file from TFS hierarchy
Accept any warning about project already being on local disc
A popup dialog comes up saying something along the lines "This solution is already under source control, but no bindings exist. Do you want to add them?"
A selector shows all projects in a grid and allows adding the required bindings. Add TFS server setting to each project (select all lines in grid at once and press a button at the top. I can't remember what it was called, but it was fairly obvious).

Resources