working on TFS 2010 - tfs

hey guys,
i am using TFS 2010, i have uploaded content on TFS server, but i dont have any clue about how to download the content from TFS server to local system so that i can check out and check in once i have done editing
Any one know how to do that.. please reply...
i need a step for the same.
Thanks and Regards
Abbas Electricwala

You need to setup a local Workspace (if there isn't one already) and then map your project to a local working directory. From Step 1 of this MSDN article:
You can create a workspace mapping in one of two ways:
* Set the workspace mapping explicitly
* Perform a Get operation on your team project.
To set a workspace mapping explicitly
In Visual Studio, on the File menu, point to Source Control and then
click Workspaces.
In the Manage Workspaces dialog box, select your computer name and
then click Edit.
In the Edit Workspace dialog box, in the Working folders list,
click Click here to enter a new
working folder.
Click the ellipsis (…) button, select your team project (for example
MyTeamProject1), and then click OK.
Click the local folder cell to display another ellipsis button.
Click the ellipsis button beneath Local Folder and then browse
to and select the local folder on your
development computer where you want to
locate your team project; for example,
C:\DevProjects\MyTeamProject1.
Click OK twice to close the Edit Workspace dialog box.
Click OK in response to the Microsoft Visual Studio message box
that informs you than one or more
working folders have changed.
Click Close to close the Manage Workspaces dialog box.
To perform a Get operation on your
team project
In Team Explorer, expand your team project node; for example,
MyTeamProject1.
Double-click Source Control beneath your team project.
In Source Control Explorer, right-click the root folder
MyTeamProject1 and then click Get
Latest Version.
In the Browse For Folder dialog box, select your local path (for
example,
C:\DevProjects\MyTeamProject1) and
then click OK. This maps the team
project root folder within TFS to a
local path on your computer.

Related

visual studio for mac cannot create workspace

I try to manage workspaces in Visual Studio for mac with TFS extension. I don't have any workspace so I click on ManageWorkspaces in SourceControl Explorer. Then I click on add button in order to create a new workspace. It works great until here. I enter workspace name, then I select a working folder. And After I click on OK button, it gives the error that says:
Cannot create the workspace.
value cannot be null.
Parameter name: Computer.
It doesn't go through and create a workspace. I follow the directions in Microsoft link https://learn.microsoft.com/en-us/visualstudio/mac/tf-version-control. But it gives the error above in the manage workspaces section / 6.step
Need help. Regards

Project not showing as checked-in to TFS in Visual Studio 2013

I added a new project to a Solution Folder in VS2013. I added the project to TFS via Source Control Explorer but in VS Solution Explorer the little lock icon next to the project is not displayed. I just downloaded the solution to a new computer, and that project did not get downloaded. I had to go into Source Control Explorer and explicitly get it. The solution just does not recognize it as under source control...
How do I correct this?
Any help is appreciated
You probably need to bind the project to source control.
Open the project in Visual Studio.
File > Source Control > Advanced > Change Source Control (or you might find there is only an option like File > Source Control > Add to Source Control - I can't remember exactly what this looks like)
If you get to the Change Source Control dialog, then select all the projects in the list and click Bind. If this works you should have a tick in the "Connected" column and "Valid" status, and you can OK the dialog and your project should be good to go. If binding fails, then Unbind everything and try binding again.
Looking back to basics, I discovered some of the files (such as the project file itself) had never been added to source control. I discovered this by going to Source Control Explorer, selecting one of the projects unmarked in Solution Explorer, right-clicking to get the context menu, then selecting Add Files To Source Control, then selecting the whole list presented, then clicking OK/NEXT/FINISH. That marked the unmarked project in Solution Explorer with a plus sign (+) to be added. Then again from Source Control Explorer I selected the solution and clicked Check In Pending Changes. Then I got the lock icon in Solution Explorer.
If the Projects/Folders are missing in Source Control this can be done -
Open TFS -> Source Control Explorer -> Right click on Solution folder and click 'Add Items to Folder...'. Now in 'Add to source Control' prompt select the folder of desired project that needs to be added to source control. On doing so the project folder along with its content should appear with + sign and on check-in the project will be available under the solution in source control.
This is the reason due to solution is available on TFS but local instance is not bound to server directory.
Solution:
Files=>Source Control=>Advanced=>Change Source Control
Then Bind all projects to server repository location.
This will resolve the issue.
Compare with another correct project,I know it's lost xxxx.csproj.vspscc file for my project.
for init this file.
First , you should open right project and add error project in current solution.
Then,Right click error project click Source Contorl → Add Item to source control
Then, source control will warn you
Click Continue
Source control warns you again to rebind item
you shoud click Ignore All
After check out and check in error project,It will be ok.

Why are all files write protected and how can I check-in?

I currently work with a Team Foundation Server and Visual Studio. Since two days, I keep getting error messages that I can't write to files (it seems not to matter which file I try to access). I am the only one in my team who has those problems.
So when I try to check-in, I get:
When I click on Overwrite, I can overwrite it. But when I try to check-in pending changes, I don't see any changes. If I modify a source file, I can compare it to the latest version and see that there are changes.
How can I fix this? I simply would like to work ...
Work-around: If I "Check Out for Edit..." the file (so I get the lock) I can edit it. But this doesn't work for the solution file, because somebody else checked it out.
Go to Solution Explorer
Right click on your solution
Click Go online
It seems that your solution is not connected to the Team Foundation Server.
I would recommened that you remove the mapping of your workspace, delete all local files of the workspace and then get a fresh version (Get latest version) from the Team Foundation Server.
To remove mapping you need to open the Source Control Explorer in Visual Studio. Navigate to the Branch you are working on and open the Context Menu (right click on branch). In the menu you select Advanced->Remove mappings....
In the dialog you can edit or remove the mapping of your workspace. (Note: When you select Remove mapping then will all files in the Local Folder be removed that are controlled by TFS)
What you also can do is to check the state of your workspace/solution if it is connected to TFS. To do that you need to open the solution in Visual Studio and then open File->SourceControl->Advanced->Change Source Control... in the File Menu of Visual Studio.
In the Dialog you will see if your Solution and projects are connected to TFS and the server they are connected to
You should have the correspondings local files like in the source control.
Go to the local file, right click on it and choose Properties,
in the opened dialog uncheck the read-only checkbox, click Yes to the question if you want to apply changes to all subfolders and files.
Hope this is helpful.
You will face the same problem when setting your Workspace location to server (which in my case happened somehow magically).
To change the location to local again open the source control explorer and in the upper part you find a drop down labeled "Workspace". From this drop down choose "Workspaces...". This opens the "Manage Workspaces" dialog where you can select your workspace and click the "Edit" button. In the Edit dialog click the "Advanced" button and you'll see a drop down for Location where you can change it to Local again.
MSDN provides detailed information on the pros and cons of local and server workspaces.

How to create workspace in TFS

I followed this way.
To create a workspace to manage your source-controlled files
1.
From the File menu, select Source Control, and then click Workspaces.
2.
In the Manage Workspaces dialog box, click Add.
3.
Type a descriptive name in the Name box, enter a comment describing the new workspace in the Comment box, and provide alternative Owner and Computer name values, as necessary.
4.
Under Working Folders, in the Source Control Folder box, click the text box and then the ellipsis (…).
5.
In the Browse for Folder dialog box, select a server folder, and then click OK.
6.
Under Working Folders, in the Local Folder box, click the text box, and then click the ellipsis (…).
7.
In the Browse for Folder dialog box, select a folder on your computer, and then click OK.
8.
In the Add Workspace dialog box, click OK to create the workspace.
9.
In the Manage Workspaces dialog box, click Close.
When I click OK button it should get all the folder from TFS to my Local machine? but its not doing that after clicking ok and Close nothing is happening and my local folder does not contain this files too?
Just creating the workspace won't get you the latest version. Go to the "Source Control" section of a project in the "Team Explorer" tab.
Once you're in the source control view, you can right click any folder in source control, right click on it, and click "Get Latest Version".
Alternatively, there should be an "Open from source control" option in your File > Source Control menu if you need to open and get a particular solution file.
Creating a Workspace in TFS doesn't pull any files out of Source Control. It just gives you an environment to manage all your Projects.
To pull down the source code, you still have to find the root folder for the Project you want, right click, and 'Get Latest...'
At that point, you'll be prompted to bind that project to a local directory on your machine where the source code will live.

How do I change my workspace in Team Foundation Server 2005 and 2008?

I have multiple projects in a couple of different workspaces. However, it seems like I can never figure out how to change my current workspace. The result is that files that I have checked out on my machine are shown to be checked out by somebody else and are not accessible.
I'm going to assume you mean "workspace", not "workstation", as your question doesn't quite make sense to me otherwise.
In Visual Studio, go to the Source Control Explorer (View->Other Windows->Source Control Explorer). At the top of the source control explorer window you should have a toolbar with a few buttons. Somewhere on that toolbar (for me it's at the right) there should be a Workspace dropdown. Just select the workspace you want to use from that dropdown.
Are you wanting to change the location of the files on the workstation? If so, here's how I do it:
Open Visual Studio
Open the Source Control Explorer window.
From the Workspace dropdown select "Workspaces..."
The Manage Workspaces dialog should show up.
Select the workspace you want to modify, and click Edit...
You should be able to adjust the folders from here.
First, you should active you workspace window.
choose the window menu
click Source Control Explore.
click Active button.
The Workspace window appears
click the WorkSpace name in Workspace window.
from the popup list choose the Workspace name you want.
In Visual Studio 2013
If you just regret which local folder you choose for a project under version control. Do like follows:
In the Source Control Explorer in the Folders pane
Select the project which local folder destination/mapping you are not pleased with.
Right click. --> Advanced --> Remove mapping.
A window opens: Press the browse button and choose another local folder for the project and then click "Change".
Click on: File -> Source Control -> Advanced -> Workspace and then you can edit or remove the existing mapped locations
I don't entirely understand your question.
Are you saying that files you check out on one machine seems to be unaccessible on another of your machines? I'd say that would be entirely by design, as now you have a file that has local modifications done on one machine, which may or may not be available on your other machines.
When you say checked out by somebody else, what does that mean exactly? How are you verifying this, what are you looking at?
Or do you mean something else? In that case, please elaborate.

Resources