vs 2013: Source Control List location - visual-studio-2013

I'm not sure if this is the right place for this question, so forgive me if it is not.
Our group uses Accurev (AccurBridge) for our source control.
I wanted to know where the vs 2013 source control list is read from? VS is not detection all my source control options all the time, so I would like to make sure that this folder is always in the list.
Thanks,

I recommend you'll install TFS source control explorer extension:
https://visualstudiogallery.msdn.microsoft.com/af70cbb7-1e0d-4d16-bc57-cccc15370c51
Which includes the following features:
Move to Folder
Branch to Folder
Merge from Sources File icon change
Drag & Drop
Show / hide deleted items
Destroy
Source Control changes and fixes
Update Since you added you are using Accurev - go to AccuRev menu and choose Workspace Information.
There you'll see the attribute "Accurev_BIN" which display the folder where AccuRev read its source controlled files.
I hope that support your question.

Related

TFS source control - new files not automatically detected as pending changes

As per the tags, I'm using VS2013 and TFS2013.
There are multiple projects in the solution: Model, Presenter, View, etc. All other projects are working as expected in terms of source control operations.
Problems with the Model project:
Adding a new file via Solution Explorer isn't automatically detected as a pending change
Deleting a file isn't detected either
Other source control operations work fine for the Model project, such as:
Get latest version
Edit detection for existing files (including changes to the csproj
file when a new file is added)
Checking in pending changes
The csproj file would show up in pending changes with the newly added file listed in it, but the new file itself isn't showing up, therefore causing build errors on other developers' machines if only the csproj changes are checked in.
The workaround is to find the added file in solution explorer and Add via context menu, this will make it appear as a pending change. But this process should be automatic as per the other projects.
Noticed that there is no .vspscc file for the Model project while other projects have one each.
Any help appreciated. Thanks.
I would unbind and rebind the problem project and try again:
To unbind a solution or project from source control
In Visual Studio, open Solution Explorer and select a solution or
project to unbind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Unbind.
To bind a solution or project to source control
In Visual Studio, open Solution Explorer and select a solution or project to bind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Bind.
Select the database and location to which to bind, and click OK.
Click OK.
You might need to go to Advanced to find the Change Source Control option
https://msdn.microsoft.com/en-us/library/0eh3790h%28v=vs.90%29.aspx
Before unbinding and binding your solution try his:
Go to Source Control Explorer
Click the "Add Items to Folder" (the
one on the left of the red cross)
Select the items you want to Add and follow the instructions on screen
That's all
Click <Detected: x add(s), x delete(s)> : in the source control explorer then select the file to add
For years I've been relying on 'Detected Adds' to add missing files - which was never a sustainable solution but I've just about managed with it.
But now if broke.
I'm actually about to reinstall Windows but in the meantime one of the best ways I've found to get a sense on what's missing (and it's still working even though the detected adds isn't) is the recursive 'Compare' window.
You can add files from here too.
It's a little klunky but it gives me a good sense of security and shows file diffs if you want to see what may have changes.

Solution Explorer not showing files after Get Latest

I am working with another dev and we're using TFS for source control. When he checks in a file or folder, I can see them with Source Control Explorer. I can do a Get Latest, and I can see that the file or folder is pulled down to my local file system.
However, if I flip over to my Solution Explorer, his new files or folders aren't appearing. I have clicked refresh, I have done a Get Latest from Solution Explorer, I have done a Get Specific Version from Solution Explorer.
Is there something I'm supposed to do to have them show up? Do I need to do an Add Existing Item every time he adds something to source control?
Thanks,
Chris
Adding files to source control is not the same thing with adding files to a project.
You are supposed to see the files on source control also.
To be able to see the files on solution explorer you need to add files to existing project by "Add Existing Item" option.

When adding to source control, Visual Studio doesn't ask where to add the solution. How do I add my solution to the location I want?

I started a new project and decided to add it to source control (TFS). When I right-click on the solution and choose Add Solution to Source Control Visual Studio automatically adds it to the top level directory of source control without prompting me on where to put it. The solution has not been checked in yet.
I think what happened was the first time I tried this it asked me where I wanted to add the solution but I didn't select the correct spot. Now when I undo pending changes and try again it always puts it in the same spot without asking.
Is there a way to start over?
From the visual studio toolbar | file | source control | workspace |
open the workspace you are using and remove the extra binding that got added because you prviously added the solution to source control.
Once you added your solution to the source control, TFS memorizes the mapping of the location to the local path. To remove the mapping, open the Source Control Explorer window, right-click on the solution and choose "Remove Mapping".
You also may find this helpful: http://zayko.net/post/How-to-permanently-remove-TFS-Source-Control-association-bindings.aspx

How can I see the change log of a directory with TFS?

I'm interested in seeing the latest changes that landed to a solution with TFS (I'm using Visual Studio). However, I can't seem to find the option: using View History on a solution or project brings up the history of the file itself. Am I missing something?
If you right click on folder the containing a solution in the Source Control Explorer window you'll see all changesets. It's obvious but I had to ask for it too. I am using TFS2010/VS2010.
Edit
Here are the steps:
Team/Connect to Team Foundation Server / select Team Project/ in Team Explorer dblclick on Source Control and in Source Control Explore right click folder containing your solution select View History and here you are.
The View History command will list you all the changesets where the file/directory was changed (add/move/content changed, deleted, etc.).
So if you do a View History on a .sln or .csproj file you'll see only the changes that were made inside the file's content, not on the "Visual Studio Item" and its related item.
To sum up, the View History command is only a File System history, there's not a smarter logic out there.
EDIT
The only way to know what changed inside a solution or project is to do a View History on the common denominator (i.e. the directory that contains everything you want to view history). But it'll still be a File System kind of History.
There's not Logical History for Solution and Projects in Visual Studio. For instance you can't know what files where added to a given project your viewing the history from two given versions. Or what projects were added/removed in the solution.
All the pieces are there (because all the changes are stored in the .csproj or .sln), but the feature itself that parses the content and retrieve the logic you want to see doesn't exist. (by the way, it's a great feature and I agree it should be there).
Bottom line: TFS/Visual Studio gives you two history system:
Based on the source control/file system, by displaying changesets.
Based on the source control/file system, by displaying labels.
That's all...
Right click on folder in solution explorer, and choose View History. Then you can see all the Changesets listed that apply to that directory. Then right click a particular changeset and choose Changeset details... to see what changes occurred in that changeset.

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.

Resources