How do I unmap a project? - visual-studio

How do I unmap a project in Team Foundation Server 2010?
I changed the location of a source control, and completely removed it from TFS source control. but now it is showing up wanting to add it:
Also, when I try to Map the new project, it is giving the error below. I've completely deleted the files off my local PC, and I'm wanting to map and get latest version from source control, but it gives an error trying to map. I'd rather not change the location. How do I remove the old binding and the project, when it was already deleted using TfsDeleteProject.exe?

You should be able to go to Workspaces and remove/add any mappings there directly.
Go To Source Control Explorer
Expand the Workspaces drop-down along the toolbar in the Source Control Explorer
Click the last entry to manage workspaces
There you should be able to remove mappings.
Here is an article discussing Workspaces
http://www.woodwardweb.com/teamprise/000334.html

I would like to add something to the accepted response...
If you have used some other credential to get code previously, then there would be a workspace already existing that would be mapped to the mentioned local folder. In that case the new credential can not be used to map the same server folder to the same local folder. You will first have to login with the older credential and delete that workspace and then you need to create a new workspace with your new ID and then map to the desired folder (which should now be unlocked) and you should be ready to go.

Related

Visual Studio 2017 - moved local TFS workspace folders - best/correct process to re-connect?

Had to move my directories for the local workspaces for Visual Studio. I updated the directory locations in VS, but it acted as if they were completely out of sync, and asked to get latest.
I let it do so for one project - it (re)downloaded everything, came up with a list of files to which I had local changes, listing them as conflicts. I kept the local version of all the files, so no work was lost. But when I opened the project, those files came up as not being in source control, and it offered to let me add them. So again, I have all my work, but that's a tedious process to re-connect everything. Not to mention that I'm not sure I caught ALL the files that needed re-adding.
I've also considered copying everything to other directories, download a clean copy of the project(s), doing a compare and folding in my changes. Still messy, but possibly safer.
Is there a far better way to do this practice that I've missed? Perhaps as a side question, is there an easy way to list all the files in a project not in source control?
Guess you moved/changed local TFS workspace folders in file system directly. This caused some folders/sub-folders/files lost mapping.
In other words, all of these folders already out of source control. That's why you need to re-add or re-connect them to TFS source control.
A right way please refer how to move an item in TFVC:
You can use Source Control Explorer to move one file or folder at a
time. You should not use Source Control Explorer to move folders or
files that are referenced by a Visual Studio project or solution. Move
these files with Solution Explorer instead and check in the move in a
new changeset.
In Source Control Explorer, select the item that you want to move,
open its shortcut menu, and choose Move.
In the Move dialog box, either manually type the destination for the
item in the To box, or choose Browse to use the Browse for Folder
dialog box.
Choose OK.
Move is actually a delete and re-add process. You could also take a look at this similar question here: Moving project (under source control) to different folder
In your situation, a quick way to solve the conflicts should be: First back up your local files, delete your old workspace, create a totally new workspace. Get latest version from sever side to your new workspace.
Then copy your back-up files/folders which copied from old workspace folder to the new one. Windows system will judge to replace files and add new files.(It may take some time) After this, TFS system will auto detect the changes in local and will list them as new pending changes. Some new add files maybe stay in the Excluded list, manually promote them in Included list.
Finally check in all your pending changes, everything should get back on track.

Single project with multiple workspaces?

Is there a way to create multiple workspace files for a single project? It seems counter-intuitive for each workspace to need a separate project file. Plus it'll make it super clear that only one project file is checked into git and all the .sublime-workspace files have been .gitignored.
In SublimeText3 you should be able to create new workspaces for the open project from the Project's menu or ctrl+shift+P and search for New workspace for project.
This will create a new window with the current project open. I can't determine if the existing .sublime-workspaces file actually stores both, but you are given the option of saving the current workspace and you can then name it accordingly.
As you accumulate workspaces you can quickly switch between them using the ctrl+alt+P to access the switch project dialog. It will list both recent sublime-workspaces and sublime-projects and I believe it is limited to only those which aren't currently open.

can dropbox synchronize only specific files in an xcode project?

I am working on an Xcode project with a few other developers. I would like to know if there is a way that I can update only specific files of an xcode project so that I'll only make changes to those classes anytime I synchronize the project in dropbox.
Short answer: No, Dropbox doesn't do that.
You should still be able to use Dropbox source control. Here's how.
Create your project using Git in Xcode. Save the project outside of your Dropbox folder.
Copy your project from the original location into Dropbox (you now have 2 copies).
Open the original project (the one outside Dropbox) in Xcode.
Open up the Organizer and go to Repositories.
Click on "Remote" section of your project.
Click the "Add Remote" button.
Fill in the location field using file:// and the directory path the one in Dropbox
Now just push and pull changes to the remote repository as needed.
Just because you can do it though... doesn't mean you should. You get a free account from ProjectLocker which includes Git repositories and bug tracking software. It is still your private data, with full permission sets for access.

How do I get Visual Studio Team Foundation Server to see I moved code to a different folder?

I moved some code from my c drive to my d drive. When I opened the solution, it told me that:
The solution appears to be under source control, but its binding
information cannot be found. Because it is not possible to recover
this missing information automatically, the projects whose bindings
are missing will be treated as not under source control.
So I tried permanently removing the bindings and downloaded the latest version. Now my changes don't register as pending changes.
I've tried selecting the solution in the Solution Explorer and File => Source Control => Change Source control, but it does not let me bind. Server Name and Server Binding columns have "".
Generally speaking, the location of code on your machine is dependent upon where your workspace is located.
If you move your workspace to the D: drive, then there shouldn't be an issue.
However, if you simply used Explorer to copy the files to the new location, then VS isn't going to be able to maintain the bindings.
From the Workspace Editor you can map the entire tree, solutions or even individual projects to a new location.
First off, put it back and undo the changes.
Then, Go to File | Source Control | Workspaces.
Click on the work space name and then the "Edit..." button.
In the working folders area select the source control folder you want to move and give it a new local folder location.
You will need to edit your Workspaces for TFS Server to know the change that has happened at your local machine. To edit your workspace, in Visual Studio:
ensure you have no pending changes; also copy your source code folder to some location temporarily, just to be safe (you can remove after you are all set)
go to Source Control Explorer
locate the "Workspace:" dropdown
select the item "Workspaces" from the dropdown list (you will get a dialog titled "Manage Workspaces"
if you have multiple Workspaces, select the appropriate one from the list in the dialog
click on "Edit" button (you will get an "Edit Workspace..." dialog)
down below in the dialog, you will see "Working folders" grid
click on appropriate row from the grid and modify the "Local folder" path to set to your new folder location
Sometimes TFS and Visual Studio have issues in getting these workspace changes synchronized. I would always close Visual Studio and re-launch it to get my changes synchronized anytime after I make Workspace related changes.
Hope this helps.
the most crude way here (I don't know if there is any other way)
is to put the folder back to its old location , Check in your changes
then remap the project to the new folder
When you move files/folders to make the moves pending changes you need to use a TFS client to do the moves.
For one or two files the Team Explorer UI is OK, for more the command line is easiest.
See tf.exe rename on MSDN (tf move is an alias for rename). There is also step by step help on using the GUI: Move, Rename, and Delete Version-Controlled Files and Folders.

Change TFS collection of a Solution in Visual Studio 2010

I am trying to setup TFS server for our Projects. I sucessfully setup and added one of the solution for testing to TFS source controls. But naming were test purposes only so i need to change it. I deleted TFS collections from administration panel and created a new one, but when try to add my solution to new collection it tries to connect old collection and -naturally- cannot find it, and raises error. I do not have same problem for other solutions but only for the solution i tested in the first time.
things I've tried.
file --> Source Control --> Change Source Control
Deleting all source control files in solution folder
Checked .sln file for references to old collection
Restart the computer.
edit:
Ok I have find solution to my problem.
The thing is Workspace info remained somewhere, I created a TPC and TP same name with the old ones. Then I manually removed Workspace info and then it worked.
You have to rebind the solution to the new collection using File -> Source Control -> Change Spurce Control. There you have to unbind all projects and rebind them to the new collection.
Ok I have find solution to my problem. The thing is Workspace info remained somewhere, I created a TPC and TP same name with the old ones. Then I manually removed Workspace info and then it worked.

Resources